Description Usage Arguments Details Value Examples
Compute normalized expression values from count data in a SingleCellExperiment object, using the median normalized total count stored in the object.
1 | CountNormalize(object, return_log = FALSE)
|
object |
A SingleCellExperiment object. |
return_log |
Logical scalar, should normalized values be returned on the log2 scale?
If |
Normalized expression values are computed by dividing the counts for each cell by median normalized total count of that cell.
If log=TRUE
, log-normalized values are calculated by adding a pseudocount of 1
to the normalized count and performing a log2 transformation.
A SingleCellExperiment object containing normalized expression values in "normcounts"
if log=FALSE
,
and log-normalized expression values in "logcounts"
if log=TRUE
.
1 2 3 4 5 6 7 8 | library(SingleCellExperiment)
ncells <- 100
ngenes <- 2000
x <- matrix(rpois(ncells*ngenes, lambda = 10), ncol=ncells, nrow=ngenes, byrow=TRUE)
rownames(x) <- paste0("Gene", seq_len(ngenes))
colnames(x) <- paste0("Cell", seq_len(ncells))
sce <- SingleCellExperiment(list(counts=x))
sce <- CountNormalize(sce)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.