convertTo | R Documentation |
Convert a SingleCellExperiment object into other classes for entry into other analysis pipelines.
convertTo(
x,
type = c("edgeR", "DESeq2", "monocle"),
...,
assay.type = 1,
subset.row = NULL
)
x |
A SingleCellExperiment object. |
type |
A string specifying the analysis for which the object should be prepared. |
... |
Other arguments to be passed to pipeline-specific constructors. |
assay.type |
A string specifying which assay of |
subset.row |
See |
This function converts an SingleCellExperiment object into various other classes in preparation for entry into other analysis pipelines, as specified by type
.
For type="edgeR"
, a DGEList object is returned containing the count matrix.
Size factors are converted to normalization factors.
Gene-specific rowData
is stored in the genes
element, and cell-specific colData
is stored in the samples
element.
For type="DESeq2"
, a DESeqDataSet object is returned containing the count matrix and size factors.
Additional gene- and cell-specific data is stored in the mcols
and colData
respectively.
Aaron Lun
DGEList
,
DESeqDataSetFromMatrix
for specific class constructors.
library(scuttle)
sce <- mockSCE()
# Adding some additional embellishments.
sizeFactors(sce) <- 2^rnorm(ncol(sce))
rowData(sce)$SYMBOL <- paste0("X", seq_len(nrow(sce)))
sce$other <- sample(LETTERS, ncol(sce), replace=TRUE)
# Converting to various objects.
convertTo(sce, type="edgeR")
convertTo(sce, type="DESeq2")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.