Learn R Programming

csaw (version 1.4.0)

SEmethods: Statistical wrappers for RangedSummarizedExperiment objects

Description

Convenience wrappers for statistical routines operating on RangedSummarizedExperiment objects.

Usage

"normOffsets"(object, lib.sizes, ...) "normalize"(object, lib.sizes, ...) # deprecated, use normOffsets "asDGEList"(object, lib.sizes, ...)

Arguments

object
a RangedSummarizedExperiment object, like that produced by windowCounts
lib.sizes
an (optional) integer vector of library sizes
...
other arguments to be passed to the function being wrapped

Value

For normOffsets, either a numeric matrix or vector is returned; see normOffsets,matrix-method.For asDGEList, a DGEList object is returned.

Details

Counts are extracted from the matrix corresponding to the first assay in the RangedSummarizedExperiment object. If not specified in lib.sizes, library sizes are taken from the totals field in the column data of object. Warnings will be generated if this field is not present.

In the normOffsets method, the extracted counts and library sizes are supplied to normOffsets,matrix-method. Similarly, the asDGEList method wraps the DGEList constructor. In both cases, any arguments in ... are also passed to the wrapped functions.

See Also

normOffsets, DGEList, windowCounts

Examples

Run this code
bamFiles <- system.file("exdata", c("rep1.bam", "rep2.bam"), package="csaw")
data <- windowCounts(bamFiles, width=100, filter=1)
normOffsets(data)
normOffsets(data, lib.sizes=c(10, 100))
head(normOffsets(data, type="loess"))

asDGEList(data)
asDGEList(data, lib.sizes=c(10, 100))
asDGEList(data, norm.factors=c(1.11, 2.23), group=c("a", "b"))

Run the code above in your browser using DataLab