SEmethods | R Documentation |
Converting a SummarizedExperiment object to a DGEList object for analysis with edgeR.
## S4 method for signature 'SummarizedExperiment'
asDGEList(object, lib.sizes, norm.factors, assay.id="counts", ...)
object |
A SummarizedExperiment object or its derived classes, like that produced by |
lib.sizes |
An (optional) integer vector of library sizes. |
norm.factors |
An (optional) numeric vector of normalization factors. |
assay.id |
A string or integer scalar indicating which assay in |
... |
Other arguments to be passed to |
Counts are extracted from specified assay
matrix in the SummarizedExperiment object and used to construct a DGEList object via DGEList
.
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.
If norm.factors
is not specified, asDGEList
will attempt to extract normalization factors from object$norm.factors
.
If this is not available, factors will be set to the default (all unity).
If assays(object)$offset
is present, this will be assigned to the offset
field of the output DGEList
object.
A DGEList object is returned containing counts and normalization information.
Aaron Lun
DGEList
bamFiles <- system.file("exdata", c("rep1.bam", "rep2.bam"), package="csaw")
data <- windowCounts(bamFiles, width=100, filter=1)
asDGEList(data)
asDGEList(data, lib.sizes=c(10, 100))
asDGEList(data, norm.factors=c(1.11, 2.23), group=c("a", "b"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.