pegasus.run_scanorama¶
- pegasus.run_scanorama(data, batch='Channel', n_components=50, features='highly_variable_features', standardize=True, max_value=10.0, random_state=0)[source]¶
Batch correction using Scanorama.
This is a wrapper of Scanorama package. See [Hie19] for details on the algorithm.
- Parameters
data (
MultimodalData
.) – Annotated data matrix with rows for cells and columns for genes.batch (
str
, optional, default:"Channel"
.) – Which attribute in data.obs field represents batches, default is “Channel”.n_components (
int
, optional default:50
.) – Number of integrated embedding components to keep. This sets Scanorama’s dimred parameter.features (
str
, optional, default:"highly_variable_features"
.) – Keyword indata.var
to specify features used for Scanorama.standardize (
bool
, optional, default:True
.) – Whether to scale the data to unit variance and zero mean.max_value (
float
, optional, default:10
.) – The threshold to truncate data after scaling. IfNone
, do not truncate.random_state (
int
, optional, default:0
.) – Seed for random number generator.
- Return type
str
- Returns
out_rep (
str
) – The keyword indata.obsm
referring to the embedding calculated by Scanorama algorithm. out_rep is always equal to “scanorama”Update
data.obsm
–data.obsm['X_scanorama']
: The embedding calculated by Scanorama algorithm.
Examples
>>> pg.run_scanorama(data, random_state = 25)