View source: R/application_prediction.R
get_expressed_genes | R Documentation |
Return the genes that are expressed in given cell cluster(s) based on the fraction of cells in the cluster(s) that should express the cell.
get_expressed_genes(celltype_oi, object, ...)
## Default S3 method:
get_expressed_genes(celltype_oi, object, celltype_annot, pct = 0.1)
## S3 method for class 'Seurat'
get_expressed_genes(celltype_oi, seurat_obj, pct = 0.1, assay_oi = NULL, ...)
celltype_oi |
Character vector of cell type(s) to be considered. If input is a Seurat object, these must correspond to the cell identities from |
object |
Input matrix with rows as genes and columns as cells |
... |
additional parameters passed to |
celltype_annot |
Vector of cell type annotations |
pct |
We consider genes expressed if they are expressed in at least a specific fraction of cells of the given cluster(s). This number indicates this fraction. Default: 0.10. Choice of this parameter is important and depends largely on the used sequencing platform. We recommend to require a lower fraction (like the default 0.10) for 10X data than for e.g. Smart-seq2 data. |
seurat_obj |
Single-cell expression or spatial dataset as Seurat object |
assay_oi |
If wanted: specify yourself which assay to look for. If not NULL, the |
A vector containing gene symbols of the expressed genes
## Not run:
# For sparse matrix
get_expressed_genes("CD8 T", GetAssayData(seuratObj), seuratObj$celltype, pct = 0.10)
## End(Not run)
## Not run:
# For Seurat object
get_expressed_genes(celltype_oi = "CD8 T", seurat_obj = seuratObj, pct = 0.10)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.