shannonca.dimred.reduce_scanpy(adata, keep_scores=False, keep_loadings=True, keep_all_iters=False, layer=None, key_added='sca', iters=1, model='wilcoxon', **kwargs)

Compute an SCA reduction of the given dataset, stored as a scanpy AnnData.

  • adata (scanpy.AnnData) – AnnData object containing single-cell transcriptomic data to be reduced

  • keep_scores (bool) – if True, stores information score matrix in adata.layers[key_added+’_score’]. Default False.

  • keep_loadings (bool) – if True, stores loadings in adata.varm[key_added+’_loadings’]. Default False.

  • keep_all_iters (bool) – if True, store the embedding after each iteration in adata.obsm[key_added+’_’+i] for i in 1,2,…iters. Default False

  • layer (str | None) – Layer to reduce. If None, reduces adata.X. Otherwise, reduces adata.layers[layer]. Default None.

  • key_added (str) – Namespace for storage of results. Defaults to ‘sca’.

  • iters (int) – Number of SCA iterations to run.

  • model (str) – Model used to test for local enrichment of genes, used to compute information scores. One of [“wilcoxon”,”binomial”,”ttest”], default “wilcoxon” (recommended).

  • kwargs – Additional arguments to passed to reduce (e.g. verbose, n_tests, chunk_size).