|
OpenMS
2.6.0
|
Go to the documentation of this file.
39 #include <boost/numeric/conversion/cast.hpp>
66 template <
typename ChromatogramType,
typename TransitionType>
324 result.push_back(it->getLibraryIntensity());
326 for (
Size i = 0; i < result.size(); i++)
343 if (
std::find(tr_ids.begin(), tr_ids.end(), tr_it->getNativeID()) != tr_ids.end())
347 transition_group_subset.
addTransition(*tr_it, tr_it->getNativeID());
366 mf.
setRT(tgf_it->getRT());
367 std::vector<String> metavalues;
368 tgf_it->getKeys(metavalues);
369 for (std::vector<String>::iterator key_it = metavalues.begin(); key_it != metavalues.end(); ++key_it)
375 if (
std::find(tr_ids.begin(), tr_ids.end(), tr_it->getNativeID()) != tr_ids.end())
377 mf.
addFeature(tgf_it->getFeature(tr_it->getNativeID()),tr_it->getNativeID());
380 std::vector<String> pf_ids;
381 tgf_it->getPrecursorFeatureIDs(pf_ids);
382 for (std::vector<String>::iterator pf_ids_it = pf_ids.begin(); pf_ids_it != pf_ids.end(); ++pf_ids_it)
389 return transition_group_subset;
399 if (
std::find(tr_ids.begin(), tr_ids.end(), tr_it->getNativeID()) != tr_ids.end())
401 transition_group_subset.
addTransition(*tr_it, tr_it->getNativeID());
411 return transition_group_subset;
428 double highest_score =
getFeatures()[0].getOverallQuality();
431 if (
getFeatures()[it].getOverallQuality() > highest_score)
434 highest_score =
getFeatures()[it].getOverallQuality();
const ChromatogramType & getPrecursorChromatogram(const String &key) const
Definition: MRMTransitionGroup.h:255
bool isInternallyConsistent() const
Check whether internal state is consistent, e.g. same number of chromatograms and transitions are pre...
Definition: MRMTransitionGroup.h:292
void addPrecursorChromatogram(const ChromatogramType &chromatogram, const String &key)
Definition: MRMTransitionGroup.h:235
std::vector< ChromatogramType > chromatograms_
chromatogram list
Definition: MRMTransitionGroup.h:466
void setTransitionGroupID(const String &tr_gr_id)
Definition: MRMTransitionGroup.h:135
const String & getNativeID() const
returns the native identifier for the spectrum, used by the acquisition software.
const std::vector< ChromatogramType > & getChromatograms() const
Definition: MRMTransitionGroup.h:179
const MRMFeature & getBestFeature() const
Returns the best feature by overall quality.
Definition: MRMTransitionGroup.h:422
A more convenient string class.
Definition: String.h:59
bool hasPrecursorChromatogram(const String &key) const
Definition: MRMTransitionGroup.h:243
std::vector< MRMFeature > & getFeaturesMuteable()
Definition: MRMTransitionGroup.h:271
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
std::vector< TransitionType > TransitionsType
List of Reaction Monitoring transitions (meta data) type.
Definition: MRMTransitionGroup.h:77
#define OPENMS_PRECONDITION(condition, message)
Precondition macro.
Definition: openms/include/OpenMS/CONCEPT/Macros.h:136
void setIntensity(IntensityType intensity)
Non-mutable access to the data point intensity (height)
Definition: Peak2D.h:172
A multi-chromatogram MRM feature.
Definition: MRMFeature.h:50
void addFeature(const Feature &feature, const String &key)
Adds an feature from a single chromatogram into the feature.
MRMTransitionGroup(const MRMTransitionGroup &rhs)
Copy Constructor.
Definition: MRMTransitionGroup.h:91
void setRT(CoordinateType coordinate)
Mutable access to the RT coordinate (index 0)
Definition: Peak2D.h:214
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
bool hasTransition(String key) const
Definition: MRMTransitionGroup.h:158
bool hasChromatogram(const String &key) const
Definition: MRMTransitionGroup.h:192
std::vector< TransitionType > & getTransitionsMuteable()
Definition: MRMTransitionGroup.h:147
ChromatogramType & getChromatogram(const String &key)
Definition: MRMTransitionGroup.h:197
void addPrecursorFeature(const Feature &feature, const String &key)
Adds a precursor feature from a single chromatogram into the feature.
A 1-dimensional raw data point or peak for chromatograms.
Definition: ChromatogramPeak.h:53
std::map< String, int > chromatogram_map_
Definition: MRMTransitionGroup.h:474
std::vector< ChromatogramType > & getPrecursorChromatograms()
Definition: MRMTransitionGroup.h:215
ChromatogramType & getPrecursorChromatogram(const String &key)
Definition: MRMTransitionGroup.h:248
MRMTransitionGroup()
Default constructor.
Definition: MRMTransitionGroup.h:86
bool isMappingConsistent_() const
Checks that the mapping between chromatograms and transitions is consistent.
Definition: MRMTransitionGroup.h:443
virtual ~MRMTransitionGroup()
Destructor.
Definition: MRMTransitionGroup.h:104
bool find(TFinder &finder, const Pattern< TNeedle, FuzzyAC > &me, PatternAuxData< TNeedle > &dh)
Definition: AhoCorasickAmbiguous.h:884
std::map< String, int > precursor_chromatogram_map_
Definition: MRMTransitionGroup.h:475
std::map< String, int > transition_map_
Definition: MRMTransitionGroup.h:476
MRMTransitionGroup & operator=(const MRMTransitionGroup &rhs)
Definition: MRMTransitionGroup.h:109
MRMFeatureListType mrm_features_
feature list
Definition: MRMTransitionGroup.h:472
const ChromatogramType & getChromatogram(const String &key) const
Definition: MRMTransitionGroup.h:204
TransitionsType transitions_
transition list
Definition: MRMTransitionGroup.h:463
const TransitionType & getTransition(String key)
Definition: MRMTransitionGroup.h:163
void addFeature(const MRMFeature &feature)
Definition: MRMTransitionGroup.h:276
ChromatogramType::PeakType PeakType
Peak type.
Definition: MRMTransitionGroup.h:79
const std::vector< MRMFeature > & getFeatures() const
Definition: MRMTransitionGroup.h:266
The representation of a group of transitions in a targeted proteomics experiment.
Definition: MRMTransitionGroup.h:67
The representation of a chromatogram.
Definition: MSChromatogram.h:54
String tr_gr_id_
transition group id (peak group id)
Definition: MRMTransitionGroup.h:460
MRMTransitionGroup subsetDependent(std::vector< std::string > tr_ids) const
Definition: MRMTransitionGroup.h:392
void addFeature(MRMFeature &&feature)
Definition: MRMTransitionGroup.h:281
std::vector< MRMFeature > MRMFeatureListType
Type definitions.
Definition: MRMTransitionGroup.h:75
bool chromatogramIdsMatch() const
Ensure that chromatogram native ids match their keys in the map.
Definition: MRMTransitionGroup.h:301
MRMTransitionGroup subset(std::vector< std::string > tr_ids) const
Definition: MRMTransitionGroup.h:336
std::vector< ChromatogramType > & getChromatograms()
Definition: MRMTransitionGroup.h:174
void getLibraryIntensity(std::vector< double > &result) const
Definition: MRMTransitionGroup.h:320
const std::vector< TransitionType > & getTransitions() const
Definition: MRMTransitionGroup.h:142
std::vector< ChromatogramType > precursor_chromatograms_
precursor chromatogram list
Definition: MRMTransitionGroup.h:469
Size size() const
Definition: MRMTransitionGroup.h:125
const String & getTransitionGroupID() const
Definition: MRMTransitionGroup.h:130
const std::vector< ChromatogramType > & getPrecursorChromatograms() const
Definition: MRMTransitionGroup.h:220
void addTransition(const TransitionType &transition, String key)
Definition: MRMTransitionGroup.h:152
void addChromatogram(const ChromatogramType &chromatogram, const String &key)
Definition: MRMTransitionGroup.h:184