View source: R/getExprGeneNames.R
getExprGeneNames | R Documentation |
Get list of expressed genes for each assay using same filters as processAssays()
.
getExprGeneNames(
sceObj,
assays = assayNames(sceObj),
min.cells = 5,
min.count = 5,
min.samples = 4,
min.prop = 0.4,
min.total.count = 15,
normalize.method = "TMM"
)
sceObj |
SingleCellExperiment object |
assays |
array of assay names to include in analysis. Defaults to |
min.cells |
minimum number of observed cells for a sample to be included in the analysis |
min.count |
minimum number of reads for a gene to be considered expressed in a sample. Passed to |
min.samples |
minimum number of samples passing cutoffs for cell cluster to be retained |
min.prop |
minimum proportion of retained samples with non-zero counts for a gene to be retained |
min.total.count |
minimum total count required per gene for inclusion |
normalize.method |
normalization method to be used by |
library(muscat)
data(example_sce)
# create pseudobulk for each sample and cell cluster
pb <- aggregateToPseudoBulk(example_sce,
assay = "counts",
sample_id = "sample_id",
cluster_id = "cluster_id",
verbose = FALSE
)
# Gene expressed genes for each cell type
geneList = getExprGeneNames(pb)
# Create precision weights for pseudobulk
# By default, weights are set to cell count,
# which is the default in processAssays()
# even when no weights are specified
weightsList <- pbWeights(example_sce,
sample_id = "sample_id",
cluster_id = "cluster_id",
geneList = geneList
)
# voom-style normalization using initial weights
res.proc <- processAssays(pb, ~group_id, weightsList = weightsList)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.