| getTopHVG {singleCellTK} | R Documentation |
SingleCellExperiment object.
Note that the variability metrics must be computed using the 'runFeatureSelection'
method before extracting the feature names of the top variable features. If
'altExp' parameter is a character value, this function will return the
input SingleCellExperiment object with the subset containing only the
top variable features stored as an altExp slot in returned object.
However, if this parameter is set to NULL, only the names of the top
variable features will be returned as a character vector.getTopHVG
Extracts 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. If
'altExp' parameter is a character value, this function will return the
input SingleCellExperiment object with the subset containing only the
top variable features stored as an altExp slot in returned object.
However, if this parameter is set to NULL, only the names of the top
variable features will be returned as a character vector.
getTopHVG(inSCE, method, n = 2000, altExp = NULL)
inSCE |
Input |
method |
Specify which method to use for variable gene extraction from either Seurat "vst", "mean.var.plot", "dispersion" or Scran "modelGeneVar". |
n |
Specify the number of top variable genes to extract. |
altExp |
A |
A character vector of the top variable feature names or the
input SingleCellExperiment object with subset of variable features
stored as an altExp in the object.
Irzam Sarfraz
data(sce_chcl, package = "scds") sce_chcl <- scranModelGeneVar(sce_chcl, "counts") # return top 10 variable genes topGenes <- getTopHVG(sce_chcl, "modelGeneVar", 10)