An end-to-end scientific machine learning pipeline for mass spectrometry-based proteomics. ProteODE-Net integrates unsupervised denoising, graph-augmented sequence-to-sequence learning, belief propagation graph neural networks, neural ordinary differential equations (Neural ODEs), and regularized optimization to reconstruct peptide sequences, infer protein expression, model phosphorylation dynamics, and reconstruct kinase activity.
[Raw MS/MS Spectra]
│
▼
┌──────────────────────────────────────┐
│ Phase 1: Spectral Denoising Autoencoder│
└──────────────────┬───────────────────┘
│ (Denoised Peaks)
▼
┌──────────────────────────────────────┐
│ Phase 2: Graph-Augmented Pointer │
│ Network Peptide Sequencer │
└──────────────────┬───────────────────┘
│ (De Novo Peptide Sequences)
▼
┌──────────────────────────────────────┐
│ Phase 3: Belief-Propagation Protein │
│ GNN (Peptide-Protein Graph) │
└──────────────────┬───────────────────┘
│ (Inferred Protein Abundances)
▼
┌──────────────────────────────────────┐
│ Phase 4: Attention Neural ODE for │
│ Phosphoproteomics Dynamics │
└──────────────────┬───────────────────┘
│ (Continuous-Time Dynamics)
▼
┌──────────────────────────────────────┐
│ Phase 5: Graph-Regularised Upstream │
│ Kinase Activity Inference │
└──────────────────────────────────────┘
Raw mass spectrometry (MS/MS) data contains thermal noise, isotopic patterns, and baseline artifacts. Phase 1 trains a 1D convolutional denoising autoencoder that reconstructs high-fidelity spectral intensities from raw bins, isolating true peptide fragment peaks.
Peptide sequencing is modelled as a graph-guided autoregressive translation problem. A Graph Neural Network (GNN) encodes fragment ion relationship graphs, and a recurrent Pointer Network decodes the sequence, querying peak graphs and generating amino acid sequences corresponding to the spectra.
Due to shared peptide sequences across protein isoforms, mapping peptides to proteins is ambiguous. Phase 3 constructs a bipartite peptide-protein graph and uses belief propagation (message passing) to infer the true underlying protein abundances from peptide identifications.
Biological systems are continuous-time systems. We use Neural Ordinary Differential Equations parameterised by self-attention blocks to model continuous-time phosphorylation dynamics:
Reconstructs the activity profiles of upstream kinases from downstream substrate dynamics. It combines classical ridge-regression formulation with GNN-based refinement on the kinase-kinase interaction network to ensure biologically plausible activity inferences.
├── configs/
│ └── hyperparams.yaml # Pipeline and training configuration parameters
├── data/
│ ├── processed/ # Curated datasets (phospho timecourse, reference maps)
│ └── synthetic/ # Automatically generated synthetic spectra cache
├── src/
│ ├── __init__.py
│ ├── data_download.py # Scripts to fetch reference data and generate synthetic runs
│ ├── preprocessing.py # Spectral autoencoder model and binning utils
│ ├── pointer_network.py # Graph pointer network sequence decoder
│ ├── protein_inference_gnn.py # Bipartite protein inference GNN and belief-propagation
│ ├── neural_ode_phospho.py # Neural ODE dynamics module
│ ├── kinase_activity.py # Kinase activity inference optimization and GNN refinement
│ ├── training_pipeline.py # Main training pipeline executor coordinating all 5 phases
│ ├── visualization.py # Automated visualization scripts producing figures
│ └── latex_generator.py # Generates a professional publication-quality LaTeX manuscript
├── main.py # Primary pipeline orchestrator script
├── requirements.txt # Python environment dependencies
├── setup.sh # System and Python environment installation script
├── LICENSE # MIT License
└── CONTRIBUTING.md # Code contribution guidelines
- Operating System: macOS or Linux
- Python: Python 3.8 or higher
- LaTeX (Optional): A LaTeX engine (e.g.,
xelatexfrom TeX Live or MacTeX) is required if you want the pipeline to auto-generate the academic manuscript PDF.- macOS: MacTeX (installed via
brew install --cask mactex-no-gui) - Linux:
sudo apt-get install texlive-xetex texlive-fonts-recommended texlive-latex-extra latexmk
- macOS: MacTeX (installed via
-
Clone the Repository:
git clone https://github.com/<your-username>/ProteODE-Net.git cd ProteODE-Net
-
Execute the Setup Script: Run the setup script which will automatically create the directory structure, initialize a virtual environment, upgrade package managers, install Python dependencies, install VS Code extension suggestions (if using VS Code), and run self-checks:
chmod +x setup.sh ./setup.sh
-
Activate the Environment:
source .venv/bin/activate
You can run the entire pipeline end-to-end via main.py. This script automatically handles synthetic data preparation, progressive phase training, visualization, and manuscript compilation.
Run with default configuration and automatic device detection (CUDA, MPS, or CPU):
python main.pySpecify a custom hyperparameters YAML file:
python main.py --config configs/hyperparams.yamlEvaluate up to
python main.py --max-configs 3If you do not have LaTeX installed or want to speed up run times, you can skip those steps:
python main.py --skip-latex --skip-vizThis project is licensed under the MIT License. Contributions are freely welcomed and will be licensed under the same terms. See LICENSE for more details.