79 std::vector< OpenSwath::ChromatogramPtr >& output,
80 const std::vector<ExtractionCoordinates>& extraction_coordinates,
81 double mz_extraction_window,
86 extraction_coordinates, mz_extraction_window, ppm, -1, filter);
108 std::vector< OpenSwath::ChromatogramPtr >& output,
109 const std::vector<ExtractionCoordinates>& extraction_coordinates,
110 double mz_extraction_window,
112 double im_extraction_window,
116 extraction_coordinates, mz_extraction_window, ppm, im_extraction_window, filter);
142 std::vector< ExtractionCoordinates > & coordinates,
144 const double rt_extraction_window,
145 const bool ms1 =
false,
146 const int ms1_isotopes = 0);
149 std::vector< ExtractionCoordinates > & coordinates,
151 const double rt_extraction_window,
152 const bool ms1 =
false,
153 const int ms1_isotopes = 0);
169 template <
typename TransitionExpT>
171 const std::vector< ChromatogramExtractor::ExtractionCoordinates > & coordinates,
172 TransitionExpT& transition_exp_used,
174 std::vector<OpenMS::MSChromatogram > & output_chromatograms,
176 double im_extraction_width = 0.0)
178 typedef std::map<String, const typename TransitionExpT::Transition* > TransitionMapType;
179 TransitionMapType trans_map;
180 for (
Size i = 0; i < transition_exp_used.getTransitions().size(); i++)
182 trans_map[transition_exp_used.getTransitions()[i].getNativeID()] = &transition_exp_used.getTransitions()[i];
185 for (
Size i = 0; i < chromatograms.size(); i++)
192 OpenSwathDataAccessHelper::convertToOpenMSChromatogram(chromptr, chrom);
207 String transition_group_id = OpenSwathHelper::computeTransitionGroupId(coord.
id);
208 if (!transition_group_id.empty())
211 String r = extract_id_(transition_exp_used, transition_group_id, prec_charge);
218 typename TransitionExpT::Transition transition = (*trans_map[coord.
id]);
220 prec.
setMZ(transition.getPrecursorMZ());
229 prod.
setMZ(transition.getProductMZ());
231 chrom.
setChromatogramType(ChromatogramSettings::SELECTED_REACTION_MONITORING_CHROMATOGRAM);
235 if (!transition.getPeptideRef().empty())
238 String r = extract_id_(transition_exp_used, transition.getPeptideRef(), prec_charge);
245 String r = extract_id_(transition_exp_used, transition.getCompoundRef(), prec_charge);
251 if (coord.
ion_mobility >= 0 && im_extraction_width > 0.0)
269 output_chromatograms.push_back(chrom);
283 template <
typename TransitionExpT>
300 template <
class SpectrumSettingsT,
class ChromatogramT>
302 std::vector<ChromatogramT>& chromatograms,
314 if (settings.getPrecursors().size() > 0)
322 for (
Size pep_idx = 0; pep_idx < transition_exp.
getPeptides().size(); pep_idx++)
325 if (pep->
id == pepref)
332 for (
Size comp_idx = 0; comp_idx < transition_exp.
getCompounds().size(); comp_idx++)
335 if (comp->
id == compref)
343 chrom.setPrecursor(prec);
348 chrom.setProduct(prod);
351 chrom.setInstrumentSettings(settings.getInstrumentSettings());
352 chrom.setAcquisitionInfo(settings.getAcquisitionInfo());
353 chrom.setSourceFile(settings.getSourceFile());
355 for (
Size j = 0; j < settings.getDataProcessing().size(); ++j)
357 settings.getDataProcessing()[j]->setMetaValue(
"performed_on_spectra",
"true");
358 chrom.getDataProcessing().push_back(settings.getDataProcessing()[j]);
363 chrom.setChromatogramType(ChromatogramSettings::SELECTED_REACTION_MONITORING_CHROMATOGRAM);
364 chromatograms.push_back(chrom);
373 double rt_extraction_window);
380 double rt_extraction_window);
393 prec_charge = comp.
charge;
420 if (c.hasCharge()) {prec_charge = c.getChargeState();}
void setPrecursor(const Precursor &precursor)
sets the precursors
void setProduct(const Product &product)
sets the products
std::vector< DataProcessingPtr > & getDataProcessing()
returns a mutable reference to the description of the applied processing
void setInstrumentSettings(const InstrumentSettings &instrument_settings)
sets the instrument settings of the current spectrum
void setSourceFile(const SourceFile &source_file)
sets the source file
void setChromatogramType(ChromatogramType type)
sets the chromatogram type
void setAcquisitionInfo(const AcquisitionInfo &acquisition_info)
sets the acquisition info
void setNativeID(const String &native_id)
sets the native identifier for the spectrum, used by the acquisition software.
The representation of a chromatogram.
Definition MSChromatogram.h:30
void setMZ(CoordinateType mz)
Mutable access to m/z.
Definition Peak1D.h:95
Precursor meta information.
Definition Precursor.h:37
void setIsolationWindowUpperOffset(double bound)
sets the upper offset from the target m/z
void setDriftTime(double drift_time)
sets the ion mobility drift time in milliseconds
void setDriftTimeWindowUpperOffset(double drift_time)
sets the upper offset from the target ion mobility
void setDriftTimeWindowLowerOffset(double drift_time)
sets the lower offset from the target ion mobility
void setIsolationWindowLowerOffset(double bound)
sets the lower offset from the target m/z
void setCharge(Int charge)
Mutable access to the charge.
Product meta information.
Definition Product.h:26
void setMZ(double mz)
sets the target m/z
Base class for all classes that want to report their progress.
Definition ProgressLogger.h:27
This class stores a SRM/MRM transition.
Definition ReactionMonitoringTransition.h:34
double getPrecursorMZ() const
get the precursor mz (Q1 value)
const String & getNativeID() const
const String & getCompoundRef() const
double getProductMZ() const
const String & getPeptideRef() const
Representation of 1D spectrum settings.
Definition SpectrumSettings.h:44
std::vector< DataProcessingPtr > & getDataProcessing()
returns a mutable reference to the description of the applied processing
const std::vector< Precursor > & getPrecursors() const
returns a const reference to the precursors
const InstrumentSettings & getInstrumentSettings() const
returns a const reference to the instrument settings of the current spectrum
const SourceFile & getSourceFile() const
returns a const reference to the source file
const AcquisitionInfo & getAcquisitionInfo() const
returns a const reference to the acquisition info
A more convenient string class.
Definition String.h:34
Represents a compound (small molecule)
Definition TargetedExperimentHelper.h:298
String id
Definition TargetedExperimentHelper.h:281
int getChargeState() const
Return the peptide or compound charge state.
Definition TargetedExperimentHelper.h:218
bool hasCharge() const
Whether peptide or compound has set charge state.
Definition TargetedExperimentHelper.h:212
Represents a peptide (amino acid sequence)
Definition TargetedExperimentHelper.h:335
String sequence
Definition TargetedExperimentHelper.h:395
A description of a targeted experiment containing precursor and production ions.
Definition TargetedExperiment.h:39
const Compound & getCompoundByRef(const String &ref) const
const Peptide & getPeptideByRef(const String &ref) const
bool hasCompound(const String &ref) const
bool hasPeptide(const String &ref) const
const std::vector< ReactionMonitoringTransition > & getTransitions() const
returns the transition list
const std::vector< Compound > & getCompounds() const
const std::vector< Peptide > & getPeptides() const
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition Types.h:97
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
std::shared_ptr< Chromatogram > ChromatogramPtr
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/DataStructures.h:153
std::shared_ptr< ISpectrumAccess > SpectrumAccessPtr
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:131
Definition TransitionExperiment.h:268
std::string sequence
Definition TransitionExperiment.h:279
std::string compound_name
Definition TransitionExperiment.h:288
int charge
Definition TransitionExperiment.h:278
Definition TransitionExperiment.h:356
const LightCompound & getCompoundByRef(const std::string &ref)
Definition TransitionExperiment.h:403