MicroFRP is a Snakemake pipeline for assigning microbial functional roles from SPIRE studies using genome-scale reconstructions, community simulations, and interaction scoring.
It downloads MAGs for a SPIRE item, reconstructs metabolic models with gapseq, simulates communities with MICOM, and derives functional role metrics (exchange tendency, cooperation alignment, provisioning bias, and interaction synergy).
- Linux (the Pixi environment is pinned to
linux-64) - Pixi for environment management
- Gurobi and CPLEX licenses available at runtime (required by MICOM/optimization)
- Network access to SPIRE endpoints for study metadata and MAG downloads
Install the environment:
pixi installRun commands via Pixi:
pixi run snakemake --cores 24Edit config/config.yaml to target a specific SPIRE study and tune simulation settings:
item: SPIRE item ID (e.g.Lloyd-Price_2019_HMP2IBD)reconstruction_tool: reconstruction backend (carveorgapseq)tradeoff: MICOM tradeoff valuegrowth_media: CSV defining the growth mediumgapseq_medium: optional gapseq medium argument (only used whenreconstruction_toolisgapseq; empty string uses gapseq defaults)
The default growth medium is config/western_diet_gut.csv.
From the repository root:
pixi run snakemake --cores 24This targets the top-level rule and will:
- Fetch SPIRE samples/MAGs for the configured item.
- Reconstruct MAG models with gapseq.
- Build and simulate community models with MICOM.
- Compute functional role scores and classifications.
Key outputs are written to results/:
results/combined_scores.tsv: numeric scores for each functional role metricresults/functional_roles.tsv: combined classifications and functional role vectors
Intermediate artifacts are stored in intermediate_outputs/ and downloaded MAGs in external_data/.
Run a dry run of the workflow:
pixi run testMIT License. See LICENSE.