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++)
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());
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]);
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
void setInstrumentSettings(const InstrumentSettings &instrument_settings)
sets the instrument settings of the current spectrum
@ BASEPEAK_CHROMATOGRAM
Definition: ChromatogramSettings.h:46
@ SELECTED_REACTION_MONITORING_CHROMATOGRAM
Definition: ChromatogramSettings.h:48
void setSourceFile(const SourceFile &source_file)
sets the source file
void setChromatogramType(ChromatogramType type)
sets the chromatogram type
std::vector< DataProcessingPtr > & getDataProcessing()
returns a mutable reference to the description of the applied processing
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
static void convertToOpenMSChromatogram(const OpenSwath::ChromatogramPtr &cptr, OpenMS::MSChromatogram &chromatogram)
Convert a ChromatogramPtr to an OpenMS Chromatogram.
static String computeTransitionGroupId(const String &precursor_id)
Compute transition group id.
Definition: OpenSwathHelper.h:56
void setMZ(CoordinateType mz)
Mutable access to m/z.
Definition: Peak1D.h:93
Precursor meta information.
Definition: Precursor.h:35
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:24
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:32
double getPrecursorMZ() const
get the precursor mz (Q1 value)
double getProductMZ() const
const String & getCompoundRef() const
const String & getPeptideRef() const
const String & getNativeID() const
Representation of 1D spectrum settings.
Definition: SpectrumSettings.h:39
const SourceFile & getSourceFile() const
returns a const reference to the source file
const AcquisitionInfo & getAcquisitionInfo() const
returns a const reference to the acquisition info
const InstrumentSettings & getInstrumentSettings() const
returns a const reference to the instrument settings of the current spectrum
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
A more convenient string class.
Definition: String.h:34
Represents a compound (small molecule)
Definition: TargetedExperimentHelper.h:296
String id
Definition: TargetedExperimentHelper.h:279
int getChargeState() const
Return the peptide or compound charge state.
Definition: TargetedExperimentHelper.h:216
bool hasCharge() const
Whether peptide or compound has set charge state.
Definition: TargetedExperimentHelper.h:210
Represents a peptide (amino acid sequence)
Definition: TargetedExperimentHelper.h:333
String sequence
Definition: TargetedExperimentHelper.h:393
A description of a targeted experiment containing precursor and production ions.
Definition: TargetedExperiment.h:39
const Peptide & getPeptideByRef(const String &ref) const
const std::vector< Peptide > & getPeptides() const
const Compound & getCompoundByRef(const String &ref) const
const std::vector< ReactionMonitoringTransition > & getTransitions() const
returns the transition list
bool hasCompound(const String &ref) const
bool hasPeptide(const String &ref) const
const std::vector< Compound > & getCompounds() const
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:97
const double c
Definition: Constants.h:188
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
boost::shared_ptr< Chromatogram > ChromatogramPtr
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/DataStructures.h:146
boost::shared_ptr< ISpectrumAccess > SpectrumAccessPtr
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:131
Definition: TransitionExperiment.h:127
std::string sequence
Definition: TransitionExperiment.h:138
std::string compound_name
Definition: TransitionExperiment.h:147
int charge
Definition: TransitionExperiment.h:137
Definition: TransitionExperiment.h:185
const LightCompound & getCompoundByRef(const std::string &ref)
Definition: TransitionExperiment.h:232