omicverse.single.Batch¶
- omicverse.single.Batch(adata, batch_key='batch', scale=True, embedding=True, seed=0, dimred_func=None, rep_name='X_pca', **kwargs)[source]¶
Run MultiMAP to correct batch effect within a single AnnData object. Loses the flexibility of individualised dimensionality reduction choices, but doesn’t require a list of separate objects for each batch/dataset to integrate. Runs PCA on a per-batch/dataset basis prior to performing an analysis analogous to
Integration(). Adds appropriate.obspgraphs and.obsm['X_multimap'](if instructed) to the input.Input¶
- adata
AnnData The object to process.
.Xdata will be used in the computation.- batch_key
str, optional (default: “batch”) The
.obscolumn of the input object with the categorical variable defining the batch/dataset grouping to integrate on.- scale
bool, optional (default:True) Whether to scale the data to N(0,1) on a per-dataset basis prior to computing the cross-dataset PCAs. Improves integration.
- embedding
bool, optional (default:True) Whether to compute the MultiMAP embedding. If
False, will just return the graph, which can be used to compute a regular UMAP. This can produce a manifold quicker, but at the cost of accuracy.- dimred_funcfunction or
None, optional (default:None) The function to use to compute dimensionality reduction on a per-dataset basis. Must accept an
AnnDataon input and modify it by inserting its dimensionality reduction into.obsm. IfNone,scanpy.tl.pca()will be used.- rep_name
str, optional (default: “X_pca”) The
.obsmfield that the dimensionality reduction function stores its output under.
All other arguments as described in
Integration().- adata