spamosaic.preprocessing.RNA_preprocess

spamosaic.preprocessing.RNA_preprocess(rna_ads, batch_corr=False, favor='adapted', n_hvg=5000, lognorm=True, scale=False, n_comps=50, batch_key='src', key='dimred_bc', return_hvf=False)[source]

Preprocessing pipeline for RNA modality.

Parameters:
  • rna_ads (list of AnnData) – RNA modality per batch.

  • batch_corr (bool) – Whether to perform batch correction.

  • favor ({'adapted', 'scanpy'}) – Which pipeline to use.

  • n_hvg (int) – Number of highly variable genes.

  • lognorm (bool) – Whether to apply log-normalization.

  • scale (bool) – Whether to scale features.

  • n_comps (int) – Number of output components.

  • batch_key (str) – Key in .obs indicating batch identity.

  • key (str) – Key to store result in .obsm.

  • return_hvf (bool) – If True, return indices of selected HVGs.

Return type:

If return_hvf is True, returns tuple of (gene names, indices).