Export genome browser viewable files

Description

Export univariate peak-calls and read counts as genome browser viewable file

Usage

1
2
exportUnivariates(hmm.list, filename, what = c("peaks", "counts"),
  header = TRUE, separate.files = TRUE)

Arguments

hmm.list

A list() of uniHMM objects or vector of files that contain such objects.

filename

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

what

A character vector specifying what will be exported. Supported are c('peaks', 'counts').

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 hmm in hmm.list.

Details

Export uniHMM objects as files which can be uploaded into a genome browser. Peak-calls are exported in BED format (.bed.gz) and read counts are exported in WIGGLE format (.wig.gz).

Value

NULL

Author(s)

Aaron Taudt

See Also

exportBinnedData, exportMultivariate

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Get an example BAM file
file <- system.file("extdata", "euratrans",
                      "lv-H3K27me3-BN-male-bio2-tech1.bam",
                       package="chromstaRData")
## Bin the file into bin size 1000bp
data(rn4_chrominfo)
binned <- binReads(file, assembly=rn4_chrominfo, binsizes=1000,
                  chromosomes='chr12')
## Fit the univariate Hidden Markov Model
hmm <- callPeaksUnivariate(binned, max.time=60, eps=1)
## Export
exportUnivariates(list(hmm), filename=tempfile(), what=c('peaks','counts'))

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.