This repository accompanies the preprint “ParTIpy: A Scalable Framework for Archetypal Analysis and Pareto Task Inference”.
It contains the code to reproduce benchmarks of initialization and optimization strategies, as well as experiments evaluating coreset sizes and performance gains in Archetypal Analysis.
For additional examples and applications of Archetypal Analysis and Pareto Task Inference on single-cell and spatial omics data, please refer to the documentation.
We recommend installing dependencies with mamba (or conda)
mamba env remove -n partipy -y
mamba env create -n partipy -f env.yamlThis will install all required packages, including ParTIpy
Benchmark and example datasets are downloaded automatically when running the benchmark scripts (via functions defined in utils/data_utils.py).
mamba activate partipy
python -m code.benchmark_algorithms.ms_bench
python -m code.benchmark_algorithms.ms_xenium_bench
python -m code.benchmark_algorithms.lupus_bench
python -m code.benchmark_algorithms.bench_metamamba activate partipy
python -m code.benchmark_coresets.ms_coreset
python -m code.benchmark_coresets.ms_xenium_coreset
python -m code.benchmark_coresets.lupus_coreset
python -m code.benchmark_coresets.coreset_meta
python -m code.benchmark_coresets.ms_coreset_v2
python -m code.benchmark_coresets.ms_xenium_coreset_v2
python -m code.benchmark_coresets.lupus_coreset_v2
python -m code.benchmark_coresets.coreset_meta_v2mamba activate partipy
python -m code.benchmark_memory.k562_memory_bench
python -m code.benchmark_memory.hct116_memory_bench
python -m code.benchmark_memory.hek293t_memory_bench
python -m code.benchmark_memory.k562_memory_bench_only_pca
python -m code.benchmark_memory.hct116_memory_bench_only_pca
python -m code.benchmark_memory.hek293t_memory_bench_only_pca
python -m code.benchmark_memory.memory_metamamba activate partipy
python -m code.benchmark_algorithms.simulated_datamamba activate partipy
python -m code.examples.hepatocyte_examplemamba activate partipy
mamba list --name base | awk '{print $1}' | \
grep -vE '^(#|'"$(paste -sd'|' keep.txt)"')$' \
> remove.txt
python -m code.examples.fibroblast_cross_condition --quickmamba activate partipy
python -m code.examples.overview_figure
python -m code.examples.delta_visualizationIf you use ParTIpy in your work, please cite the following preprint:
@article{schaefer2025partipy,
title = {ParTIpy: A Scalable Framework for Archetypal Analysis and Pareto Task Inference},
author = {Schäfer, Philipp S. L. and Zimmermann, Leoni and Burmedi, Paul L. and Walfisch, Avia and Goldenberg, Noa and Yonassi, Shira and Shaer Tamar, Einat and Adler, Miri and Tanevski, Jovan and Ramirez Flores, Ricardo O. and Saez-Rodriguez, Julio},
year = {2025},
journal = {bioRxiv},
doi = {10.1101/xxxxxx},
}