exportFiles: Export genome browser uploadable files

Description Usage Arguments Value Functions Examples

Description

These functions allow to export chromstaR-objects as files which can be uploaded to a genome browser. Peak calls are exported in BED format (.bed.gz), read counts in wiggle format (.wig.gz) as RPKM values, and combinatorial states are exported in BED format (.bed.gz).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
exportPeaks(
  model,
  filename,
  header = TRUE,
  separate.files = TRUE,
  trackname = NULL
)

exportCounts(
  model,
  filename,
  header = TRUE,
  separate.files = TRUE,
  trackname = NULL
)

exportCombinations(
  model,
  filename,
  header = TRUE,
  separate.files = TRUE,
  trackname = NULL,
  exclude.states = "[]",
  include.states = NULL
)

Arguments

model

A chromstaR-objects.

filename

The name of the file that will be written. The appropriate ending will be appended, either "_peaks.bed.gz" for peak-calls or "_counts.wig.gz" for read counts or "_combinations.bed.gz" for combinatorial states. Any existing file will be overwritten.

header

A logical indicating whether the output file will have a heading track line (TRUE) or not (FALSE).

separate.files

A logical indicating whether or not to produce separate files for each track.

trackname

Name that will be used in the "track name" field of the BED file.

exclude.states

A character vector with combinatorial states that will be excluded from export.

include.states

A character vector with combinatorial states that will be exported. If specified, exclude.states is ignored.

Value

NULL

Functions

Examples

1
2
3
4
5
6
7
## Get an example multiHMM
file <- system.file("data","combined_mode-differential.RData",
                    package="chromstaR")
model <- get(load(file))
## Export peak calls and combinatorial states
exportPeaks(model, filename=tempfile())
exportCombinations(model, filename=tempfile())

chromstaR documentation built on Nov. 8, 2020, 8:29 p.m.