pub fn build_pseudo_spectra_from_pairs(
ms1: &[ClusterResult1D],
ms2: &[ClusterResult1D],
features: &[SimpleFeature],
pairs: &[(usize, usize)],
opts: &PseudoSpecOpts,
) -> Vec<PseudoSpectrum>Expand description
Build pseudo-DDA spectra from:
ms1: MS1 clustersms2: MS2 clustersfeatures: isotopic SimpleFeatures built on MS1pairs: candidate links (ms2_idx, ms1_idx) from your candidate search
Behaviour:
- If
ms1_idxbelongs to a feature, use the feature as the precursor. - Otherwise, use that MS1 cluster as a degenerate “orphan” precursor.
- All MS2 clusters linked to any member (for features) are grouped into one spectrum.
- Fragments are sorted by intensity and capped to
top_n_fragmentsif >0.
This is the DIA→pseudo-DDA “glue” that you can feed into an mzML writer.