35 #ifndef OPENMS_ANALYSIS_OPENSWATH_DATAACCESS_MRMFEATUREACCESSOPENMS_H 36 #define OPENMS_ANALYSIS_OPENSWATH_DATAACCESS_MRMFEATUREACCESSOPENMS_H 45 #include <boost/shared_ptr.hpp> 68 void getRT(std::vector<double>& rt);
70 void getIntensity(std::vector<double>& intens);
93 boost::shared_ptr<OpenSwath::IFeature> getFeature(std::string nativeID);
95 boost::shared_ptr<OpenSwath::IFeature> getPrecursorFeature(std::string nativeID);
97 std::vector<std::string> getNativeIDs()
const;
99 std::vector<std::string> getPrecursorIDs()
const;
101 float getIntensity();
109 std::map<std::string, boost::shared_ptr<FeatureOpenMS> >
features_;
117 template <
typename SpectrumT,
typename TransitionT>
134 return trgroup_.size();
139 std::vector<std::string> result;
140 for (std::size_t i = 0; i < this->size(); i++)
142 result.push_back(trgroup_.getChromatograms()[i].getNativeID());
149 trgroup_.getLibraryIntensity(intensities);
160 template <
typename ContainerT>
167 double sn_win_len_,
unsigned int sn_bin_count_,
bool write_log_messages) :
168 chromatogram_(chromat), sn_()
171 snt_parameters.
setValue(
"win_len", sn_win_len_);
172 snt_parameters.
setValue(
"bin_count", sn_bin_count_);
174 if (write_log_messages)
176 snt_parameters.
setValue(
"write_log_messages",
"true");
180 snt_parameters.
setValue(
"write_log_messages",
"false");
183 sn_.setParameters(snt_parameters);
184 sn_.init(chromatogram_);
189 if (chromatogram_.empty()) {
return -1;}
193 typename ContainerT::const_iterator iter = chromatogram_.MZEnd(RT);
196 if (iter == chromatogram_.end())
201 typename ContainerT::const_iterator prev = iter;
202 if (prev != chromatogram_.begin() )
207 if (std::fabs(prev->getMZ() - RT) < std::fabs(iter->getMZ() - RT) )
210 return sn_.getSignalToNoise(*prev);
215 return sn_.getSignalToNoise(*iter);
228 #endif // OPENMS_ANALYSIS_OPENSWATH_DATAACCESS_MRMFEATUREACCESSOPENMS_H TransitionGroupOpenMS(MRMTransitionGroup< SpectrumT, TransitionT > &trgroup)
Definition: MRMFeatureAccessOpenMS.h:123
An implementation of the OpenSWATH Feature Access interface using OpenMS.
Definition: MRMFeatureAccessOpenMS.h:59
void setValue(const String &key, const DataValue &value, const String &description="", const StringList &tags=StringList())
Sets a value.
Feature * feature_
Definition: MRMFeatureAccessOpenMS.h:77
std::vector< std::string > getNativeIDs()
Definition: MRMFeatureAccessOpenMS.h:137
const MRMTransitionGroup< SpectrumT, TransitionT > & trgroup_
Definition: MRMFeatureAccessOpenMS.h:153
SignalToNoiseOpenMS(ContainerT &chromat, double sn_win_len_, unsigned int sn_bin_count_, bool write_log_messages)
Definition: MRMFeatureAccessOpenMS.h:166
An implementation of the OpenSWATH Transition Group Access interface using OpenMS.
Definition: MRMFeatureAccessOpenMS.h:118
OpenMS::SignalToNoiseEstimatorMedian< ContainerT > sn_
Definition: MRMFeatureAccessOpenMS.h:222
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
Definition: ITransition.h:69
std::map< std::string, boost::shared_ptr< FeatureOpenMS > > features_
Definition: MRMFeatureAccessOpenMS.h:109
std::size_t size()
Definition: MRMFeatureAccessOpenMS.h:132
Definition: ITransition.h:46
An implementation of the OpenSWATH SignalToNoise Access interface using OpenMS.
Definition: MRMFeatureAccessOpenMS.h:161
void getLibraryIntensities(std::vector< double > &intensities)
Definition: MRMFeatureAccessOpenMS.h:147
An LC-MS feature.
Definition: Feature.h:70
std::map< std::string, boost::shared_ptr< FeatureOpenMS > > precursor_features_
Definition: MRMFeatureAccessOpenMS.h:110
Management and storage of parameters / INI files.
Definition: Param.h:75
Definition: ITransition.h:56
const MRMFeature & mrmfeature_
Definition: MRMFeatureAccessOpenMS.h:108
~TransitionGroupOpenMS()
Definition: MRMFeatureAccessOpenMS.h:128
const ContainerT & chromatogram_
Definition: MRMFeatureAccessOpenMS.h:221
A multi-chromatogram MRM feature.
Definition: MRMFeature.h:50
double getValueAtRT(double RT)
Definition: MRMFeatureAccessOpenMS.h:187
Definition: ITransition.h:77
An implementation of the OpenSWATH MRM Feature Access interface using OpenMS.
Definition: MRMFeatureAccessOpenMS.h:84