Given a set of genes, filter to the ones found in the sample. This is useful because some Seurat functions (Seurat::VlnPlot, Seurat::FeaturePlot) will quit on an error if a gene is not found (i.e. not in the rownames of seurat@data).
filterGenesSample(genes, seurat, from_sp = "hg", to_sp = "mm")
genes | Character vector of genes to search for |
---|---|
seurat | Seurat object |
from_sp | One of "hg" or "mm". Default: "hg" |
to_sp | One of "hg" or "mm". Default: "mm" |
Character vector of converted gene names which are detected in the sample
#> [1] "IL32"