OpenMS
Loading...
Searching...
No Matches
TargetedExperimentHelper.h
Go to the documentation of this file.
1// Copyright (c) 2002-present, OpenMS Inc. -- EKU Tuebingen, ETH Zurich, and FU Berlin
2// SPDX-License-Identifier: BSD-3-Clause
3//
4// --------------------------------------------------------------------------
5// $Maintainer: Timo Sachsenberg $
6// $Authors: Andreas Bertsch $
7// --------------------------------------------------------------------------
8
9#pragma once
10
12
16
23
24#include <functional>
25
26namespace OpenMS
27{
28
35 namespace TargetedExperimentHelper
36 {
37
39 public CVTermList
40 {
41 std::string contact_ref;
42 std::string instrument_ref;
43 std::vector<CVTermList> validations;
44 };
45
46 struct CV
47 {
48 CV(const std::string & new_id, const std::string & new_fullname, const std::string & new_version, const std::string & new_URI) :
49 id(new_id),
50 fullname(new_fullname),
51 version(new_version),
52 URI(new_URI)
53 {
54
55 }
56
57 std::string id;
58 std::string fullname;
59 std::string version;
60 std::string URI;
61
62 bool operator==(const CV & cv) const
63 {
64 return id == cv.id &&
65 fullname == cv.fullname &&
66 version == cv.version &&
67 URI == cv.URI;
68 }
69
70 };
71
72 struct Protein :
73 public CVTermList
74 {
75 Protein() = default;
76 bool operator==(const Protein& rhs) const
77 {
78 return CVTermList::operator==(rhs) &&
79 id == rhs.id &&
80 sequence == rhs.sequence;
81 }
82
83 std::string id;
84 std::string sequence;
85
86 };
87
98 class OPENMS_DLLAPI RetentionTime :
100 {
101public:
102
103 enum class RTUnit : std::int8_t
104 {
105 SECOND = 0,
106 MINUTE,
107 UNKNOWN,
108 SIZE_OF_RTUNIT
109 };
110
111 enum class RTType : std::int8_t
112 {
113 LOCAL = 0,
114 NORMALIZED,
115 PREDICTED,
116 HPINS,
117 IRT,
118 UNKNOWN,
119 SIZE_OF_RTTYPE
120 };
121
124 software_ref(""),
125 retention_time_unit(RTUnit::SIZE_OF_RTUNIT),
126 retention_time_type(RTType::SIZE_OF_RTTYPE),
127 retention_time_set_(false),
128 retention_time_(0.0)
129 // retention_time_width(0.0),
130 // retention_time_lower(0.0),
131 // retention_time_upper(0.0)
132 {
133 }
134
135 RetentionTime(const RetentionTime &) = default;
137 virtual ~RetentionTime() = default;
138 RetentionTime & operator=(const RetentionTime &) & = default;
140
141 bool operator==(const RetentionTime & rhs) const
142 {
143 return CVTermListInterface::operator==(rhs) &&
144 software_ref == rhs.software_ref &&
145 retention_time_unit == rhs.retention_time_unit &&
146 retention_time_type == rhs.retention_time_type &&
147 retention_time_set_ == rhs.retention_time_set_ &&
148 retention_time_ == rhs.retention_time_;
149 }
150
151 bool isRTset() const
152 {
153 return retention_time_set_;
154 }
155 void setRT(double rt)
156 {
157 retention_time_ = rt;
158 retention_time_set_ = true;
159 }
160 double getRT() const
161 {
162 OPENMS_PRECONDITION(isRTset(), "RT needs to be set")
163 return retention_time_;
164 }
165
166 std::string software_ref;
169
170private:
171
174 // double retention_time_width;
175 // double retention_time_lower;
176 // double retention_time_upper;
177 };
178
184 class OPENMS_DLLAPI PeptideCompound :
185 public CVTermList
186 {
187public:
188 PeptideCompound() = default;
191 PeptideCompound & operator=(const PeptideCompound &) & = default;
193
194 bool operator==(const PeptideCompound & rhs) const
195 {
196 return CVTermList::operator==(rhs) &&
197 rts == rhs.rts &&
198 id == rhs.id &&
199 charge_ == rhs.charge_ &&
200 charge_set_ == rhs.charge_set_;
201 }
202
204 void setChargeState(int charge)
205 {
206 charge_ = charge;
207 charge_set_ = true;
208 }
209
211 bool hasCharge() const
212 {
213 return charge_set_;
214 }
215
217 int getChargeState() const
218 {
219 OPENMS_PRECONDITION(charge_set_, "Cannot return charge which was never set")
220 return charge_;
221 }
222
224 void setDriftTime(double dt)
225 {
226 drift_time_ = dt;
227 }
228
230 double getDriftTime() const
231 {
232 return drift_time_;
233 }
234
236
238 bool hasRetentionTime() const
239 {
240 return (!rts.empty() && rts[0].isRTset());
241 }
242
247 double getRetentionTime() const
248 {
249 if (!hasRetentionTime())
250 {
251 throw Exception::IllegalArgument(__FILE__, __LINE__, OPENMS_PRETTY_FUNCTION,
252 "No retention time information available");
253 }
254 return rts[0].getRT();
255 }
256
259 {
260 if (!hasRetentionTime())
261 {
262 throw Exception::IllegalArgument(__FILE__, __LINE__, OPENMS_PRETTY_FUNCTION,
263 "No retention time information available");
264 }
265 return rts[0].retention_time_type;
266 }
267
270 {
271 if (!hasRetentionTime())
272 {
273 throw Exception::IllegalArgument(__FILE__, __LINE__, OPENMS_PRETTY_FUNCTION,
274 "No retention time information available");
275 }
276 return rts[0].retention_time_unit;
277 }
279
280 std::string id;
281 std::vector<RetentionTime> rts;
282
283protected:
284 int charge_{0};
285 bool charge_set_{false};
286 double drift_time_{-1};
287 };
288
295 class OPENMS_DLLAPI Compound :
296 public PeptideCompound
297 {
298public:
299
301 theoretical_mass(0.0)
302 {
303 }
304
305 Compound(const Compound &) = default;
306 Compound(Compound &&) noexcept = default;
307 Compound & operator=(const Compound &) & = default;
308 Compound & operator=(Compound &&) & = default;
309
310 bool operator==(const Compound & rhs) const
311 {
312 return PeptideCompound::operator==(rhs) &&
313 molecular_formula == rhs.molecular_formula &&
314 smiles_string == rhs.smiles_string &&
315 theoretical_mass == rhs.theoretical_mass;
316 }
317
318 std::string molecular_formula;
319 std::string smiles_string;
321
322protected:
323
324 };
325
332 class OPENMS_DLLAPI Peptide :
333 public PeptideCompound
334 {
335public:
338 {
343
346 location(-1),
347 unimod_id(-1)
348 {
349 }
350
351 };
352
353 Peptide() = default;
354 Peptide(const Peptide &) = default;
355 Peptide(Peptide &&) noexcept = default;
356 Peptide & operator=(const Peptide &) & = default;
357 Peptide & operator=(Peptide &&) & = default;
358
359 bool operator==(const Peptide & rhs) const
360 {
361 return PeptideCompound::operator==(rhs) &&
362 protein_refs == rhs.protein_refs &&
363 evidence == rhs.evidence &&
364 sequence == rhs.sequence &&
365 mods == rhs.mods &&
366 peptide_group_label_ == rhs.peptide_group_label_;
367 }
368
380 void setPeptideGroupLabel(const std::string & label)
381 {
382 peptide_group_label_ = label;
383 }
384
386 std::string getPeptideGroupLabel() const
387 {
388 return peptide_group_label_;
389 }
391
392 std::vector<std::string> protein_refs;
394 std::string sequence;
395 std::vector<Modification> mods;
396
397protected:
399 };
400
401 struct OPENMS_DLLAPI Contact :
402 public CVTermList
403 {
405 CVTermList()
406 {
407 }
408
409 bool operator==(const Contact & rhs) const
410 {
411 return CVTermList::operator==(rhs) &&
412 id == rhs.id;
413 }
414
415 std::string id;
416 };
417
418 struct OPENMS_DLLAPI Publication :
419 public CVTermList
420 {
422 CVTermList()
423 {
424 }
425
426 bool operator==(const Publication & rhs) const
427 {
428 return CVTermList::operator==(rhs) &&
429 id == rhs.id;
430 }
431
432 std::string id;
433 };
434
435 struct OPENMS_DLLAPI Instrument :
436 public CVTermList
437 {
439 CVTermList()
440 {
441 }
442
443 bool operator==(const Instrument & rhs) const
444 {
445 return CVTermList::operator==(rhs) &&
446 id == rhs.id;
447 }
448
449 std::string id;
450 };
451
452 struct OPENMS_DLLAPI Prediction :
453 public CVTermList
454 {
456 CVTermList()
457 {
458 }
459
460 bool operator==(const Prediction & rhs) const
461 {
462 return CVTermList::operator==(rhs) &&
463 contact_ref == rhs.contact_ref &&
464 software_ref == rhs.software_ref;
465 }
466
467 std::string software_ref;
468 std::string contact_ref;
469 };
470
477 struct OPENMS_DLLAPI Interpretation :
479 {
480
481 /*
482 enum ResidueType
483 {
484 Full = 0, // with N-terminus and C-terminus
485 Internal, // internal, without any termini
486 NTerminal, // only N-terminus
487 CTerminal, // only C-terminus
488 AIon, // MS:1001229 N-terminus up to the C-alpha/carbonyl carbon bond
489 BIon, // MS:1001224 N-terminus up to the peptide bond
490 CIon, // MS:1001231 N-terminus up to the amide/C-alpha bond
491 XIon, // MS:1001228 amide/C-alpha bond up to the C-terminus
492 YIon, // MS:1001220 peptide bond up to the C-terminus
493 ZIon, // MS:1001230 C-alpha/carbonyl carbon bond
494 Precursor, // MS:1001523 Precursor ion
495 BIonMinusH20, // MS:1001222 b ion without water
496 YIonMinusH20, // MS:1001223 y ion without water
497 BIonMinusNH3, // MS:1001232 b ion without ammonia
498 YIonMinusNH3, // MS:1001233 y ion without ammonia
499 NonIdentified, // MS:1001240 Non-identified ion
500 Unannotated, // no stored annotation
501 SizeOfResidueType
502 };
503 */
504
506
507 unsigned char ordinal;
508 unsigned char rank;
510
511 // Constructor
514 ordinal(0),
515 rank(0),
516 iontype(Residue::Unannotated) // Unannotated does not imply any MS OBO term
517 {
518 }
519
523 bool operator==(const Interpretation & rhs) const
524 {
525 return CVTermListInterface::operator==(rhs) &&
526 ordinal == rhs.ordinal &&
527 rank == rhs.rank &&
528 iontype == rhs.iontype;
529 }
530
531 bool operator!=(const Interpretation & rhs) const
532 {
533 return !(operator==(rhs));
534 }
536
537 };
538
545 struct OPENMS_DLLAPI TraMLProduct :
547 {
548 TraMLProduct() = default;
549 bool operator==(const TraMLProduct & rhs) const
550 {
551 return CVTermListInterface::operator==(rhs) &&
552 charge_ == rhs.charge_ &&
553 charge_set_ == rhs.charge_set_ &&
554 mz_ == rhs.mz_ &&
555 configuration_list_ == rhs.configuration_list_ &&
556 interpretation_list_ == rhs.interpretation_list_;
557 }
558
559 void setChargeState(int charge)
560 {
561 charge_ = charge;
562 charge_set_ = true;
563 }
564
566 bool hasCharge() const
567 {
568 return charge_set_;
569 }
570
571 int getChargeState() const
572 {
573 OPENMS_PRECONDITION(charge_set_, "Cannot return charge which was never set")
574 return charge_;
575 }
576
577 double getMZ() const
578 {
579 return mz_;
580 }
581
582 void setMZ(double mz)
583 {
584 mz_ = mz;
585 }
586
587 const std::vector<Configuration> & getConfigurationList() const
588 {
589 return configuration_list_;
590 }
591
592 void addConfiguration(const Configuration& configuration)
593 {
594 configuration_list_.push_back(configuration);
595 }
596
597 const std::vector<Interpretation> & getInterpretationList() const
598 {
599 return interpretation_list_;
600 }
601
602 void addInterpretation(const Interpretation& interpretation)
603 {
604 interpretation_list_.push_back(interpretation);
605 }
606
608 {
609 return interpretation_list_.clear();
610 }
611
612private:
613 int charge_{0};
614 bool charge_set_{false};
615 double mz_{0};
616 std::vector<Configuration> configuration_list_;
617 std::vector<Interpretation> interpretation_list_;
618 };
619
621 OPENMS_DLLAPI OpenMS::AASequence getAASequence(const Peptide& peptide);
622
624 OPENMS_DLLAPI void setModification(int location, int max_size, const std::string& modification, OpenMS::AASequence & aas);
625
626 }
627
628 // hashCVTerms and hashCVTermList are defined in CVTermList.h
629
630 // Convenience wrapper for backward compatibility
631 inline std::size_t hashCVTermListInterface(const CVTermListInterface& cvtli) noexcept { return hashCVTerms(cvtli); }
632
633} // namespace OpenMS
634
635// Hash function specializations for TargetedExperimentHelper classes
636// Placed in std namespace to allow use with std::unordered_map/set
637namespace std
638{
640 template<>
641 struct hash<OpenMS::TargetedExperimentHelper::CV>
642 {
643 std::size_t operator()(const OpenMS::TargetedExperimentHelper::CV& cv) const noexcept
644 {
645 std::size_t seed = 0;
650 return seed;
651 }
652 };
653
655 template<>
656 struct hash<OpenMS::TargetedExperimentHelper::Protein>
657 {
658 std::size_t operator()(const OpenMS::TargetedExperimentHelper::Protein& protein) const noexcept
659 {
660 std::size_t seed = OpenMS::hashCVTermList(protein);
662 OpenMS::hash_combine(seed, OpenMS::fnv1a_hash_string(protein.sequence));
663 return seed;
664 }
665 };
666
668 template<>
669 struct hash<OpenMS::TargetedExperimentHelper::RetentionTime>
670 {
672 {
673 std::size_t seed = OpenMS::hashCVTermListInterface(rt);
674 OpenMS::hash_combine(seed, OpenMS::fnv1a_hash_string(rt.software_ref));
675 OpenMS::hash_combine(seed, OpenMS::hash_int(static_cast<std::int8_t>(rt.retention_time_unit)));
676 OpenMS::hash_combine(seed, OpenMS::hash_int(static_cast<std::int8_t>(rt.retention_time_type)));
677 OpenMS::hash_combine(seed, OpenMS::hash_int(rt.isRTset() ? 1 : 0));
678 if (rt.isRTset())
679 {
680 OpenMS::hash_combine(seed, OpenMS::hash_float(rt.getRT()));
681 }
682 return seed;
683 }
684 };
685
687 template<>
688 struct hash<OpenMS::TargetedExperimentHelper::PeptideCompound>
689 {
691 {
692 std::size_t seed = OpenMS::hashCVTermList(pc);
693 for (const auto& rt : pc.rts)
694 {
695 OpenMS::hash_combine(seed, std::hash<OpenMS::TargetedExperimentHelper::RetentionTime>{}(rt));
696 }
698 OpenMS::hash_combine(seed, OpenMS::hash_int(pc.hasCharge() ? 1 : 0));
699 if (pc.hasCharge())
700 {
701 OpenMS::hash_combine(seed, OpenMS::hash_int(pc.getChargeState()));
702 }
703 return seed;
704 }
705 };
706
708 template<>
709 struct hash<OpenMS::TargetedExperimentHelper::Compound>
710 {
711 std::size_t operator()(const OpenMS::TargetedExperimentHelper::Compound& compound) const noexcept
712 {
713 std::size_t seed = std::hash<OpenMS::TargetedExperimentHelper::PeptideCompound>{}(compound);
714 OpenMS::hash_combine(seed, OpenMS::fnv1a_hash_string(compound.molecular_formula));
715 OpenMS::hash_combine(seed, OpenMS::fnv1a_hash_string(compound.smiles_string));
716 OpenMS::hash_combine(seed, OpenMS::hash_float(compound.theoretical_mass));
717 return seed;
718 }
719 };
720
722 template<>
723 struct hash<OpenMS::TargetedExperimentHelper::Peptide>
724 {
725 std::size_t operator()(const OpenMS::TargetedExperimentHelper::Peptide& peptide) const noexcept
726 {
727 std::size_t seed = std::hash<OpenMS::TargetedExperimentHelper::PeptideCompound>{}(peptide);
728 for (const auto& ref : peptide.protein_refs)
729 {
731 }
732 OpenMS::hash_combine(seed, OpenMS::hashCVTermList(peptide.evidence));
733 OpenMS::hash_combine(seed, OpenMS::fnv1a_hash_string(peptide.sequence));
734 for (const auto& mod : peptide.mods)
735 {
737 OpenMS::hash_combine(seed, OpenMS::hash_float(mod.avg_mass_delta));
738 OpenMS::hash_combine(seed, OpenMS::hash_float(mod.mono_mass_delta));
739 OpenMS::hash_combine(seed, OpenMS::hash_int(mod.location));
740 OpenMS::hash_combine(seed, OpenMS::hash_int(mod.unimod_id));
741 }
742 OpenMS::hash_combine(seed, OpenMS::fnv1a_hash_string(peptide.getPeptideGroupLabel()));
743 return seed;
744 }
745 };
746
748 template<>
749 struct hash<OpenMS::TargetedExperimentHelper::Contact>
750 {
751 std::size_t operator()(const OpenMS::TargetedExperimentHelper::Contact& contact) const noexcept
752 {
753 std::size_t seed = OpenMS::hashCVTermList(contact);
755 return seed;
756 }
757 };
758
760 template<>
761 struct hash<OpenMS::TargetedExperimentHelper::Publication>
762 {
763 std::size_t operator()(const OpenMS::TargetedExperimentHelper::Publication& pub) const noexcept
764 {
765 std::size_t seed = OpenMS::hashCVTermList(pub);
767 return seed;
768 }
769 };
770
772 template<>
773 struct hash<OpenMS::TargetedExperimentHelper::Instrument>
774 {
775 std::size_t operator()(const OpenMS::TargetedExperimentHelper::Instrument& inst) const noexcept
776 {
777 std::size_t seed = OpenMS::hashCVTermList(inst);
779 return seed;
780 }
781 };
782
784 template<>
785 struct hash<OpenMS::TargetedExperimentHelper::Prediction>
786 {
787 std::size_t operator()(const OpenMS::TargetedExperimentHelper::Prediction& pred) const noexcept
788 {
789 std::size_t seed = OpenMS::hashCVTermList(pred);
790 OpenMS::hash_combine(seed, OpenMS::fnv1a_hash_string(pred.software_ref));
791 OpenMS::hash_combine(seed, OpenMS::fnv1a_hash_string(pred.contact_ref));
792 return seed;
793 }
794 };
795
797 template<>
798 struct hash<OpenMS::TargetedExperimentHelper::Interpretation>
799 {
800 std::size_t operator()(const OpenMS::TargetedExperimentHelper::Interpretation& interp) const noexcept
801 {
802 std::size_t seed = OpenMS::hashCVTermListInterface(interp);
803 OpenMS::hash_combine(seed, OpenMS::hash_int(interp.ordinal));
804 OpenMS::hash_combine(seed, OpenMS::hash_int(interp.rank));
805 OpenMS::hash_combine(seed, OpenMS::hash_int(static_cast<int>(interp.iontype)));
806 return seed;
807 }
808 };
809
811 template<>
812 struct hash<OpenMS::TargetedExperimentHelper::TraMLProduct>
813 {
814 std::size_t operator()(const OpenMS::TargetedExperimentHelper::TraMLProduct& product) const noexcept
815 {
816 std::size_t seed = OpenMS::hashCVTermListInterface(product);
817 OpenMS::hash_combine(seed, OpenMS::hash_int(product.hasCharge() ? 1 : 0));
818 if (product.hasCharge())
819 {
820 OpenMS::hash_combine(seed, OpenMS::hash_int(product.getChargeState()));
821 }
822 OpenMS::hash_combine(seed, OpenMS::hash_float(product.getMZ()));
823 // Hash configuration_list_ (required for consistency with operator==)
824 for (const auto& config : product.getConfigurationList())
825 {
827 OpenMS::hash_combine(seed, OpenMS::fnv1a_hash_string(config.contact_ref));
828 OpenMS::hash_combine(seed, OpenMS::fnv1a_hash_string(config.instrument_ref));
829 for (const auto& validation : config.validations)
830 {
832 }
833 }
834 for (const auto& interp : product.getInterpretationList())
835 {
836 OpenMS::hash_combine(seed, std::hash<OpenMS::TargetedExperimentHelper::Interpretation>{}(interp));
837 }
838 return seed;
839 }
840 };
841
842} // namespace std
843
Definition AASequence.h:96
Interface to the controlled vocabulary term list.
Definition CVTermListInterface.h:34
Representation of controlled vocabulary term list.
Definition CVTermList.h:29
bool operator==(const CVTermList &cv_term_list) const
equality operator
A method or algorithm argument contains illegal values.
Definition Exception.h:633
Representation of an amino acid residue.
Definition Residue.h:41
ResidueType
Definition Residue.h:153
Represents a compound (small molecule)
Definition TargetedExperimentHelper.h:297
double theoretical_mass
Definition TargetedExperimentHelper.h:320
Compound(Compound &&) noexcept=default
std::string smiles_string
Definition TargetedExperimentHelper.h:319
Compound()
Definition TargetedExperimentHelper.h:300
std::string molecular_formula
Definition TargetedExperimentHelper.h:318
Base class to represent either a peptide or a compound.
Definition TargetedExperimentHelper.h:186
std::vector< RetentionTime > rts
Definition TargetedExperimentHelper.h:281
bool hasRetentionTime() const
Check whether compound or peptide has an annotated retention time.
Definition TargetedExperimentHelper.h:238
double getRetentionTime() const
Gets compound or peptide retention time.
Definition TargetedExperimentHelper.h:247
PeptideCompound(const PeptideCompound &)=default
int getChargeState() const
Return the peptide or compound charge state.
Definition TargetedExperimentHelper.h:217
PeptideCompound(PeptideCompound &&) noexcept=default
void setChargeState(int charge)
Set the peptide or compound charge state.
Definition TargetedExperimentHelper.h:204
RetentionTime::RTType getRetentionTimeType() const
Get compound or peptide retentiontime type.
Definition TargetedExperimentHelper.h:258
bool hasCharge() const
Whether peptide or compound has set charge state.
Definition TargetedExperimentHelper.h:211
RetentionTime::RTUnit getRetentionTimeUnit() const
Get compound or peptide retentiontime unit (minute/seconds)
Definition TargetedExperimentHelper.h:269
double getDriftTime() const
Return the peptide or compound ion mobility drift time.
Definition TargetedExperimentHelper.h:230
void setDriftTime(double dt)
Set the peptide or compound ion mobility drift time.
Definition TargetedExperimentHelper.h:224
std::string id
Definition TargetedExperimentHelper.h:280
Represents a peptide (amino acid sequence)
Definition TargetedExperimentHelper.h:334
std::vector< std::string > protein_refs
Definition TargetedExperimentHelper.h:392
void setPeptideGroupLabel(const std::string &label)
Set the peptide group label.
Definition TargetedExperimentHelper.h:380
CVTermList evidence
Definition TargetedExperimentHelper.h:393
std::vector< Modification > mods
Definition TargetedExperimentHelper.h:395
std::string sequence
Definition TargetedExperimentHelper.h:394
Peptide(Peptide &&) noexcept=default
std::string peptide_group_label_
Definition TargetedExperimentHelper.h:398
std::string getPeptideGroupLabel() const
Get the peptide group label.
Definition TargetedExperimentHelper.h:386
This class stores a retention time structure that is used in TargetedExperiment (representing a TraML...
Definition TargetedExperimentHelper.h:100
double getRT() const
Definition TargetedExperimentHelper.h:160
RetentionTime(RetentionTime &&) noexcept=default
bool retention_time_set_
Definition TargetedExperimentHelper.h:172
RetentionTime(const RetentionTime &)=default
RTUnit
Definition TargetedExperimentHelper.h:104
RTType
Definition TargetedExperimentHelper.h:112
RetentionTime()
Definition TargetedExperimentHelper.h:122
RTUnit retention_time_unit
Definition TargetedExperimentHelper.h:167
std::string software_ref
Definition TargetedExperimentHelper.h:166
RTType retention_time_type
Definition TargetedExperimentHelper.h:168
double retention_time_
Definition TargetedExperimentHelper.h:173
bool isRTset() const
Definition TargetedExperimentHelper.h:151
void setRT(double rt)
Definition TargetedExperimentHelper.h:155
with they also need the< code > lp coin</code > or< code > lp glpk</code > feature in< code > VCPKG_MANIFEST_FEATURES</code >< code > the former default
Definition common-cmake-parameters.doxygen:178
@ UNKNOWN
Unknown or unrecognized ion type.
int32_t Int32
Signed integer type (32bit)
Definition Types.h:26
#define OPENMS_PRECONDITION(condition, message)
Precondition macro.
Definition openms/include/OpenMS/CONCEPT/Macros.h:91
bool operator==(const IDBoostGraph::ProteinGroup &lhs, const IDBoostGraph::ProteinGroup &rhs)
OpenMS::AASequence getAASequence(const Peptide &peptide)
helper function that converts a Peptide object to a AASequence object
void setModification(int location, int max_size, const std::string &modification, OpenMS::AASequence &aas)
helper function that sets a modification on a AASequence object
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
std::size_t hashCVTermList(const CVTermList &cvtl) noexcept
Definition CVTermList.h:139
std::size_t hash_int(T value) noexcept
Hash for an integer type.
Definition HashUtils.h:107
void hash_combine(std::size_t &seed, std::size_t value) noexcept
Combine a hash value with additional data using golden ratio mixing.
Definition HashUtils.h:87
std::size_t hash_float(T value) noexcept
Hash for a floating point type (float or double).
Definition HashUtils.h:142
std::size_t fnv1a_hash_string(const std::string &s) noexcept
FNV-1a hash for a string.
Definition HashUtils.h:70
std::size_t hashCVTerms(const T &obj) noexcept
Helper template to hash any type with getCVTerms() method (CVTermList, CVTermListInterface)
Definition CVTermList.h:113
std::size_t hashCVTermListInterface(const CVTermListInterface &cvtli) noexcept
Definition TargetedExperimentHelper.h:631
STL namespace.
Definition TargetedExperimentHelper.h:47
CV(const std::string &new_id, const std::string &new_fullname, const std::string &new_version, const std::string &new_URI)
Definition TargetedExperimentHelper.h:48
std::string fullname
Definition TargetedExperimentHelper.h:58
bool operator==(const CV &cv) const
Definition TargetedExperimentHelper.h:62
std::string version
Definition TargetedExperimentHelper.h:59
std::string URI
Definition TargetedExperimentHelper.h:60
std::string id
Definition TargetedExperimentHelper.h:57
Definition TargetedExperimentHelper.h:40
std::string contact_ref
Definition TargetedExperimentHelper.h:41
std::string instrument_ref
Definition TargetedExperimentHelper.h:42
std::vector< CVTermList > validations
Definition TargetedExperimentHelper.h:43
Definition TargetedExperimentHelper.h:403
bool operator==(const Contact &rhs) const
Definition TargetedExperimentHelper.h:409
Contact()
Definition TargetedExperimentHelper.h:404
std::string id
Definition TargetedExperimentHelper.h:415
Definition TargetedExperimentHelper.h:437
bool operator==(const Instrument &rhs) const
Definition TargetedExperimentHelper.h:443
Instrument()
Definition TargetedExperimentHelper.h:438
std::string id
Definition TargetedExperimentHelper.h:449
Product ion interpretation.
Definition TargetedExperimentHelper.h:479
IonType iontype
which type of ion (b/y/z/ ...), see Residue::ResidueType
Definition TargetedExperimentHelper.h:509
bool operator!=(const Interpretation &rhs) const
Definition TargetedExperimentHelper.h:531
Interpretation()
Definition TargetedExperimentHelper.h:512
Residue::ResidueType IonType
Interpretation IonType.
Definition TargetedExperimentHelper.h:505
bool operator==(const Interpretation &rhs) const
Definition TargetedExperimentHelper.h:523
unsigned char ordinal
MS:1000903 : product ion series ordinal (e.g. 8 for a y8 ion)
Definition TargetedExperimentHelper.h:507
unsigned char rank
MS:1000926 : product interpretation rank (e.g. 1 for the most likely rank)
Definition TargetedExperimentHelper.h:508
Definition TargetedExperimentHelper.h:338
Int32 unimod_id
Definition TargetedExperimentHelper.h:342
double mono_mass_delta
Definition TargetedExperimentHelper.h:340
double avg_mass_delta
Definition TargetedExperimentHelper.h:339
Int32 location
Definition TargetedExperimentHelper.h:341
Modification()
Definition TargetedExperimentHelper.h:344
Definition TargetedExperimentHelper.h:454
Prediction()
Definition TargetedExperimentHelper.h:455
std::string contact_ref
Definition TargetedExperimentHelper.h:468
std::string software_ref
Definition TargetedExperimentHelper.h:467
bool operator==(const Prediction &rhs) const
Definition TargetedExperimentHelper.h:460
Definition TargetedExperimentHelper.h:74
bool operator==(const Protein &rhs) const
Definition TargetedExperimentHelper.h:76
std::string sequence
Definition TargetedExperimentHelper.h:84
std::string id
Definition TargetedExperimentHelper.h:83
Definition TargetedExperimentHelper.h:420
bool operator==(const Publication &rhs) const
Definition TargetedExperimentHelper.h:426
Publication()
Definition TargetedExperimentHelper.h:421
std::string id
Definition TargetedExperimentHelper.h:432
Represents a product ion.
Definition TargetedExperimentHelper.h:547
void resetInterpretations()
Definition TargetedExperimentHelper.h:607
void addConfiguration(const Configuration &configuration)
Definition TargetedExperimentHelper.h:592
void addInterpretation(const Interpretation &interpretation)
Definition TargetedExperimentHelper.h:602
const std::vector< Configuration > & getConfigurationList() const
Definition TargetedExperimentHelper.h:587
void setMZ(double mz)
Definition TargetedExperimentHelper.h:582
const std::vector< Interpretation > & getInterpretationList() const
Definition TargetedExperimentHelper.h:597
int getChargeState() const
Definition TargetedExperimentHelper.h:571
bool charge_set_
Whether product ion charge is set or not.
Definition TargetedExperimentHelper.h:614
void setChargeState(int charge)
Definition TargetedExperimentHelper.h:559
std::vector< Configuration > configuration_list_
Product ion configurations used.
Definition TargetedExperimentHelper.h:616
int charge_
Product ion charge.
Definition TargetedExperimentHelper.h:613
bool hasCharge() const
Whether product has set charge state.
Definition TargetedExperimentHelper.h:566
std::vector< Interpretation > interpretation_list_
Product ion interpretation.
Definition TargetedExperimentHelper.h:617
bool operator==(const TraMLProduct &rhs) const
Definition TargetedExperimentHelper.h:549
double mz_
Product ion m/z.
Definition TargetedExperimentHelper.h:615
double getMZ() const
Definition TargetedExperimentHelper.h:577
std::size_t operator()(const OpenMS::TargetedExperimentHelper::CV &cv) const noexcept
Definition TargetedExperimentHelper.h:643
std::size_t operator()(const OpenMS::TargetedExperimentHelper::Compound &compound) const noexcept
Definition TargetedExperimentHelper.h:711
std::size_t operator()(const OpenMS::TargetedExperimentHelper::Contact &contact) const noexcept
Definition TargetedExperimentHelper.h:751
std::size_t operator()(const OpenMS::TargetedExperimentHelper::Instrument &inst) const noexcept
Definition TargetedExperimentHelper.h:775
std::size_t operator()(const OpenMS::TargetedExperimentHelper::Interpretation &interp) const noexcept
Definition TargetedExperimentHelper.h:800
std::size_t operator()(const OpenMS::TargetedExperimentHelper::PeptideCompound &pc) const noexcept
Definition TargetedExperimentHelper.h:690
std::size_t operator()(const OpenMS::TargetedExperimentHelper::Peptide &peptide) const noexcept
Definition TargetedExperimentHelper.h:725
std::size_t operator()(const OpenMS::TargetedExperimentHelper::Prediction &pred) const noexcept
Definition TargetedExperimentHelper.h:787
std::size_t operator()(const OpenMS::TargetedExperimentHelper::Protein &protein) const noexcept
Definition TargetedExperimentHelper.h:658
std::size_t operator()(const OpenMS::TargetedExperimentHelper::Publication &pub) const noexcept
Definition TargetedExperimentHelper.h:763
std::size_t operator()(const OpenMS::TargetedExperimentHelper::RetentionTime &rt) const noexcept
Definition TargetedExperimentHelper.h:671
std::size_t operator()(const OpenMS::TargetedExperimentHelper::TraMLProduct &product) const noexcept
Definition TargetedExperimentHelper.h:814