API Reference#
PEACH provides a scVerse-compatible API with three main modules:
Preprocessing functions for archetypal analysis. |
|
Tools for archetypal analysis. |
|
Plotting functions for archetypal analysis. |
Preprocessing (pp)#
|
Load AnnData for archetypal analysis. |
|
Generate synthetic convex data for testing. |
|
Create DataLoader from AnnData for training with HPC optimizations. |
|
Load pathway networks from MSigDB or OmniPath. |
|
Compute pathway activity scores using MSigDB pathways. |
Tools (tl)#
Training & Coordinates
|
Train Deep Archetypal Analysis model to discover cellular archetypes. |
|
Perform cross-validation hyperparameter search for archetypal analysis. |
|
Extract archetypal coordinates for all cells. |
|
Assign cells to archetypes based on distances. |
|
Extract cell archetype weights from trained Deep_AA model. |
Compute centroid positions in PCA space for each level of a categorical condition. |
|
|
Assign cells to nearest centroid based on distance (top bin_prop% closest). |
Statistical Analysis
|
Test gene expression associations with archetypal assignments. |
|
Test pathway activity associations with archetypal assignments. |
|
Test associations between archetypes and categorical metadata. |
Pattern Analysis
|
Comprehensive archetypal pattern analysis. |
|
Identify features exclusively high in single archetypes. |
|
Identify specialization features relative to centroid archetype. |
|
Identify mutual exclusivity and tradeoff patterns. |
CellRank Integration
|
Set up CellRank workflow for archetypal or centroid-based trajectory analysis. |
Convert fate probabilities to lineage-specific pseudotimes. |
|
|
Identify genes driving commitment to a specific lineage. |
Compute frequency of transitions between archetypal states. |
|
|
Analyze single archetype-to-archetype trajectory. |
Plotting (pl)#
Core Visualizations
|
Visualize cells in 3D archetypal coordinate space. |
|
Compare multiple archetypal analysis fits in 3D PCA space. |
|
Visualize training metrics over epochs. |
|
Plot elbow curves for hyperparameter selection. |
Archetype Analysis
|
Visualize archetype positions in PCA space with distance matrix. |
|
Visualize archetype positions in 3D PCA space. |
|
Compute and display statistics about archetype positions. |
|
Create dotplot visualization for statistical results. |
Pattern Visualization
|
Create dotplot for pattern analysis results. |
|
Create summary barplot showing pattern counts across different analyses. |
|
Create heatmap showing pattern expression across archetypes. |
Trajectory Analysis
|
Plot fate probabilities on embedding. |
|
Plot heatmap of top driver genes for a lineage. |
Configuration#
|
Configuration for hyperparameter search space and CV settings. |