pub fn find_unimod_patterns(input_string: &str) -> (String, Vec<f64>)
Expand description
Convert a peptide sequence with UNIMOD annotations to a tuple of plain sequence and for each position in the sequence, the mass of the modification at that position (0 if no modification), which is the representation of sequence nad modifications used by SAGE
§Arguments
input_string
- a string slice of the peptide sequence
§Returns
(String, Vec<f64>)
- a tuple of the plain sequence and a vector of f64 representing the mass of the modification at each position in the sequence
§Example
use rustms::chemistry::utility::find_unimod_patterns;
let sequence = "PEPTIDE[UNIMOD:1]H";
let (stripped_sequence, mods) = find_unimod_patterns(sequence);
assert_eq!(stripped_sequence, "PEPTIDEH");
assert_eq!(mods, vec![0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 42.010565, 0.0]);