39 #include <boost/numeric/conversion/cast.hpp>
66 template <
typename ChromatogramType,
typename TransitionType>
165 throw Exception::InvalidValue(__FILE__, __LINE__, OPENMS_PRETTY_FUNCTION,
"Internal error: Transition with nativeID was already present!", key);
209 throw Exception::InvalidValue(__FILE__, __LINE__, OPENMS_PRETTY_FUNCTION,
"Internal error: Chromatogram with nativeID was already present!", key);
262 throw Exception::InvalidValue(__FILE__, __LINE__, OPENMS_PRETTY_FUNCTION,
"Internal error: Chromatogram with nativeID was already present!", key);
348 result.push_back(it->getLibraryIntensity());
350 for (
Size i = 0; i < result.size(); i++)
367 if (std::find(tr_ids.begin(), tr_ids.end(), tr.getNativeID()) != tr_ids.end())
390 mf.
setRT(tgf.getRT());
391 mf.MetaInfoInterface::operator=(tgf);
395 if (std::find(tr_ids.begin(), tr_ids.end(), tr.getNativeID()) != tr_ids.end())
397 mf.
addFeature(tgf.getFeature(tr.getNativeID()),tr.getNativeID());
400 std::vector<String> pf_ids;
401 tgf.getPrecursorFeatureIDs(pf_ids);
402 for (
const auto& pf_id : pf_ids)
409 return transition_group_subset;
419 if (std::find(tr_ids.begin(), tr_ids.end(), tr_it->getNativeID()) != tr_ids.end())
421 transition_group_subset.
addTransition(*tr_it, tr_it->getNativeID());
431 return transition_group_subset;
448 double highest_score =
getFeatures()[0].getOverallQuality();
451 if (
getFeatures()[it].getOverallQuality() > highest_score)
454 highest_score =
getFeatures()[it].getOverallQuality();
A 1-dimensional raw data point or peak for chromatograms.
Definition: ChromatogramPeak.h:54
const String & getNativeID() const
returns the native identifier for the spectrum, used by the acquisition software.
Invalid value exception.
Definition: Exception.h:329
A multi-chromatogram MRM feature.
Definition: MRMFeature.h:52
void addFeature(const Feature &feature, const String &key)
Adds an feature from a single chromatogram into the feature.
void addPrecursorFeature(const Feature &feature, const String &key)
Adds a precursor feature from a single chromatogram into the feature.
The representation of a group of transitions in a targeted proteomics experiment.
Definition: MRMTransitionGroup.h:68
const ChromatogramType & getChromatogram(const String &key) const
Definition: MRMTransitionGroup.h:226
ChromatogramType::PeakType PeakType
Peak type.
Definition: MRMTransitionGroup.h:79
std::vector< ChromatogramType > & getPrecursorChromatograms()
Definition: MRMTransitionGroup.h:237
void addChromatogram(const ChromatogramType &chromatogram, const String &key)
Definition: MRMTransitionGroup.h:203
virtual ~MRMTransitionGroup()
Destructor.
Definition: MRMTransitionGroup.h:104
std::map< String, int > precursor_chromatogram_map_
Definition: MRMTransitionGroup.h:495
ChromatogramType & getChromatogram(const String &key)
Definition: MRMTransitionGroup.h:219
std::vector< MRMFeature > MRMFeatureListType
Type definitions.
Definition: MRMTransitionGroup.h:75
MRMTransitionGroup(const MRMTransitionGroup &rhs)
Copy Constructor.
Definition: MRMTransitionGroup.h:91
bool hasPrecursorChromatogram(const String &key) const
Definition: MRMTransitionGroup.h:267
const std::vector< ChromatogramType > & getChromatograms() const
Definition: MRMTransitionGroup.h:191
std::vector< ChromatogramType > chromatograms_
chromatogram list
Definition: MRMTransitionGroup.h:486
std::vector< TransitionType > & getTransitionsMuteable()
Definition: MRMTransitionGroup.h:147
void addFeature(MRMFeature &&feature)
Definition: MRMTransitionGroup.h:305
std::vector< MRMFeature > & getFeaturesMuteable()
Definition: MRMTransitionGroup.h:295
MRMTransitionGroup subset(std::vector< std::string > tr_ids) const
Definition: MRMTransitionGroup.h:360
const String & getTransitionGroupID() const
Definition: MRMTransitionGroup.h:130
String tr_gr_id_
transition group id (peak group id)
Definition: MRMTransitionGroup.h:480
bool isInternallyConsistent() const
Check whether internal state is consistent, e.g. same number of chromatograms and transitions are pre...
Definition: MRMTransitionGroup.h:316
void addTransition(const TransitionType &transition, const String &key)
Definition: MRMTransitionGroup.h:159
std::vector< ChromatogramType > precursor_chromatograms_
precursor chromatogram list
Definition: MRMTransitionGroup.h:489
const ChromatogramType & getPrecursorChromatogram(const String &key) const
Definition: MRMTransitionGroup.h:279
bool chromatogramIdsMatch() const
Ensure that chromatogram native ids match their keys in the map.
Definition: MRMTransitionGroup.h:325
void addPrecursorChromatogram(const ChromatogramType &chromatogram, const String &key)
Definition: MRMTransitionGroup.h:256
std::vector< TransitionType > TransitionsType
List of Reaction Monitoring transitions (meta data) type.
Definition: MRMTransitionGroup.h:77
MRMTransitionGroup()
Default constructor.
Definition: MRMTransitionGroup.h:86
bool hasTransition(const String &key) const
Definition: MRMTransitionGroup.h:170
MRMFeatureListType mrm_features_
feature list
Definition: MRMTransitionGroup.h:492
MRMTransitionGroup subsetDependent(std::vector< std::string > tr_ids) const
Definition: MRMTransitionGroup.h:412
TransitionsType transitions_
transition list
Definition: MRMTransitionGroup.h:483
std::map< String, int > chromatogram_map_
Definition: MRMTransitionGroup.h:494
MRMTransitionGroup & operator=(const MRMTransitionGroup &rhs)
Definition: MRMTransitionGroup.h:109
bool isMappingConsistent_() const
Checks that the mapping between chromatograms and transitions is consistent.
Definition: MRMTransitionGroup.h:463
const TransitionType & getTransition(const String &key)
Definition: MRMTransitionGroup.h:175
bool hasChromatogram(const String &key) const
Definition: MRMTransitionGroup.h:214
void addFeature(const MRMFeature &feature)
Definition: MRMTransitionGroup.h:300
const std::vector< ChromatogramType > & getPrecursorChromatograms() const
Definition: MRMTransitionGroup.h:242
std::map< String, int > transition_map_
Definition: MRMTransitionGroup.h:496
Size size() const
Definition: MRMTransitionGroup.h:125
const std::vector< TransitionType > & getTransitions() const
Definition: MRMTransitionGroup.h:142
void setTransitionGroupID(const String &tr_gr_id)
Definition: MRMTransitionGroup.h:135
const std::vector< MRMFeature > & getFeatures() const
Definition: MRMTransitionGroup.h:290
ChromatogramType & getPrecursorChromatogram(const String &key)
Definition: MRMTransitionGroup.h:272
std::vector< ChromatogramType > & getChromatograms()
Definition: MRMTransitionGroup.h:186
void getLibraryIntensity(std::vector< double > &result) const
Definition: MRMTransitionGroup.h:344
const MRMFeature & getBestFeature() const
Returns the best feature by overall quality.
Definition: MRMTransitionGroup.h:442
The representation of a chromatogram.
Definition: MSChromatogram.h:57
void setRT(CoordinateType coordinate)
Mutable access to the RT coordinate (index 0)
Definition: Peak2D.h:216
void setIntensity(IntensityType intensity)
Sets data point intensity (height)
Definition: Peak2D.h:174
A more convenient string class.
Definition: String.h:60
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
#define OPENMS_PRECONDITION(condition, message)
Precondition macro.
Definition: openms/include/OpenMS/CONCEPT/Macros.h:120
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:48