diff --git a/src-tauri/src/render.rs b/src-tauri/src/render.rs index 69d36b5..a4b483f 100644 --- a/src-tauri/src/render.rs +++ b/src-tauri/src/render.rs @@ -369,9 +369,17 @@ fn spectrum_graph( fn get_classes(annotations: &[Fragment]) -> String { let mut output = Vec::new(); let mut shared_ion = annotations.get(0).map(|a| a.ion.to_string()); + let mut first_peptide_index = None; for annotation in annotations { output.push(annotation.ion.label().to_string()); output.push(format!("p{}", annotation.peptide_index)); + if let Some(num) = first_peptide_index { + if num != annotation.peptide_index { + output.push("mp".to_string()); + } + } else { + first_peptide_index = Some(annotation.peptide_index); + } if let Some(pos) = annotation.ion.position() { output.push(format!( "p{}-{}", @@ -670,13 +678,15 @@ fn create_ion_legend(output: &mut String, id: &str) { v
- Precursor - Multi + Precursor + Multi Other
- - + + + +