Tools#

Aggregate profiles and ask what the perturbations did.

Aggregation#

tl.aggregate(adata[, by, func, min_cells, ...])

Aggregate adata to one profile per group.

tl.consensus(adata[, by, method, ...])

One profile per group, weighting replicates by how well they agree.

Replicates and reproducibility#

tl.map(adata[, pos_sameby, pos_diffby, ...])

Mean average precision per group, with a permutation null.

tl.similarity(adata[, metric, use_rep, ...])

Store pairwise profile similarity in obsp[key_added].

tl.percent_replicating(adata[, groupby, ...])

Median replicate correlation against a non-replicate null.

tl.grit(adata[, groupby, reference, metric, ...])

Similarity of each replicate to its group, z-scored against its similarity to the controls.

tl.transport(adata[, by, groupby, ...])

Test whether each perturbation's effect reproduces across settings.

tl.replicate_saturation(adata[, groupby, ...])

Score how much a group's signature improves with each additional replicate.

Hits and effect sizes#

tl.hit_calling(adata[, groupby, reference, ...])

Call hits by testing each group's distance from the controls.

tl.edistance(adata[, groupby, reference, ...])

Energy distance between each group and the controls, or between every pair.

tl.effect_size(adata[, groupby, reference, ...])

Per-feature effect size of each group against the reference.

tl.wasserstein_features(adata[, groupby, ...])

Wasserstein-1 distance per feature between each group and the reference.

tl.differential_features(adata[, groupby, ...])

Moderated t-test per feature, per group, with wells as the replicates.

tl.feature_signature(adata[, key, by, statistic])

Collapse a differential table into a perturbation-by-feature-family matrix.

tl.cytotoxicity(adata[, groupby, reference, ...])

Flag perturbations that both lost cells and moved away from the controls.

Dose response#

tl.dose_response(adata[, compound_key, ...])

Test whether each compound's response grows with concentration.

tl.dose_features(adata[, compound_key, ...])

Which features respond to a compound's concentration, and at what concentration each one starts.

tl.dose_direction(adata[, compound_key, ...])

Whether a compound's phenotype only grows with concentration, or turns into a different one.

tl.dose_trajectory(adata[, compound_key, ...])

Each compound's whole path through its own responding window, on one comparable axis.

Mechanism of action#

tl.nn_moa_classify(adata[, moa_key, metric, ...])

Leave-one-out nearest-neighbor mechanism assignment.

tl.moa_enrichment(adata[, moa_key, groupby, ...])

Test which mechanisms are over-represented among each profile's nearest neighbors.

Feature sets#

tl.feature_sets(adata[, by])

Build a decoupler network from the parsed feature annotation.

tl.enrich(adata[, net, by, method, methods, ...])

Score every profile against every feature set.

tl.rank_features(adata, groupby[, method, ...])

Rank features by how well they separate each group, with the annotation attached.

tl.rank_sets(adata, groupby[, score_key, ...])

Rank feature sets by how far each group's score sits from the rest.

Clusters and gene sets#

tl.cluster(adata[, use_rep, method, ...])

Cluster the profiles and store the labels, with the linkage tree for a dendrogram.

tl.gene_sets([source, organism])

Fetch a gene-set network, or read one from a GMT file.

tl.ora(adata[, groupby, net, gene_key, ...])

Test each group's genes for over-representation of gene sets.

tl.enrich_hits(adata, net[, gene_key, ...])

Test which gene sets are over-represented among the hits.

tl.pathway_coherence(adata, net[, gene_key, ...])

Score how similar the profiles of each gene set's genes are.

tl.network_enrichment(adata[, ...])

Test the most-similar perturbation pairs for enrichment of known interactions.

Single cells#

tl.cluster_composition(adata[, cluster_key, ...])

Fraction of each well's cells in each cluster, as a well-level object.

tl.subpopulation_hits(adata[, cluster_key, ...])

Test each perturbation against the controls within each cluster.

tl.cell_cycle_phase(adata[, dna_feature, ...])

Assign G1, S or G2M from integrated DNA intensity.

tl.neighbors_local_density(adata[, k, by, ...])

Mean distance to the k nearest cells in the same field of view.