View source: R/selectBatchHVG.R
selectBatchHVG | R Documentation |
Method to select HVGs based on mean dispersions of genes that are highly variable genes in all batches. Using a the top target_genes per batch by average normalize dispersion. If target genes still hasn't been reached, then HVGs in all but one batches are used to fill up. This is continued until HVGs in a single batch are considered.
This is an rliger implementation of the method originally published in SCIB. We found the potential that it can improve integration under some circumstances, and is currently testing it.
This function currently only works for shared features across all datasets.
For selection from only part of the datasets and selection for
dataset-specific unshared features, please use selectGenes()
.
selectBatchHVG(object, ...)
## S3 method for class 'liger'
selectBatchHVG(
object,
nGenes = 2000,
verbose = getOption("ligerVerbose", TRUE),
...
)
## S3 method for class 'ligerDataset'
selectBatchHVG(
object,
nGenes = 2000,
features = NULL,
verbose = getOption("ligerVerbose", TRUE),
...
)
## S3 method for class 'dgCMatrix'
selectBatchHVG(
object,
nGenes = 2000,
returnStats = FALSE,
verbose = getOption("ligerVerbose", TRUE),
...
)
object |
A |
... |
Arguments passed to S3 methods. |
nGenes |
Integer number of target genes to select. Default |
verbose |
Logical. Whether to show a progress bar. Default
|
features |
For ligerDataset method, the feature subset to limit the
selection to, due to liger downstream requires non-zero features to be
considered. Default |
returnStats |
Logical, for dgCMatrix-method, whether to return a data
frame of statistics for all features, or by default |
liger-method: Returns the input liger object with the selected genes
updated in varFeatures
slot, which can be accessed with
varFeatures(object)
. Additionally, the statistics are updated in
the featureMeta
slot of each ligerDataset object within the
datasets
slot of the object
.
ligerDataset-method: Returns the input ligerDataset object with the
statistics updated in the featureMeta
slot.
dgCMatrix-method: By default returns a character vector of selected
variable features. If returnStats = TRUE
, returns a data.frame of the
statistics.
Luecken, M.D., Büttner, M., Chaichoompu, K. et al. (2022), Benchmarking atlas-level data integration in single-cell genomics. Nat Methods, 19, 41–50. https://doi.org/10.1038/s41592-021-01336-8.
selectGenes()
pbmc <- selectBatchHVG(pbmc, nGenes = 10)
varFeatures(pbmc)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.