Skip to main content

De novo sequencing with InstaNovo

Project description

De novo peptide sequencing with InstaNovo

The official code repository for InstaNovo. This repo contains the code for training and inference of InstaNovo and InstaNovo+.

Links:

Graphical Abstract

Developed by: InstaDeep and the Department of Biotechnology and Biomedicine - Technical University of Denmark

Usage

Installation

To use InstaNovo, we need to install the module via pip:

pip install instanovo

Note: InstaNovo is built for Python >= 3.8

Training

To train auto-regressive InstaNovo:

usage: python -m instanovo.transformer.train train_path valid_path [-h] [--config CONFIG] [--n_gpu N_GPU] [--n_workers N_WORKERS]

required arguments:
  train_path        Training data path
  valid_path        Validation data path

optional arguments:
  --config CONFIG   file in configs folder
  --n_workers N_WORKERS

Note: data is expected to be saved as Polars .ipc format. See section on data conversion.

To update the InstaNovo model config, modify the config file under configs/instanovo/base.yaml

Prediction

To evaluate InstaNovo:

usage: python -m instanovo.transformer.predict data_path model_path [-h] [--denovo] [--config CONFIG] [--subset SUBSET] [--knapsack_path KNAPSACK_PATH] [--n_workers N_WORKERS]

required arguments:
  data_path         Evaluation data path
  model_path        Model checkpoint path

optional arguments:
  --denovo          evaluate in de novo mode, will not try to compute metrics
  --output_path OUTPUT_PATH
                    Save predictions to a csv file (required in de novo mode)
  --config CONFIG
                    file in configs folder
  --subset SUBSET
                    portion of set to evaluate
  --knapsack_path KNAPSACK_PATH
                    path to pre-computed knapsack
  --n_workers N_WORKERS

Converting datasets to Polars

To convert a dataset to polars .ipc:

usage: python -m instanovo.utils.convert_ipc source target [-h] [--source_type SOURCE_TYPE] [--max_charge MAX_CHARGE]

required arguments:
  source            source data
  target            target ipc file

optional arguments:
  --source_type SOURCE_TYPE
                    type of input data. currently supports [mgf, csv]
  --max_charge MAX_CHARGE
                    maximum charge to filter

Roadmap

This code repo is currently under construction.

ToDo:

  • Add diffusion model code
  • Add data preprocessing pipeline
  • Add model checkpoints to releases and HuggingFace
  • Add datasets to HuggingFace
  • Multi-GPU support

License

Code is licensed under the Apache License, Version 2.0 (see LICENSE)

The model checkpoints are licensed under Creative Commons Non-Commercial (CC BY-NC-SA 4.0)

BibTeX entry and citation info

@article{eloff_kalogeropoulos_2023_instanovo,
	title = {De novo peptide sequencing with InstaNovo: Accurate, database-free peptide identification for large scale proteomics experiments},
	author = {Kevin Eloff and Konstantinos Kalogeropoulos and Oliver Morell and Amandla Mabona and Jakob Berg Jespersen and Wesley Williams and Sam van Beljouw and Marcin Skwark and Andreas Hougaard Laustsen and Stan J. J. Brouns and Anne Ljungars and Erwin Marten Schoof and Jeroen Van Goey and Ulrich auf dem Keller and Karim Beguir and Nicolas Lopez Carranza and Timothy Patrick Jenkins},
	year = {2023},
	doi = {10.1101/2023.08.30.555055},
	publisher = {Cold Spring Harbor Laboratory},
	URL = {https://www.biorxiv.org/content/10.1101/2023.08.30.555055v1},
	journal = {bioRxiv}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

instanovo-0.1.3.tar.gz (30.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

instanovo-0.1.3-py3-none-any.whl (36.3 kB view details)

Uploaded Python 3

File details

Details for the file instanovo-0.1.3.tar.gz.

File metadata

  • Download URL: instanovo-0.1.3.tar.gz
  • Upload date:
  • Size: 30.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for instanovo-0.1.3.tar.gz
Algorithm Hash digest
SHA256 4a3e65dc4e7843bd0a2659ff074306375ee836c847ee4b37415ec9e184d8c69f
MD5 e727206c92a9cc0a1affa3573fdc9c05
BLAKE2b-256 a52c455872e598ce0ee284f9db076ad971af0f1375b6e5e50a8624feef542b8f

See more details on using hashes here.

File details

Details for the file instanovo-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: instanovo-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 36.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for instanovo-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 353cf5445cbe958a8f811bd085b22bc82d91a1deab1fbb3d1214f332c7c7e896
MD5 eeaebdc1e620a008feb5d93a5fedb4eb
BLAKE2b-256 fe542f3137bc8dfeb7393c9858ad72f1fc8fbad473cd7d2f832e91e38583363f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page