API#

Import pairOT as:

import pairot as pr

Preprocessing#

pp.preprocess_adatas(adata1, adata2, ...[, ...])

Function for pre-processing the input AnnData objects for usage with pairot.tl.DatasetMap.

pp.downsample_indices(labels, n_samples[, ...])

Downsample indices stratified by labels.

pp.rank_genes_limma(adata, cluster_label, ...)

Calculate pseudobulk differential expression (DE) statistics using limmaR package.

pp.filter_genes_ova(de_res[, ...])

Sort and filter DEGs for the OVA (one vs all) setting.

pp.filter_genes_ava(de_res[, ...])

Sort and filter DEGs for the AVA (all vs all) setting.

pp.select_genes(de_res_ova, de_res_ava[, ...])

Select and combine DE results from OVA (one vs all) and AVA (all vs all) settings.

Tools#

tl.DatasetMap(adata1, adata2)

Align cell annotations between query and reference dataset using annotation-informed optimal transport.

Plotting#

pl.mapping(data[, width, height, zmin, ...])

Plot cluster mappings from pairot.tl.DatasetMap.compute_mapping.

pl.distance(data[, width, height, backend])

Plot cluster distances from pairot.tl.DatasetMap.compute_distance.

pl.sankey(cluster_mapping, cluster_distance)

Plot cluster mappings and distances from pairot.tl.DatasetMap as a Sankey diagram.

Resources#

pp.OFFICIAL_GENES

DataFrame containing official gene names from genenames.org.

pp.FILTERED_GENES

DataFrame containing uninformative genes to filter out, e.g., mitochondrial, ribosomal, IncRNA, TCR and BCR genes.