50 #include <boost/numeric/conversion/cast.hpp>
61 namespace TargetedExperimentHelper
151 retention_time_unit(
RTUnit::SIZE_OF_RTUNIT),
152 retention_time_type(
RTType::SIZE_OF_RTTYPE),
153 retention_time_set_(false),
170 software_ref == rhs.software_ref &&
171 retention_time_unit == rhs.retention_time_unit &&
172 retention_time_type == rhs.retention_time_type &&
173 retention_time_set_ == rhs.retention_time_set_ &&
174 retention_time_ == rhs.retention_time_;
179 return retention_time_set_;
183 retention_time_ = rt;
184 retention_time_set_ =
true;
189 return retention_time_;
225 charge_ == rhs.charge_ &&
226 charge_set_ == rhs.charge_set_;
266 return (!rts.empty() && rts[0].isRTset());
275 if (!hasRetentionTime())
278 "No retention time information available");
280 return rts[0].getRT();
286 if (!hasRetentionTime())
289 "No retention time information available");
291 return rts[0].retention_time_type;
297 if (!hasRetentionTime())
300 "No retention time information available");
302 return rts[0].retention_time_unit;
307 std::vector<RetentionTime>
rts;
311 bool charge_set_{
false};
312 double drift_time_{-1};
327 theoretical_mass(0.0)
339 molecular_formula == rhs.molecular_formula &&
340 smiles_string == rhs.smiles_string &&
341 theoretical_mass == rhs.theoretical_mass;
388 protein_refs == rhs.protein_refs &&
389 evidence == rhs.evidence &&
390 sequence == rhs.sequence &&
392 peptide_group_label_ == rhs.peptide_group_label_;
408 peptide_group_label_ = label;
414 return peptide_group_label_;
421 std::vector<Modification>
mods;
615 return configuration_list_;
620 configuration_list_.push_back(configuration);
625 return interpretation_list_;
630 interpretation_list_.push_back(interpretation);
635 return interpretation_list_.clear();
640 bool charge_set_{
false};
Representation of a peptide/protein sequence.
Definition: AASequence.h:112
Interface to the controlled vocabulary term list.
Definition: CVTermListInterface.h:59
bool operator==(const CVTermListInterface &rhs) const
equality operator
Representation of controlled vocabulary term list.
Definition: CVTermList.h:54
bool operator==(const CVTermList &cv_term_list) const
equality operator
A method or algorithm argument contains illegal values.
Definition: Exception.h:656
Representation of a residue.
Definition: Residue.h:63
ResidueType
Definition: Residue.h:152
A more convenient string class.
Definition: String.h:61
Represents a compound (small molecule)
Definition: TargetedExperimentHelper.h:323
String molecular_formula
Definition: TargetedExperimentHelper.h:344
double theoretical_mass
Definition: TargetedExperimentHelper.h:346
Compound(const Compound &)=default
Compound(Compound &&) noexcept=default
String smiles_string
Definition: TargetedExperimentHelper.h:345
Compound()
Definition: TargetedExperimentHelper.h:326
Base class to represent either a peptide or a compound.
Definition: TargetedExperimentHelper.h:212
std::vector< RetentionTime > rts
Definition: TargetedExperimentHelper.h:307
bool hasRetentionTime() const
Check whether compound or peptide has an annotated retention time.
Definition: TargetedExperimentHelper.h:264
double getRetentionTime() const
Gets compound or peptide retention time.
Definition: TargetedExperimentHelper.h:273
PeptideCompound(const PeptideCompound &)=default
String id
Definition: TargetedExperimentHelper.h:306
int getChargeState() const
Return the peptide or compound charge state.
Definition: TargetedExperimentHelper.h:243
bool operator==(const PeptideCompound &rhs) const
Definition: TargetedExperimentHelper.h:220
PeptideCompound(PeptideCompound &&) noexcept=default
void setChargeState(int charge)
Set the peptide or compound charge state.
Definition: TargetedExperimentHelper.h:230
RetentionTime::RTType getRetentionTimeType() const
Get compound or peptide retentiontime type.
Definition: TargetedExperimentHelper.h:284
PeptideCompound()=default
bool hasCharge() const
Whether peptide or compound has set charge state.
Definition: TargetedExperimentHelper.h:237
RetentionTime::RTUnit getRetentionTimeUnit() const
Get compound or peptide retentiontime unit (minute/seconds)
Definition: TargetedExperimentHelper.h:295
double getDriftTime() const
Return the peptide or compound ion mobility drift time.
Definition: TargetedExperimentHelper.h:256
void setDriftTime(double dt)
Set the peptide or compound ion mobility drift time.
Definition: TargetedExperimentHelper.h:250
Represents a peptide (amino acid sequence)
Definition: TargetedExperimentHelper.h:360
String getPeptideGroupLabel() const
Get the peptide group label.
Definition: TargetedExperimentHelper.h:412
String sequence
Definition: TargetedExperimentHelper.h:420
Peptide(const Peptide &)=default
CVTermList evidence
Definition: TargetedExperimentHelper.h:419
std::vector< Modification > mods
Definition: TargetedExperimentHelper.h:421
std::vector< String > protein_refs
Definition: TargetedExperimentHelper.h:418
void setPeptideGroupLabel(const String &label)
Set the peptide group label.
Definition: TargetedExperimentHelper.h:406
Peptide(Peptide &&) noexcept=default
String peptide_group_label_
Definition: TargetedExperimentHelper.h:424
This class stores a retention time structure that is used in TargetedExperiment (representing a TraML...
Definition: TargetedExperimentHelper.h:126
double getRT() const
Definition: TargetedExperimentHelper.h:186
String software_ref
Definition: TargetedExperimentHelper.h:192
RetentionTime(RetentionTime &&) noexcept=default
bool retention_time_set_
Definition: TargetedExperimentHelper.h:198
RetentionTime(const RetentionTime &)=default
RTUnit
Definition: TargetedExperimentHelper.h:130
RTType
Definition: TargetedExperimentHelper.h:138
RetentionTime()
Definition: TargetedExperimentHelper.h:148
RTUnit retention_time_unit
Definition: TargetedExperimentHelper.h:193
RTType retention_time_type
Definition: TargetedExperimentHelper.h:194
double retention_time_
Definition: TargetedExperimentHelper.h:199
bool isRTset() const
Definition: TargetedExperimentHelper.h:177
void setRT(double rt)
Definition: TargetedExperimentHelper.h:181
OPENMS_INT32_TYPE Int32
Signed integer type (32bit)
Definition: Types.h:56
#define OPENMS_PRECONDITION(condition, message)
Precondition macro.
Definition: openms/include/OpenMS/CONCEPT/Macros.h:120
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, String modification, OpenMS::AASequence &aas)
helper function that sets a modification on a AASequence object
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
Definition: TargetedExperimentHelper.h:73
String fullname
Definition: TargetedExperimentHelper.h:84
bool operator==(const CV &cv) const
Definition: TargetedExperimentHelper.h:88
String version
Definition: TargetedExperimentHelper.h:85
String id
Definition: TargetedExperimentHelper.h:83
CV(const String &new_id, const String &new_fullname, const String &new_version, const String &new_URI)
Definition: TargetedExperimentHelper.h:74
String URI
Definition: TargetedExperimentHelper.h:86
Definition: TargetedExperimentHelper.h:66
String instrument_ref
Definition: TargetedExperimentHelper.h:68
std::vector< CVTermList > validations
Definition: TargetedExperimentHelper.h:69
String contact_ref
Definition: TargetedExperimentHelper.h:67
Definition: TargetedExperimentHelper.h:463
bool operator==(const Instrument &rhs) const
Definition: TargetedExperimentHelper.h:469
String id
Definition: TargetedExperimentHelper.h:475
Instrument()
Definition: TargetedExperimentHelper.h:464
Product ion interpretation.
Definition: TargetedExperimentHelper.h:505
IonType iontype
which type of ion (b/y/z/ ...), see Residue::ResidueType
Definition: TargetedExperimentHelper.h:535
bool operator!=(const Interpretation &rhs) const
Definition: TargetedExperimentHelper.h:557
Interpretation()
Definition: TargetedExperimentHelper.h:538
Residue::ResidueType IonType
Interpretation IonType.
Definition: TargetedExperimentHelper.h:531
bool operator==(const Interpretation &rhs) const
Definition: TargetedExperimentHelper.h:549
unsigned char ordinal
MS:1000903 : product ion series ordinal (e.g. 8 for a y8 ion)
Definition: TargetedExperimentHelper.h:533
unsigned char rank
MS:1000926 : product interpretation rank (e.g. 1 for the most likely rank)
Definition: TargetedExperimentHelper.h:534
Definition: TargetedExperimentHelper.h:364
Int32 unimod_id
Definition: TargetedExperimentHelper.h:368
double mono_mass_delta
Definition: TargetedExperimentHelper.h:366
double avg_mass_delta
Definition: TargetedExperimentHelper.h:365
Int32 location
Definition: TargetedExperimentHelper.h:367
Modification()
Definition: TargetedExperimentHelper.h:370
Definition: TargetedExperimentHelper.h:480
String software_ref
Definition: TargetedExperimentHelper.h:493
Prediction()
Definition: TargetedExperimentHelper.h:481
String contact_ref
Definition: TargetedExperimentHelper.h:494
bool operator==(const Prediction &rhs) const
Definition: TargetedExperimentHelper.h:486
Definition: TargetedExperimentHelper.h:100
String sequence
Definition: TargetedExperimentHelper.h:110
String id
Definition: TargetedExperimentHelper.h:109
bool operator==(const Protein &rhs) const
Definition: TargetedExperimentHelper.h:102
Definition: TargetedExperimentHelper.h:446
bool operator==(const Publication &rhs) const
Definition: TargetedExperimentHelper.h:452
String id
Definition: TargetedExperimentHelper.h:458
Publication()
Definition: TargetedExperimentHelper.h:447
Represents a product ion.
Definition: TargetedExperimentHelper.h:573
void resetInterpretations()
Definition: TargetedExperimentHelper.h:633
void addConfiguration(const Configuration &configuration)
Definition: TargetedExperimentHelper.h:618
void addInterpretation(const Interpretation &interpretation)
Definition: TargetedExperimentHelper.h:628
const std::vector< Configuration > & getConfigurationList() const
Definition: TargetedExperimentHelper.h:613
void setMZ(double mz)
Definition: TargetedExperimentHelper.h:608
const std::vector< Interpretation > & getInterpretationList() const
Definition: TargetedExperimentHelper.h:623
int getChargeState() const
Definition: TargetedExperimentHelper.h:597
bool charge_set_
Whether product ion charge is set or not.
Definition: TargetedExperimentHelper.h:640
void setChargeState(int charge)
Definition: TargetedExperimentHelper.h:585
std::vector< Configuration > configuration_list_
Product ion configurations used.
Definition: TargetedExperimentHelper.h:642
int charge_
Product ion charge.
Definition: TargetedExperimentHelper.h:639
bool hasCharge() const
Whether product has set charge state.
Definition: TargetedExperimentHelper.h:592
std::vector< Interpretation > interpretation_list_
Product ion interpretation.
Definition: TargetedExperimentHelper.h:643
bool operator==(const TraMLProduct &rhs) const
Definition: TargetedExperimentHelper.h:575
double mz_
Product ion m/z.
Definition: TargetedExperimentHelper.h:641
double getMZ() const
Definition: TargetedExperimentHelper.h:603