Skip to content

Repository files navigation

ProteODE-Net: De Novo Proteomics Pipeline

Python 3.8+ PyTorch License: MIT PRs Welcome

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       │
           └──────────────────────────────────────┘

Pipeline Stages

1. Spectral Denoising Autoencoder (Unsupervised)

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.

2. Graph-Augmented Pointer Network (Supervised Seq2Seq)

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.

3. Belief-Propagation Protein GNN (Semi-Supervised)

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.

4. Attention Neural ODE (Temporal Dynamics)

Biological systems are continuous-time systems. We use Neural Ordinary Differential Equations parameterised by self-attention blocks to model continuous-time phosphorylation dynamics: $$\frac{d\mathbf{z}(t)}{dt} = f_{\theta}(\mathbf{z}(t), t)$$ This model captures non-linear phosphorylation cascades and handles irregularly sampled timecourse measurements.

5. Graph-Regularised Kinase Activity Inference

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.


Repository Structure

├── 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

Prerequisites

System Requirements

  • Operating System: macOS or Linux
  • Python: Python 3.8 or higher
  • LaTeX (Optional): A LaTeX engine (e.g., xelatex from 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

Installation & Setup

  1. Clone the Repository:

    git clone https://github.com/<your-username>/ProteODE-Net.git
    cd ProteODE-Net
  2. 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
  3. Activate the Environment:

    source .venv/bin/activate

Usage

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 End-to-End Pipeline

Run with default configuration and automatic device detection (CUDA, MPS, or CPU):

python main.py

Run Custom Configuration

Specify a custom hyperparameters YAML file:

python main.py --config configs/hyperparams.yaml

Evaluate Multiple Configurations (Hyperparameter Search)

Evaluate up to $N$ configurations sequentially:

python main.py --max-configs 3

Disable Visualisation or LaTeX Generation

If you do not have LaTeX installed or want to speed up run times, you can skip those steps:

python main.py --skip-latex --skip-viz

License

This project is licensed under the MIT License. Contributions are freely welcomed and will be licensed under the same terms. See LICENSE for more details.

About

No description, website, or topics provided.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages