68 return transition_group_id +
"_Precursor_i" +
String(isotope);
84 std::vector<String> substrings;
85 precursor_id.
split(
"_", substrings);
87 if (substrings.size() == 3)
return substrings[0];
88 else if (substrings.size() > 3)
91 for (
Size k = 0;
k < substrings.size() - 2;
k++) r += substrings[
k] +
"_";
92 return r.
prefix(r.size() - 1);
110 double min_upper_edge_dist,
111 double lower,
double upper);
126 double min_upper_edge_dist,
127 double lower,
double upper);
137 double min_upper_edge_dist,
const std::vector< OpenSwath::SwathMap > & swath_maps);
157 double& lower,
double& upper,
double& center);
170 template <
class TargetedExperimentT>
172 const TargetedExperimentT& targeted_exp,
173 TargetedExperimentT& selected_transitions,
174 double min_upper_edge_dist)
176 if (exp.
empty() || exp[0].getPrecursors().
empty())
179 <<
" does not have any experiments or any precursors. Is it a SWATH map? " 180 <<
"I will move to the next map." 184 double upper, lower, center;
187 if (selected_transitions.getTransitions().size() == 0)
190 <<
" no transition were within the precursor window of " << lower <<
" to " << upper
224 bool useQualCutoff =
false,
225 double qualCutoff = 0.0);
const double k
Definition: Constants.h:158
A more convenient string class.
Definition: String.h:58
A helper class that is used by several OpenSWATH tools.
Definition: OpenSwathHelper.h:49
std::map< String, MRMTransitionGroupType > TransitionGroupMapType
Definition: MRMFeatureFinderScoring.h:105
static String computePrecursorId(const String &transition_group_id, int isotope)
Compute unique precursor identifier.
Definition: OpenSwathHelper.h:66
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
static String computeTransitionGroupId(const String &precursor_id)
Compute transition group id.
Definition: OpenSwathHelper.h:82
static bool checkSwathMapAndSelectTransitions(const OpenMS::PeakMap &exp, const TargetedExperimentT &targeted_exp, TargetedExperimentT &selected_transitions, double min_upper_edge_dist)
Check the map and select transition in one function.
Definition: OpenSwathHelper.h:171
const String & getLoadedFilePath() const
get the file_name_ which is the absolute path to the file loaded from
bool empty() const
Are there any spectra (does not consider chromatograms)
Definition: MSExperiment.h:159
In-Memory representation of a mass spectrometry run.
Definition: MSExperiment.h:70
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
static void selectSwathTransitions(const OpenMS::TargetedExperiment &targeted_exp, OpenMS::TargetedExperiment &selected_transitions, double min_upper_edge_dist, double lower, double upper)
Select transitions between lower and upper and write them into the new TargetedExperiment.
String prefix(SizeType length) const
returns the prefix of length length
A description of a targeted experiment containing precursor and production ions.
Definition: TargetedExperiment.h:64
Definition: TransitionExperiment.h:218
bool split(const char splitter, std::vector< String > &substrings, bool quote_protect=false) const
Splits a string into substrings using splitter as delimiter.
static void checkSwathMap(const OpenMS::PeakMap &swath_map, double &lower, double &upper, double ¢er)
Get the lower / upper offset for this SWATH map and do some sanity checks.