pub fn detect_features(
hills: &[Hill],
config: &FeaturesConfig,
file: &FileConfig,
) -> Vec<Feature>Expand description
Detect isotope features from a list of chromatographic hills.
- Build an m/z-sorted index of the hills.
- Every
(seed hill, charge)pair builds an isotope chain by extending upward only (M+1, M+2, …) with chromatographic-cosine filtering (gated byFeaturesConfig.min_chain_cosine); the seed is the monoisotope hypothesis — seebuild_charge_candidate. - The over-complete candidate pool is resolved non-destructively by
resolve_exhaustive: contested hills are claimed by descending isotope log evidence using each candidate’s best-scoring valid prefix. After a conflict, the best remaining free prefix is requeued at equal or lower priority. - Feature structs are built from the accepted candidates.