CalculateFractionInTrome | R Documentation |
Calculates the fraction of specified genes within the entire transcriptome of each cell in a Seurat object. This function is useful for assessing the relative abundance of a set of genes across cells, such as identifying cells with high expression of marker genes.
CalculateFractionInTrome(
genesCalc.Cor.Seuratet = c("MALAT1"),
obj = combined.obj,
data.slot = c("counts", "data")[2]
)
obj |
A Seurat object containing gene expression data. Default: |
data.slot |
The data slot from which to extract expression data. This can be |
geneset |
A character vector of gene symbols for which the fraction in the transcriptome will be calculated.
Default: |
A numeric vector where each element represents the fraction of the specified geneset's expression relative to the total transcriptome of a cell, expressed as a percentage. The names of the vector correspond to cell IDs.
This function calls check.genes
to verify the existence of the specified genes within the Seurat object.
If genes are not found, it will return a warning.
GetAssayData
for retrieving expression data from a Seurat object.
## Not run:
if (interactive()) {
# Assuming `combined.obj` is your Seurat object
fractionInTranscriptome <- CalculateFractionInTranscriptome(geneset = c("MALAT1", "GAPDH"), obj = combined.obj)
# This will return the fraction of MALAT1 and GAPDH in the transcriptome of each cell
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.