35 #ifndef OPENMS_KERNEL_MRMTRANSITIONGROUP_H 36 #define OPENMS_KERNEL_MRMTRANSITIONGROUP_H 40 #include <boost/numeric/conversion/cast.hpp> 67 template <
typename ChromatogramType,
typename TransitionType>
306 result.push_back(it->getLibraryIntensity());
308 for (
Size i = 0; i < result.size(); i++)
325 if (std::find(tr_ids.begin(), tr_ids.end(), tr_it->getNativeID()) != tr_ids.end())
329 transition_group_subset.
addTransition(*tr_it, tr_it->getNativeID());
348 mf.
setRT(tgf_it->getRT());
349 std::vector<String> metavalues;
350 tgf_it->getKeys(metavalues);
351 for (std::vector<String>::iterator key_it = metavalues.begin(); key_it != metavalues.end(); ++key_it)
357 if (std::find(tr_ids.begin(), tr_ids.end(), tr_it->getNativeID()) != tr_ids.end())
359 mf.
addFeature(tgf_it->getFeature(tr_it->getNativeID()),tr_it->getNativeID());
362 std::vector<String> pf_ids;
363 tgf_it->getPrecursorFeatureIDs(pf_ids);
364 for (std::vector<String>::iterator pf_ids_it = pf_ids.begin(); pf_ids_it != pf_ids.end(); ++pf_ids_it)
371 return transition_group_subset;
381 if (std::find(tr_ids.begin(), tr_ids.end(), tr_it->getNativeID()) != tr_ids.end())
383 transition_group_subset.
addTransition(*tr_it, tr_it->getNativeID());
393 return transition_group_subset;
411 double highest_score =
getFeatures()[0].getOverallQuality();
414 if (
getFeatures()[it].getOverallQuality() > highest_score)
417 highest_score =
getFeatures()[it].getOverallQuality();
463 #endif // OPENMS_KERNEL_MRMTRANSITIONGROUP_H std::vector< TransitionType > TransitionsType
List of Reaction Monitoring transitions (meta data) type.
Definition: MRMTransitionGroup.h:78
MRMTransitionGroup(const MRMTransitionGroup &rhs)
Copy Constructor.
Definition: MRMTransitionGroup.h:92
MRMFeatureListType mrm_features_
feature list
Definition: MRMTransitionGroup.h:455
std::map< String, int > transition_map_
Definition: MRMTransitionGroup.h:459
bool hasTransition(String key) const
Definition: MRMTransitionGroup.h:159
TransitionsType transitions_
transition list
Definition: MRMTransitionGroup.h:446
String tr_gr_id_
transition group id (peak group id)
Definition: MRMTransitionGroup.h:443
A more convenient string class.
Definition: String.h:57
const std::vector< MRMFeature > & getFeatures() const
Definition: MRMTransitionGroup.h:253
void addChromatogram(ChromatogramType &chromatogram, String key)
Definition: MRMTransitionGroup.h:185
std::map< String, int > chromatogram_map_
Definition: MRMTransitionGroup.h:457
The representation of a chromatogram.
Definition: MSChromatogram.h:55
MRMTransitionGroup subset(std::vector< std::string > tr_ids)
Definition: MRMTransitionGroup.h:318
const std::vector< TransitionType > & getTransitions() const
Definition: MRMTransitionGroup.h:143
#define OPENMS_PRECONDITION(condition, message)
Precondition macro.
Definition: openms/include/OpenMS/CONCEPT/Macros.h:107
Size size() const
Definition: MRMTransitionGroup.h:126
std::vector< ChromatogramType > precursor_chromatograms_
precursor chromatogram list
Definition: MRMTransitionGroup.h:452
bool hasPrecursorChromatogram(String key) const
Definition: MRMTransitionGroup.h:237
const std::vector< ChromatogramType > & getPrecursorChromatograms() const
Definition: MRMTransitionGroup.h:209
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
bool isMappingConsistent_() const
Checks that the mapping between chromatograms and transitions is consistent.
Definition: MRMTransitionGroup.h:426
ChromatogramType & getChromatogram(String key)
Definition: MRMTransitionGroup.h:198
void setIntensity(IntensityType intensity)
Non-mutable access to the data point intensity (height)
Definition: Peak2D.h:173
MRMTransitionGroup subsetDependent(std::vector< std::string > tr_ids)
Definition: MRMTransitionGroup.h:374
ChromatogramType::PeakType PeakType
Peak type.
Definition: MRMTransitionGroup.h:80
The representation of a group of transitions in a targeted proteomics experiment. ...
Definition: MRMTransitionGroup.h:68
MRMTransitionGroup & operator=(const MRMTransitionGroup &rhs)
Definition: MRMTransitionGroup.h:110
void addFeature(Feature &feature, const String &key)
Adds an feature from a single chromatogram into the feature.
bool isInternallyConsistent() const
Check whether internal state is consistent, e.g. same number of chromatograms and transitions are pre...
Definition: MRMTransitionGroup.h:274
bool hasChromatogram(String key) const
Definition: MRMTransitionGroup.h:193
const std::vector< ChromatogramType > & getChromatograms() const
Definition: MRMTransitionGroup.h:175
std::vector< ChromatogramType > chromatograms_
chromatogram list
Definition: MRMTransitionGroup.h:449
void setRT(CoordinateType coordinate)
Mutable access to the RT coordinate (index 0)
Definition: Peak2D.h:215
std::vector< MRMFeature > MRMFeatureListType
Type definitions.
Definition: MRMTransitionGroup.h:76
std::vector< ChromatogramType > & getChromatograms()
Definition: MRMTransitionGroup.h:180
const MRMFeature & getBestFeature() const
Returns the best feature by overall quality.
Definition: MRMTransitionGroup.h:405
std::vector< MRMFeature > & getFeaturesMuteable()
Definition: MRMTransitionGroup.h:258
const String & getTransitionGroupID() const
Definition: MRMTransitionGroup.h:131
ChromatogramType & getPrecursorChromatogram(String key)
Definition: MRMTransitionGroup.h:242
void getLibraryIntensity(std::vector< double > &result) const
Definition: MRMTransitionGroup.h:302
void addTransition(const TransitionType &transition, String key)
Definition: MRMTransitionGroup.h:153
void addFeature(MRMFeature &feature)
Definition: MRMTransitionGroup.h:263
void addPrecursorFeature(Feature &feature, const String &key)
Adds a precursor feature from a single chromatogram into the feature.
const String & getNativeID() const
returns the native identifier for the spectrum, used by the acquisition software. ...
void setTransitionGroupID(const String &tr_gr_id)
Definition: MRMTransitionGroup.h:136
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:128
bool chromatogramIdsMatch()
Ensure that chromatogram native ids match their keys in the map.
Definition: MRMTransitionGroup.h:283
MRMTransitionGroup()
Default constructor.
Definition: MRMTransitionGroup.h:87
std::vector< TransitionType > & getTransitionsMuteable()
Definition: MRMTransitionGroup.h:148
A 1-dimensional raw data point or peak for chromatograms.
Definition: ChromatogramPeak.h:55
std::vector< ChromatogramType > & getPrecursorChromatograms()
Definition: MRMTransitionGroup.h:214
A multi-chromatogram MRM feature.
Definition: MRMFeature.h:50
void addPrecursorChromatogram(ChromatogramType &chromatogram, String key)
Definition: MRMTransitionGroup.h:229
virtual ~MRMTransitionGroup()
Destructor.
Definition: MRMTransitionGroup.h:105
const TransitionType & getTransition(String key)
Definition: MRMTransitionGroup.h:164
std::map< String, int > precursor_chromatogram_map_
Definition: MRMTransitionGroup.h:458