API

Import symphonypy as:

import symphonypy as sp

Preprocessing

pp.harmony_integrate(adata, key[, flavor, ...])

Run Harmony batch correction on adata, save corrected output to adata.obsm, save all the necessary to Symphony mapping algorithm parameters to adata.uns

Tools

tl.map_embedding(adata_query, adata_ref[, ...])

Actually runs Symphony algorithm for mapping adata_query to adata_ref.

tl.transfer_labels_kNN(adata_query, ...[, ...])

Run sklearn kNN classifier for label transferring.

tl.per_cell_confidence(adata_query, adata_ref)

Calculates the weighted Mahalanobis distance for query cells to reference clusters.

tl.per_cluster_confidence(adata_query, ...)

Calculates the Mahalanobis distance from user-defined query clusters to their nearest reference centroid after initial projection into reference PCA space.

tl.ingest(adata_query, adata_ref[, obs, ...])

Copied from https://github.com/scverse/scanpy/blob/master/scanpy/tools/_ingest.py with little change that var_names equality between adata and adata_new wouldn't be check if needless, and additional parameter use_rep is added.

tl.tsne(adata[, use_rep, t_sne_slot, ...])

Run openTSNE dimension reduction on adata if use_model is None, or ingest adata.obsm[use_rep] to existing embedding, saved in use_model.