A high-performance Rust engine for building and searching databases of enzymatically digested proteins
DigestedRust is a Rust implementation of DigestedProteinDB. It builds a peptide index from UniProtKB entries digested in silico and retrieves candidate peptides by precursor mass. We developed it for databases the size of the complete UniProtKB/TrEMBL release, where memory use and query time become the limiting factors.
The original Java implementation is still available and is sufficient for smaller databases and for testing. DigestedRust can be run from the command line, called from Python, or included in other software. The source code is available under the AGPL-3.0 licence on GitHub.
Returns all peptides within a given precursor mass window, together with the UniProt accession and NCBI taxonomy ID of the source protein.
Indexes can be built for selected organisms or taxonomic groups, with a chosen enzyme, number of missed cleavages and peptide length range.
The digest is not loaded into memory. The index is kept on disk in RocksDB, so memory use stays low even for TrEMBL-sized databases.
The massq search tool and the database build steps run from
the command line and can be used in scripts or HPC batch jobs.
The search core is a Rust library and can be integrated into other proteomics software or web services.
massq_py)
The massq_py module keeps the database open between queries, which avoids
repeated start-up cost in web applications. The GIL is released during the
scan, so queries can run in parallel threads.
The values below were measured on the largest database we have built so far, the complete UniProtKB/TrEMBL release 2026_01. Results for smaller databases will be added later.
| Database version | UniProtKB/TrEMBL (Release 2026_01) |
| Taxonomic scope | All organisms (no taxonomic restriction) |
| Scale | 202.55 million proteins / 17.20 billion peptides |
| Digestion parameters |
Enzyme: Trypsin Missed cleavages: up to 2 Peptide length: 6–50 amino acids |
| Query time | approx. 150 ms average time per mass-range query |
| Disk size | approx. 255 GB (Snappy/Zstd compression, 5-bit amino acid encoding) |
| Memory use | approx. 316 MB peak RAM (out-of-core indexing) |
| Storage | RocksDB key-value store |
Search of the TrEMBL database for peptides with a monoisotopic mass between 1800.0000 and 1800.0002 Da.
user@proteomics-hpc:~$ massq 1800.0000 1800.0002 --db-path ./uniprot_trembl_db # Mass Peptide Accession TaxID 1 1800.0001 AGASCPICKKEIQLVIK Q2HJ21 9913 AGASCPICKKEIQLVIK O15151 9606 AVARMSVLSELCLPLAK Q1WRS8 362948 GGKGDLCIVLNVLLMQK Q83NI2 218496 GGKGDLCIVLNVLLMQK Q83MZ4 203267 GLMPLGITDEIRKMVK A2RMH5 416870 GLMPLGITDEIRKMVK Q02XB8 272622 ILMGASVGIPASSLCIIR Q92275 5334 KGQIVMTSDKPPKMLK A0RLX8 360106 KTMPLILSGVDVVAMAR O49289 3702 MIPMIVLATTNQNKVK Q6AQD7 177439 ... (1118 additional entries) ... 2 1800.0002 VEEIYEDDEMNT A0A1Y2ULM3 9606 CHGWGGCHHIR A0A8R8NSG9 10090 ... (2394 additional entries) ... ... [SUCCESS] Found 239 peptides matching criteria. Execution time: 469.129µs user@proteomics-hpc:~$ _
massq_py)The database should be opened once, when the application starts, and the same object reused for all queries, so that the block cache stays in memory. Build instructions and an example Django integration are given in the README.
from massq_py import MassqDb db = MassqDb( db_path="/path/to/db/rocksdb", block_cache_gb=8, with_taxonomy=True, ) count = db.count_range(1000.0, 1001.0) json_str = db.search_json(1000.0, 1001.0) # [{"mass": 1000.1234, "peptide": "PEPTIDE", "accession": "P12345", "tax_id": 9606, "species": "Homo sapiens"}, ...]
The diagram shows the two parts of the workflow. On the left is database construction: UniProtKB entries are digested in silico, and the resulting peptides are encoded and written to a RocksDB index. On the right is the search: an experimental precursor mass range is looked up in the index and the matching peptides are returned.
Binaries and Python wheels are available from GitHub Releases. Pre-built databases will be provided later.
The massq search tool and the database build
tools for Linux (x86_64, aarch64), macOS and Windows, and massq_py
wheels for Python.
tar -xzf digested-rust-<version>-linux-x86_64.tar.gz ./digested-rust-<version>-linux-x86_64/massq --help pip install massq_py-*.whl
Complete UniProtKB/TrEMBL 2026_01 digest (trypsin, up to 2 missed cleavages), approx. 255 GB.
Both implementations are open source. They differ mainly in the database size they are intended for.
massq_py)Bug reports and suggestions can be submitted as GitHub issues, and pull requests are welcome. If you need a database built for a specific organism or set of parameters, or are interested in collaboration, please contact us by e-mail.
DigestedRust is released under the GNU AGPL-3.0 licence.