Expand description
Fast spectral-library writer: decode Prosit intensity vectors into a DiaNN/
Spectronaut-style transition .tsv in parallel.
The per-peptide decode (PeptideSequence::associate_with_predicted_intensities)
is already a Rust kernel in mscore; the slow part of a Python library builder is
calling it millions of times across the PyO3 boundary and assembling a giant
DataFrame. This does the whole batch in Rust with rayon and streams the rows
straight to disk — turning a multi-hour build into seconds.
The caller (Python) supplies the cheap string columns it already has
(ModifiedPeptide in DiaNN (UniMod:n) form, the stripped PeptideSequence) so
this module needs no mod-notation regex; ordinals come from the fragment ion’s own
amino_acid_count().
Constants§
- LIBRARY_
HEADER - DiaNN/Spectronaut transition columns, in output order.
Functions§
- build_
spectral_ library_ tsv - Decode one batch of peptides (parallel) and write/append their transitions to
out_pathas a DiaNN-style.tsv.