scib.preprocessing.hvg_batch
- scib.preprocessing.hvg_batch(adata, batch_key=None, target_genes=2000, flavor='cell_ranger', n_bins=20, adataOut=False)
Batch-aware highly variable gene selection
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.
- Parameters:
adata –
anndata
objectbatch –
adata.obs
columntarget_genes – maximum number of genes (intersection reduces the number of genes)
flavor – parameter for
scanpy.pp.highly_variable_genes
n_bins – parameter for
scanpy.pp.highly_variable_genes
adataOut – whether to return an
anndata
object or a list of highly variable genes