This repository contains the code and analysis pipeline for an LC-MS/MS metabolomics study comparing cassava (Manihot esculenta) and cocoyam (Colocasia esculenta) tubers under control (unfermented) and fermented conditions. Three biological replicates were analyzed per condition.
notebooks/ Analysis and figure generation
├── process_data_cassava.ipynb Data integration pipeline (cassava)
├── process_data_cocoyam.ipynb Data integration pipeline (cocoyam)
├── figure1.ipynb PCA and volcano plots
├── figure2.ipynb Chemical class distributions (violin and lollipop plots)
├── figure3.ipynb UpSet plots and annotation overlap
├── figure5.ipynb Pathway enrichment bubble plots (Mummichog)
└── supplemental_figures.ipynb Cyanogenic glycoside boxplots and NPC significance
scripts/
├── biotransformer_sirius.py BioTransformer parallel processing
└── compute_class_significance.py Class-level Mann-Whitney U + BH-FDR (NPC and ClassyFire)
data/
├── processed_data/
│ ├── b3_cassavaonly/ SIRIUS/CANOPUS/GNPS outputs (Round 1, pre-BioTransformer) (cassava)
│ ├── b3_cassavaonly_biot/ SIRIUS/CANOPUS/GNPS outputs (Round 2, post-BioTransformer) + Mummichog results (cassava)
│ ├── b3_cocoyamonly/ SIRIUS/CANOPUS/GNPS outputs (Round 1, pre-BioTransformer) (cocoyam)
│ └── b3_cocoyamonly_biot/ SIRIUS/CANOPUS/GNPS outputs (Round 2, post-BioTransformer) + Mummichog results (cocoyam)
└── biotransformer/ Compound lists used as input to BioTransformer
results/ Generated by the notebooks (not deposited)
figures/ Publication-ready figures (PNG and SVG, not deposited)
Figure 4 (molecular network visualization) was generated in Cytoscape and is not reproduced by this code.
The processed input data is bundled with this repository under data/:
data/processed_data/b3_cassavaonly_biot/anddata/processed_data/b3_cocoyamonly_biot/— Round 2 (post-BioTransformer) SIRIUS/CANOPUS/GNPS outputs plus Mummichog results. All figures and downstream statistics in this repository run against these Round 2 files.data/processed_data/b3_cassavaonly/anddata/processed_data/b3_cocoyamonly/— Round 1 (pre-BioTransformer) SIRIUS/CANOPUS/GNPS outputs, provided solely for reproducibility so a user who wants to re-run the upstream BioTransformer annotation loop can do so from scratch. Reproducing the figures does not require touching the Round 1 data.data/biotransformer/— the compound lists used as input to BioTransformer.
Raw LC-MS/MS files and upstream MZmine feature-detection outputs are not included in this repository; deposition details for those will be added prior to publication. Files in results/ and figures/ are generated by running the notebooks and scripts and are not committed.
Requires Python 3.12 or later and Java (for BioTransformer).
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt1. Data integration
Run process_data_cassava.ipynb and process_data_cocoyam.ipynb. These merge the deposited SIRIUS/CANOPUS/GNPS annotations with quantified features, normalize by sample weight, impute missing values, and compute FDR-corrected differential abundance statistics. The notebooks read from the Round 2 (post-BioTransformer) directories data/processed_data/b3_*_biot/ — these are the final annotations used by every figure and statistical analysis in the paper. Outputs are written to results/.
The remainder of this section is only relevant if you want to re-run the upstream BioTransformer annotation loop from scratch. It is not required to reproduce any figure. The Round 1 (pre-BioTransformer) SIRIUS/CANOPUS/GNPS outputs deposited in data/processed_data/b3_*only/ are the inputs for this loop:
- Point the process_data notebooks at the Round 1 directories and run them to generate
data/biotransformer/b3_{batch}_compounds_for_biotransformer.csv. - Download BioTransformer 3.0 from https://bitbucket.org/wishartlab/biotransformer3.0jar and run:
python scripts/biotransformer_sirius.py --batch b3_cassavaonly --bt-dir /path/to/biotransformer
python scripts/biotransformer_sirius.py --batch b3_cocoyamonly --bt-dir /path/to/biotransformer- Load the predicted SMILES from
results/biotransformer/{batch}/biotransformer_3step_predictions.csvinto SIRIUS as a custom structure database, re-run SIRIUS/CSI:FingerID, and place the new outputs indata/processed_data/{batch}_biot/. Re-run the process_data notebooks to produce the final annotations. Features matched to BioTransformer-predicted structures appear with names prefixedBT_env_step*orBT_hgut_step*.
2. Class-level significance
python scripts/compute_class_significance.pyThis computes Mann-Whitney U + BH-FDR for every NPC and ClassyFire chemical class across both tubers and writes:
results/canopus_npc_significance.csvresults/classyfire_significance.csv
These CSVs are consumed by figure2.ipynb and supplemental_figures.ipynb.
3. Figure generation
Run figure1.ipynb through figure5.ipynb, then supplemental_figures.ipynb.
Notebooks expect data files in data/ and write outputs to results/ and figures/separate_treatment/.
The following tools were used upstream of this repository to generate the input data:
| Tool | Purpose |
|---|---|
| SIRIUS / CANOPUS | Molecular formula prediction, structure annotation, chemical classification |
| GNPS | Spectral library matching + Feature Based Molecular Networking |
| Mummichog | Pathway enrichment from m/z feature lists |
| BioTransformer 3.0 | Metabolic transformation prediction |
| Cytoscape | Molecular network visualization (Figure 4) |
Citation details will be added upon publication.