Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Metabolomic profiling of cassava and cocoyam during fermentation

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.

Repository contents

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.

Data availability

The processed input data is bundled with this repository under data/:

  • data/processed_data/b3_cassavaonly_biot/ and data/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/ and data/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.

Reproducing the analysis

Requires Python 3.12 or later and Java (for BioTransformer).

python -m venv venv
source venv/bin/activate
pip install -r requirements.txt

1. 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:

  1. Point the process_data notebooks at the Round 1 directories and run them to generate data/biotransformer/b3_{batch}_compounds_for_biotransformer.csv.
  2. 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
  1. Load the predicted SMILES from results/biotransformer/{batch}/biotransformer_3step_predictions.csv into SIRIUS as a custom structure database, re-run SIRIUS/CSI:FingerID, and place the new outputs in data/processed_data/{batch}_biot/. Re-run the process_data notebooks to produce the final annotations. Features matched to BioTransformer-predicted structures appear with names prefixed BT_env_step* or BT_hgut_step*.

2. Class-level significance

python scripts/compute_class_significance.py

This computes Mann-Whitney U + BH-FDR for every NPC and ClassyFire chemical class across both tubers and writes:

  • results/canopus_npc_significance.csv
  • results/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/.

External tools

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

Citation details will be added upon publication.

About

South African cassava and cocoyam fermentation study

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages