exportSignals: Output signals for visualization

Description Usage Arguments Value Examples

View source: R/exportSignals.R

Description

Output signals to bedgraph, bed, wig, etc, for track viewer

Usage

1
exportSignals(dat, assayName, colName, con, format = "bedGraph", ...)

Arguments

dat

An object of GRanges, or RangedSummarizedExperiment with assays of raw counts, ratios, background correct ratios, smoothed ratios and z-scores. It should be an element of output of smoothRatiosByChromosome

assayName

character(1). Assay name for RangedSummarizedExperiment

colName

character(1). Column name of metadata of dat or assay of dat for coverage weight, see coverage, RangedSummarizedExperiment.

con

The connection to which data is saved. If this is a character vector, it is assumed to be a filename and a corresponding file connection is created and then closed after exporting the object. If missing, a SimpleRleList will be returned.

format

The format of the output. see export.

...

Parameters to be passed to export

Value

If con is missing, a SimpleRleList will be returned. Otherwise, nothing is returned.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
gr <- GRanges("chr1", IRanges(seq_len(100), 201:300), reads=rep(1, 100))
myTrackLine <- new("TrackLine", name="my track",
                    description="description of my track",
                    color=col2rgb("red")[, 1],
                    visibility="full")
exportSignals(gr, colName="reads", 
              con="test.bedGraph", trackLine=myTrackLine)
data(triplicate.count)
exportSignals(triplicate.count, "counts", 
              "G18.subsampled.srt.bam", "test.bw", format="bigWig")

NADfinder documentation built on Nov. 8, 2020, 5:35 p.m.