partipy
(Pareto Task Inference in Python) provides a scalable and user-friendly implementation of the Pareto Task Inference (ParTI) framework (1, 2, 3, 4) for analyzing functional trade-offs in biological data, particularly in high-throughput single-cell and spatial omics data.
ParTI models gene expression variability within a cell type by capturing functional trade-offs - e.g., glycolysis vs. gluconeogenesis. The framework posits that cells lie along Pareto fronts, where improving one biological task inherently compromises another, forming a functional landscape represented as a polytope. Vertices of this polytope correspond to specialist cells optimized for distinct tasks, while generalists occupy interior regions balancing multiple functions.
To infer this structure, archetypal analysis models each cell as a convex combination of extremal points, called archetypes. These archetypes are constrained to lie within the convex hull of the data, ensuring interpretability and biological plausibility. In contrast to clustering methods that impose hard boundaries, archetypal analysis preserves the continuous nature of gene expression variability and reveals functional trade-offs without artificial discretization.
partipy
integrates with the scverse ecosystem and employs coreset-based optimization for scalability to millions of cells.
For detailed information and example tutorials, please refer to our documentation. Key resources include:
For a deeper dive into the mathematical foundations of archetypal analysis and the implementation of various initialization and optimization algorithms, see the methods section.
You need to have Python 3.10 or newer installed on your system.
There are several alternative options to install partipy
:
- Install the latest stable release from PyPI with minimal dependencies:
pip install partipy
- Install the latest stable full release from PyPI with extra dependencies:
pip install partipy[extra]
- Install the latest development version:
pip install git+https://github.com/saezlab/partipy.git
See the changelog.
If you have any questions or issues, do not hesitate to open an issue.
TBD