AggregateExpression | R Documentation |
Returns summed counts ("pseudobulk") for each identity class.
AggregateExpression(
object,
assays = NULL,
features = NULL,
return.seurat = FALSE,
group.by = "ident",
add.ident = NULL,
normalization.method = "LogNormalize",
scale.factor = 10000,
margin = 1,
verbose = TRUE,
...
)
object |
Seurat object |
assays |
Which assays to use. Default is all assays |
features |
Features to analyze. Default is all features in the assay |
return.seurat |
Whether to return the data as a Seurat object. Default is FALSE |
group.by |
Category (or vector of categories) for grouping (e.g, ident, replicate, celltype); 'ident' by default To use multiple categories, specify a vector, such as c('ident', 'replicate', 'celltype') |
add.ident |
(Deprecated). Place an additional label on each cell prior to pseudobulking |
normalization.method |
Method for normalization, see |
scale.factor |
Scale factor for normalization, see |
margin |
Margin to perform CLR normalization, see |
verbose |
Print messages and show progress bar |
... |
Arguments to be passed to methods such as |
If return.seurat = TRUE
, aggregated values are placed in the 'counts'
layer of the returned object. The data is then normalized by running NormalizeData
on the aggregated counts. ScaleData
is then run on the default assay
before returning the object.
Returns a matrix with genes as rows, identity classes as columns.
If return.seurat is TRUE, returns an object of class Seurat
.
## Not run:
data("pbmc_small")
head(AggregateExpression(object = pbmc_small)$RNA)
head(AggregateExpression(object = pbmc_small, group.by = c('ident', 'groups'))$RNA)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.