DiffNovo
A Transformer-Diffusion Model for De Novo Peptide Sequencing.
DiffNovo is an innovative tool for de novo peptide sequencing using advanced machine learning techniques. This guide will help you get started with installation, dataset preparation, and running key functionalities like model training, evaluation, and prediction.
Ebrahimi, Shiva, et al.'DiffNovo: A Transformer-Diffusion Model for De Novo Peptide Sequencing'
Installation
To manage dependencies efficiently, we recommend using conda. Start by creating a dedicated conda environment:
conda create --name diffnovo_env python=3.10
Activate the environment:
conda activate diffnovo_env
Install DiffNovo and its dependencies via pip:
pip install diffnovo
To verify a successful installation, check the command-line interface:
diffnovo --help
Dataset Preparation
Download DIA Datasets
Annotated DIA datasets can be downloaded from the datasets page. These datasets are essential for running DiffNovo in various modes.
Download Pretrained Model Weights
DiffNovo requires pretrained model weights for predictions in denovo or eval modes. Compatible weights (in .ckpt format) can be found on the pretrained models page.
Specify the model file during execution using the --model parameter.
Usage
Predict Peptide Sequences
DiffNovo predicts peptide sequences from MS/MS spectra stored in MGF files. Predictions are saved as a CSV file:
diffnovo --mode=denovo --model=pretrained_checkpoint.ckpt --peak_path=path/to/spectra.mgf
Evaluate de novo Sequencing Performance
To assess the performance of de novo sequencing against known annotations:
diffnovo --mode=eval --model=pretrained_checkpoint.ckpt --peak_path=path/to/test/annotated_spectra.mgf
Annotations in the MGF file must include peptide sequences in the SEQ field.
Train a New Model
To train a new DiffNovo model from scratch, provide labeled training and validation datasets in MGF format:
diffnovo --mode=train --peak_path=path/to/train/annotated_spectra.mgf --peak_path_val=path/to/validation/annotated_spectra.mgf
MGF files must include peptide sequences in the SEQ field.
Fine-Tune an Existing Model
To fine-tune a pretrained DiffNovo model, set the --train_from_scratch parameter to false:
diffnovo --mode=train --model=pretrained_checkpoint.ckpt \
--peak_path=path/to/train/annotated_spectra.mgf \
--peak_path_val=path/to/validation/annotated_spectra.mgf
For further details, refer to our documentation or raise an issue on our GitHub repository.
Release files for diffnovo 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| diffnovo-0.1.1.tar.gz | 59.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| diffnovo-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 130.2 kB
Release files / diffnovo-0.1.1.tar.gz
| Download URL | diffnovo-0.1.1.tar.gz |
|---|---|
| Size | 59.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4091a95bbf2c7952cf32a756a636005024598220b0ade7cefbe483bb13d0f75e
|
|
BLAKE2b-256 checksum How to use checksums |
25df4006c73cc44181d6a0cf6265e383b45ef0674af11c9fdcacbc433ef2f62a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.11
|
Release files / diffnovo-0.1.1-py3-none-any.whl
| Download URL | diffnovo-0.1.1-py3-none-any.whl |
|---|---|
| Size | 70.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
66b3905ebd9c55beb5cb9fdce21c48cf1711d012c3bea63b9a09eb48b4d858c2
|
|
BLAKE2b-256 checksum How to use checksums |
ae798e94a22cb75d3c025406b565f68dffeab9c2f7db874b993c75e092f71056
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.11
|