1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/convertTo.R
\name{convertTo}
\alias{convertTo}
\title{Convert to other classes}
\usage{
convertTo(
x,
type = c("edgeR", "DESeq2", "monocle"),
...,
assay.type = 1,
subset.row = NULL
)
}
\arguments{
\item{x}{A \linkS4class{SingleCellExperiment} object.}
\item{type}{A string specifying the analysis for which the object should be prepared.}
\item{...}{Other arguments to be passed to pipeline-specific constructors.}
\item{assay.type}{A string specifying which assay of \code{x} should be put in the returned object.}
\item{subset.row}{See \code{?"\link{scran-gene-selection}"}.}
}
\value{
For \code{type="edgeR"}, a DGEList object is returned containing the count matrix.
Size factors are converted to normalization factors.
Gene-specific \code{rowData} is stored in the \code{genes} element, and cell-specific \code{colData} is stored in the \code{samples} element.
For \code{type="DESeq2"}, a DESeqDataSet object is returned containing the count matrix and size factors.
Additional gene- and cell-specific data is stored in the \code{mcols} and \code{colData} respectively.
For \code{type="monocle"}, a CellDataSet object is returned containing the count matrix and size factors.
Additional gene- and cell-specific data is stored in the \code{featureData} and \code{phenoData} respectively.
}
\description{
Convert a \linkS4class{SingleCellExperiment} object into other classes for entry into other analysis pipelines.
}
\details{
This function converts an SingleCellExperiment object into various other classes in preparation for entry into other analysis pipelines, as specified by \code{type}.
}
\examples{
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")
convertTo(sce, type="monocle")
}
\seealso{
\code{\link[edgeR]{DGEList}},
\code{\link[DESeq2:DESeqDataSet]{DESeqDataSetFromMatrix}},
\code{\link[monocle]{newCellDataSet}}, for specific class constructors.
}
\author{
Aaron Lun
}
|