Proteomics search engine written in Rust

46 points Glittering_Half5403

This project is probably a little bit out of scope for r/rust, but I thought there might be some interest in seeing a new scientific computing application written in Rust!

MS-based proteomics experiments seek to identify the proteins in a complex sample (i.e. cancer cells, tissues, drug-target identification) by searching mass spectra. Proteins are made up of peptides (polymers of amino acids) that fragment into distinct & generally predictable patterns based on their chemical masses. By performing in silico digests of all theoretically observable peptides, software tools can deconvolute the raw mass spectra into peptide/protein identifications.

​

Figure demonstrating a typical workflow for proteomics database searching

The most popular tools in the proteomics field for performing these database searches are closed source. I found this trend of continued reliance on proprietary software disappointing, so I set out to write a new free & open source (MIT licensed) tool in Rust.

Sage is a proteomics search engine \- it transforms raw mass spectra into peptide identifications via efficient database searching. It's (to my knowledge) currently the fastest proteomics search engine (5x to 1000x faster than proprietary competitors), and designed to be "cloud-native" (can read/write compressed data from bulk object storage). Where commercial software from Thermo Scientific (the instrument manufacturer) might take > 24 hours to run a search on 200 GB of mass spectra, Sage can complete the same search in < 15 minutes - and identify substantially more peptides.

You can also check out the intro blog post if you're interesting in learning more about the algorithm behind Sage. Beyond being fast, it also includes integrated machine learning (linear discriminant analysis, KDE) for rescoring spectral matches.

Rust is a fantastic language for writing scientific software (I've been writing Rust for \~5 years) - the emphasis on speed & correctness make it a perfect fit. Rayon, in particular, makes it super easy to parallelize!