Skip to content

Feature request: API to aggregate MISTy results across samples and plot condition contrasts (parity with mistyR) #208

@asmlgkj

Description

@asmlgkj

Thanks a lot

In mistyR there are helper utilities (e.g. collect_results(), plot_contrast_heatmap) that let users:

run MISTy per sample,

aggregate results across many samples (mean/median, or user-defined), and

visualize condition contrasts (e.g., case vs control) as heatmaps.

In liana-py we can run MISTy per sample and manually concatenate & aggregate DataFrames (and use aggregate_fun in plotting), but there is no first-class API to:

aggregate results across samples with a simple function, and

produce contrast/condition-aware plots out of the box.

Run MISTy on each sample → collect misty.uns['interactions'] / misty.uns['target_metrics'].

pd.concat all samples, add sample / condition, groupby & aggregate (mean/median).

For contrasts, pivot two conditions and compute deltas manually, then plot.

Works, but it’s verbose and easy to get wrong; an official API would improve UX and reproducibility.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions