scTransform

besca.pp.scTransform(adata, hvg=False, n_genes=4000, rlib_loc='')[source]

Function to call scTransform normalization or HVG selection from Python. Modified from https://github.com/normjam/benchmark/blob/master/normbench/methods/ad2seurat.py.

Parameters:
  • adata (AnnData) – AnnData object of RNA counts.

  • hvg (boolean) – Should the hvg method be used (returning a reduced adata object) or the normalization method (returning a normalized adata).

  • n_genes (int) – Number of hvgs to return if the hvg method is selected. A selection of 4000-5000 generally yields the best results.

  • rlib_loc (str) – R library location that will be added to the default .libPaths() to locate the required packages.

Return type:

returns an AnnData object reduced to the highly-variable genes.

Deprecated since version 2.5: This will be removed in 3.0. This R-based function is marked deprecated and will be removed in future versions of besca!