Package: instanovo
De novopeptide sequencing with InstaNovoThe official code repository for InstaNovo. This repo contains the code for training and inference
of InstaNovo and InstaNovo+. InstaNovo is a transformer neural network with the ability to translate
fragment ion peaks into the sequence of amino acids that make up the studied peptide(s). InstaNovo+,
inspired by human intuition, is a multinomial diffusion model that further improves performance by
iterative refinement of predicted sequences.Links:bioRxiv:https://www.biorxiv.org/content/10.1101/2023.08.30.555055v2Developed by:InstaDeepThe Department of Biotechnology and Biomedicine-Technical University of DenmarkUsageInstallationTo use InstaNovo, we need to install the module viapip:pipinstallinstanovoIt is recommended to install InstaNovo in a fresh environment, such as Conda or PyEnv. For example,
if you haveconda/minicondainstalled:condacreate-ninstanovopython=3.8
condaactivateinstanovoNote: InstaNovo is built for Python >= 3.8TrainingTo train auto-regressive InstaNovo:usage:python-minstanovo.transformer.traintrain_pathvalid_path[-h][--configCONFIG][--n_gpuN_GPU][--n_workersN_WORKERS]requiredarguments:train_pathTrainingdatapathvalid_pathValidationdatapath

optionalarguments:--configCONFIGfileinconfigsfolder--n_workersN_WORKERSNote: data is expected to be saved as Polars.ipcformat. See section on data conversion.To update the InstaNovo model config, modify the config file underconfigs/instanovo/base.yamlPredictionTo evaluate InstaNovo:usage:python-minstanovo.transformer.predictdata_pathmodel_path[-h][--denovo][--configCONFIG][--subsetSUBSET][--knapsack_pathKNAPSACK_PATH][--n_workersN_WORKERS]requiredarguments:data_pathEvaluationdatapathmodel_pathModelcheckpointpath

optionalarguments:--denovoevaluateindenovomode,willnottrytocomputemetrics--output_pathOUTPUT_PATHSavepredictionstoacsvfile(requiredindenovomode)--subsetSUBSETportionofsettoevaluate--knapsack_pathKNAPSACK_PATHpathtopre-computedknapsack--n_workersN_WORKERSUsing your own datasetsTo use your own datasets, you simply need to tabulate your data in eitherPandasorPolarswith the following
schema:The dataset is tabular, where each row corresponds to a labelled MS2 spectra.sequence (string) [Optional]The target peptide sequence excluding post-translational modificationsmodified_sequence (string)The target peptide sequence including post-translational modificationsprecursor_mz (float64)The mass-to-charge of the precursor (from MS1)charge (int64)The charge of the precursor (from MS1)mz_array (list[float64])The mass-to-charge values of the MS2 spectrummz_array (list[float32])The intensity values of the MS2 spectrumFor example, the DataFrame for theNine-Species excluding Yeastdataset look as follows:sequencemodified_sequenceprecursor_mzprecursor_chargemz_arrayintensity_array0GRVEGMEARGRVEGMEAR335.5023[102.05527 104.052956 113.07079 ...][ 767.38837 2324.8787 598.8512 ...]1IGEYKIGEYK305.1652[107.07023 110.071236 111.11693 ...][ 1055.4957 2251.3171 35508.96 ...]2GVSREEIQRGVSREEIQR358.5283[103.039444 109.59844 112.08704 ...][801.19995 460.65268 808.3431 ...]3SSYHADEQVNEASKSSYHADEQVNEASK522.2343[101.07095 102.0552 110.07163 ...][ 989.45154 2332.653 1170.6191 ...]4DTFNTSSTSNSTSSSSSNSKDTFNTSSTSN(+.98)STSSSSSNSK676.2823[119.82458 120.08073 120.2038 ...][ 487.86942 4806.1377 516.8846 ...]Forde novoprediction, themodified_sequencecolumn is not required.We also provide a conversion script for converting to Polars IPC binary (.ipc):usage:python-minstanovo.utils.convert_to_ipcsourcetarget[-h][--source_type{mgf,mzml,csv}][--max_chargeMAX_CHARGE][--verbose]positionalarguments:sourcesourcefileorfoldertargettargetipcfiletobesaved

optionalarguments:-h,--helpshowthishelpmessageandexit--source_type{mgf,mzml,csv}typeofinputdata--max_chargeMAX_CHARGEmaximumchargetofilteroutNote: we currently only supportmzml,mgfandcsvconversions.If you want to use InstaNovo for evaluating metrics, you will need to manually set themodified_sequencecolumn after conversion.RoadmapThis code repo is currently under construction.ToDo:Add data preprocessing pipelineMulti-GPU supportLicenseCode is licensed under the Apache License, Version 2.0 (seeLICENSE)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.555055v2},journal={bioRxiv}}