| 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 |
no test coverage detected