MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / annotate

Method annotate

src/openms_gui/source/VISUAL/LayerDataBase.cpp:59–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57 }
58
59 bool LayerDataBase::annotate(const vector<PeptideIdentification>& identifications,
60 const vector<ProteinIdentification>& protein_identifications)
61 {
62 IDMapper mapper;
63 if (auto* lp = dynamic_cast<LayerDataPeak*>(this))
64 {
65 Param p = mapper.getDefaults();
66 p.setValue("rt_tolerance", 0.1, "RT tolerance (in seconds) for the matching");
67 p.setValue("mz_tolerance", 1.0, "m/z tolerance (in ppm or Da) for the matching");
68 p.setValue("mz_measure", "Da", "unit of 'mz_tolerance' (ppm or Da)");
69 mapper.setParameters(p);
70 mapper.annotate(*lp->getPeakDataMuteable(), identifications, protein_identifications, true);
71 }
72 if (auto* lp = dynamic_cast<LayerDataFeature*>(this))
73 {
74 mapper.annotate(*lp->getFeatureMap(), identifications, protein_identifications);
75 }
76 else if (auto* lp = dynamic_cast<LayerDataConsensus*>(this))
77 {
78 mapper.annotate(*lp->getConsensusMap(), identifications, protein_identifications);
79 }
80 else
81 {
82 return false;
83 }
84
85 return false;
86 }
87
88
89 float LayerDataBase::getMinIntensity() const

Callers 2

annotateWorker_Method · 0.45
addDataFileMethod · 0.45

Calls 3

getDefaultsMethod · 0.80
setParametersMethod · 0.80
setValueMethod · 0.45

Tested by

no test coverage detected