getTopHVG | R Documentation |
Extracts or select the top variable genes from an input
SingleCellExperiment object. Note that the variability metrics
must be computed using the runFeatureSelection
method before
extracting the feature names of the top variable features. getTopHVG
only returns a character vector of the HVG selection, while with
setTopHVG
, a logical vector of the selection will be saved in the
rowData
, and optionally, a subset object for the HVGs can be stored
in the altExps
slot at the same time.
getTopHVG(
inSCE,
method = c("vst", "dispersion", "mean.var.plot", "modelGeneVar", "seurat", "seurat_v3",
"cell_ranger"),
hvgNumber = 2000,
useFeatureSubset = "hvf",
featureDisplay = metadata(inSCE)$featureDisplay
)
setTopHVG(
inSCE,
method = c("vst", "dispersion", "mean.var.plot", "modelGeneVar", "seurat", "seurat_v3",
"cell_ranger"),
hvgNumber = 2000,
featureSubsetName = "hvg2000",
genes = NULL,
genesBy = NULL,
altExp = FALSE
)
inSCE |
Input SingleCellExperiment object |
method |
Specify which method to use for variable gene extraction
from Seurat |
hvgNumber |
Specify the number of top variable genes to extract. |
useFeatureSubset |
Get the feature names in the HVG list set by
|
featureDisplay |
A character string for the |
featureSubsetName |
A character string for the |
genes |
A customized character vector of gene list to be set as a
|
genesBy |
If setting customized |
altExp |
|
getTopHVG |
A character vector of the top |
setTopHVG |
The input |
Irzam Sarfraz, Yichen Wang
runFeatureSelection
, runSeuratFindHVG
,
runModelGeneVar
, plotTopHVG
data("scExample", package = "singleCellTK")
# Create a "highy variable feature" subset using Seurat's vst method:
sce <- runSeuratFindHVG(sce, method = "vst", hvgNumber = 2000,
createFeatureSubset = "hvf")
# Get the list of genes for a feature subset:
hvgs <- getTopHVG(sce, useFeatureSubset = "hvf")
# Create a new feature subset on the fly without rerunning the algorithm:
sce <- setTopHVG(sce, method = "vst", hvgNumber = 100,
featureSubsetName = "hvf100")
hvgs <- getTopHVG(sce, useFeatureSubset = "hvf100")
# Get a list of variable features without creating a new feature subset:
hvgs <- getTopHVG(sce, useFeatureSubset = NULL,
method = "vst", hvgNumber = 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.