![]() |
OpenMS
|
Post-scoring step of the OpenNuXL pipeline: annotates fragment-ion peaks of each candidate hit and localises the NA cross-link to a residue. More...
#include <OpenMS/ANALYSIS/NUXL/NuXLAnnotateAndLocate.h>
Static Public Member Functions | |
| static void | annotateAndLocate_ (const PeakMap &exp, std::vector< std::vector< NuXLAnnotatedHit > > &annotated_hits, const NuXLModificationMassesResult &mm, const ModifiedPeptideGenerator::MapToResidueType &fixed_modifications, const ModifiedPeptideGenerator::MapToResidueType &variable_modifications, Size max_variable_mods_per_peptide, double fragment_mass_tolerance, bool fragment_mass_tolerance_unit_ppm, const NuXLParameterParsing::PrecursorsToMS2Adducts &all_feasible_adducts) |
Annotate every candidate hit in annotated_hits and localise the NA cross-link site. | |
Post-scoring step of the OpenNuXL pipeline: annotates fragment-ion peaks of each candidate hit and localises the NA cross-link to a residue.
Consumes the per-scan vectors of NuXLAnnotatedHit produced upstream by the OpenNuXL search, reconstructs each hit's fully-modified peptide sequence, generates the theoretical fragment spectrum (b/a/y ions plus precursor + immonium variants), aligns it against the experimental spectrum, and writes the alignment results plus a per-residue localisation score back into the hit. Single-purpose helper class — only the static annotateAndLocate_ entry point is exposed.
|
static |
Annotate every candidate hit in annotated_hits and localise the NA cross-link site.
Iterates over annotated_hits in parallel (OpenMP parallel for over the scan dimension). For each non-empty annotated_hits[scan_index]:
PeakSpectrum and its first precursor charge from exp[scan_index].a: a.sequence's fully-modified form by reapplying ModifiedPeptideGenerator::applyFixedModifications and ModifiedPeptideGenerator::applyVariableModifications (the upstream search only stored modification indices to save memory) and selects the entry at a.peptide_mod_index.mm via a.NA_mod_index (using the first entry of the composition set at that key).add_first_prefix_ion, add_metainfo, add_a_ions, add_b_ions, add_y_ions enabled; add_c_ions, add_x_ions, add_z_ions, add_internal_fragments, add_abundant_immonium_ions, add_all_precursor_charges disabled — the latter two are added manually).fragment_mass_tolerance (in ppm when fragment_mass_tolerance_unit_ppm is true, else Da), with charge matching enforced.all_feasible_adducts).best_localization string, and stores the last-tied position in best_localization_position (the cpp's "Note: check if there are
situations where multiple have the same score" caveat applies — ties resolve to the last index, not the first).localization_scores (comma-separated "0..100" percentages), best_localization, best_localization_score, and best_localization_position back into the hit.All output goes into annotated_hits — no exceptions are thrown by this function; malformed alignments emit OPENMS_LOG_WARN. Hits whose first precursor adduct cannot be resolved fall back to an unmodified-sequence localisation (best_localization == unmodified_sequence, best_localization_score = 0).
The trailing underscore on the method name is a historical artefact from the OpenNuXL feature branch; the entry point is still public.
| [in] | exp | MS2 experiment whose spectra are aligned against the theoretical spectra of the candidate hits. |
| [in,out] | annotated_hits | Per-scan vectors of candidate hits to annotate and localise in place. |
| [in] | mm | Precursor-adduct mass table (see NuXLModificationsGenerator::initModificationMassesNA); indexed by NuXLAnnotatedHit::NA_mod_index. |
| [in] | fixed_modifications | Cached fixed-modification table consumed by ModifiedPeptideGenerator. |
| [in] | variable_modifications | Cached variable-modification table consumed by ModifiedPeptideGenerator. |
| [in] | max_variable_mods_per_peptide | Cap on the number of variable modifications placed per peptide. |
| [in] | fragment_mass_tolerance | Half-width of the fragment-alignment tolerance window. |
| [in] | fragment_mass_tolerance_unit_ppm | Interpret fragment_mass_tolerance as ppm (true) or Da (false). |
| [in] | all_feasible_adducts | Per-precursor-adduct fragment-adduct definitions used to generate marker and shifted immonium ions. |