112 template <
typename SpectrumT,
typename TransitionT>
118 std::vector<MSChromatogram > picked_chroms_;
119 std::vector<MSChromatogram > smoothed_chroms_;
130 !transition_group.
getTransition(native_id).isDetectingTransition() )
136 picker_.pickChromatogram(chromatogram, picked_chrom, smoothed_chrom);
138 picked_chroms_.push_back(picked_chrom);
139 smoothed_chroms_.push_back(smoothed_chrom);
147 SpectrumT picked_chrom, smoothed_chrom;
149 String native_id = chromatogram.getNativeID();
151 picker_.pickChromatogram(chromatogram, picked_chrom, smoothed_chrom);
152 picked_chrom.sortByIntensity();
153 picked_chroms_.push_back(picked_chrom);
154 smoothed_chroms_.push_back(smoothed_chrom);
162 int chr_idx, peak_idx, cnt = 0;
163 std::vector<MRMFeature> features;
166 chr_idx = -1; peak_idx = -1;
168 if (boundary_selection_method_ ==
"largest")
170 findLargestPeak(picked_chroms_, chr_idx, peak_idx);
172 else if (boundary_selection_method_ ==
"widest")
174 findWidestPeakIndices(picked_chroms_, chr_idx, peak_idx);
177 if (chr_idx == -1 && peak_idx == -1)
break;
180 MRMFeature mrm_feature = createMRMFeature(transition_group, picked_chroms_, smoothed_chroms_, chr_idx, peak_idx);
183 features.push_back(mrm_feature);
187 if (stop_after_feature_ > 0 && cnt > stop_after_feature_) {
break;}
196 for (
Size i = 0; i < features.size(); i++)
200 for (
Size j = 0; j < i; j++)
202 if ((
double)mrm_feature.
getMetaValue(
"leftWidth") >= (
double)features[j].getMetaValue(
"leftWidth") &&
215 template <
typename SpectrumT,
typename TransitionT>
217 std::vector<SpectrumT>& picked_chroms, std::vector<SpectrumT>& smoothed_chroms,
const int chr_idx,
const int peak_idx)
224 double best_left = picked_chroms[chr_idx].getFloatDataArrays()[1][peak_idx];
225 double best_right = picked_chroms[chr_idx].getFloatDataArrays()[2][peak_idx];
226 double peak_apex = picked_chroms[chr_idx][peak_idx].getRT();
227 LOG_DEBUG <<
"**** Creating MRMFeature for peak " << chr_idx <<
" " << peak_idx <<
" " <<
228 picked_chroms[chr_idx][peak_idx] <<
" with borders " << best_left <<
" " <<
229 best_right <<
" (" << best_right - best_left <<
")" << std::endl;
231 if (recalculate_peaks_)
234 recalculatePeakBorders_(picked_chroms, best_left, best_right, recalculate_peaks_max_z_);
235 if (peak_apex < best_left || peak_apex > best_right)
238 peak_apex = (best_left + best_right) / 2.0;
241 picked_chroms[chr_idx][peak_idx].setIntensity(0.0);
246 remove_overlapping_features(picked_chroms, best_left, best_right);
249 if (min_peak_width_ > 0.0 && std::fabs(best_right - best_left) < min_peak_width_)
254 if (compute_peak_quality_)
257 double qual = computeQuality_(transition_group, picked_chroms, chr_idx, best_left, best_right, outlier);
258 if (qual < min_qual_)
262 mrmFeature.setMetaValue(
"potentialOutlier", outlier);
263 mrmFeature.setMetaValue(
"initialPeakQuality", qual);
264 mrmFeature.setOverallQuality(qual);
270 SpectrumT master_peak_container;
271 const SpectrumT& ref_chromatogram = selectChromHelper_(transition_group, picked_chroms[chr_idx].getNativeID());
272 prepareMasterContainer_(ref_chromatogram, master_peak_container, best_left, best_right);
277 double total_intensity = 0;
double total_peak_apices = 0;
double total_xic = 0;
280 const SpectrumT& chromatogram = selectChromHelper_(transition_group, transition_group.
getTransitions()[
k].getNativeID());
283 for (
typename SpectrumT::const_iterator it = chromatogram.begin(); it != chromatogram.end(); it++)
285 total_xic += it->getIntensity();
289 SpectrumT used_chromatogram;
291 if (peak_integration_ ==
"original")
293 used_chromatogram = resampleChromatogram_(chromatogram, master_peak_container, best_left, best_right);
296 else if (peak_integration_ ==
"smoothed" && smoothed_chroms.size() <=
k)
299 "Tried to calculate peak area and height without any smoothed chromatograms");
301 else if (peak_integration_ ==
"smoothed")
303 used_chromatogram = resampleChromatogram_(smoothed_chroms[
k], master_peak_container, best_left, best_right);
308 String(
"Peak integration chromatogram ") + peak_integration_ +
" is not a valid method for MRMTransitionGroupPicker");
317 double peak_integral = pa.
area;
318 double peak_apex_int = pa.
height;
320 if (background_subtraction_ !=
"none")
322 double background{0};
323 double avg_noise_level{0};
324 if ((peak_integration_ ==
"smoothed") && smoothed_chroms.size() <=
k)
327 "Tried to calculate background estimation without any smoothed chromatograms");
329 else if (background_subtraction_ ==
"original")
331 const double intensity_left = chromatogram.PosBegin(best_left)->getIntensity();
332 const double intensity_right = (chromatogram.PosEnd(best_right) - 1)->getIntensity();
333 const UInt n_points = std::distance(chromatogram.PosBegin(best_left), chromatogram.PosEnd(best_right));
334 avg_noise_level = (intensity_right + intensity_left) / 2;
335 background = avg_noise_level * n_points;
337 else if (background_subtraction_ ==
"exact")
340 background = pb.
area;
341 avg_noise_level = pb.
height;
343 peak_integral -= background;
344 peak_apex_int -= avg_noise_level;
345 if (peak_integral < 0) {peak_integral = 0;}
346 if (peak_apex_int < 0) {peak_apex_int = 0;}
349 f.
setMetaValue(
"noise_background_level", avg_noise_level);
352 f.
setRT(picked_chroms[chr_idx][peak_idx].getMZ());
357 if (chromatogram.metaValueExists(
"product_mz"))
359 f.
setMetaValue(
"MZ", chromatogram.getMetaValue(
"product_mz"));
360 f.
setMZ(chromatogram.getMetaValue(
"product_mz"));
364 LOG_WARN <<
"Please set meta value 'product_mz' on chromatogram to populate feature m/z value" << std::endl;
366 f.
setMetaValue(
"native_id", chromatogram.getNativeID());
371 total_intensity += peak_integral;
372 total_peak_apices += peak_apex_int;
377 if (compute_peak_shape_metrics_)
398 mrmFeature.addFeature(f, chromatogram.getNativeID());
409 SpectrumT used_chromatogram;
411 if (peak_integration_ ==
"original")
413 used_chromatogram = resampleChromatogram_(chromatogram, master_peak_container, best_left, best_right);
416 else if (peak_integration_ ==
"smoothed" && smoothed_chroms.size() <= prec_idx)
419 "Tried to calculate peak area and height without any smoothed chromatograms");
421 else if (peak_integration_ ==
"smoothed")
423 used_chromatogram = resampleChromatogram_(smoothed_chroms[prec_idx], master_peak_container, best_left, best_right);
428 String(
"Peak integration chromatogram ") + peak_integration_ +
" is not a valid method for MRMTransitionGroupPicker");
437 double peak_integral = pa.
area;
438 double peak_apex_int = pa.
height;
440 if (background_subtraction_ !=
"none")
442 double background{0};
443 double avg_noise_level{0};
444 if ((peak_integration_ ==
"smoothed") && smoothed_chroms.size() <= prec_idx)
447 "Tried to calculate background estimation without any smoothed chromatograms");
449 else if (background_subtraction_ ==
"original")
451 const double intensity_left = chromatogram.PosBegin(best_left)->getIntensity();
452 const double intensity_right = (chromatogram.PosEnd(best_right) - 1)->getIntensity();
453 const UInt n_points = std::distance(chromatogram.PosBegin(best_left), chromatogram.PosEnd(best_right));
454 avg_noise_level = (intensity_right + intensity_left) / 2;
455 background = avg_noise_level * n_points;
457 else if (background_subtraction_ ==
"exact")
460 background = pb.
area;
461 avg_noise_level = pb.
height;
463 peak_integral -= background;
464 peak_apex_int -= avg_noise_level;
465 if (peak_integral < 0) {peak_integral = 0;}
466 if (peak_apex_int < 0) {peak_apex_int = 0;}
469 f.
setMetaValue(
"noise_background_level", avg_noise_level);
472 if (chromatogram.metaValueExists(
"precursor_mz"))
474 f.
setMZ(chromatogram.getMetaValue(
"precursor_mz"));
475 mrmFeature.setMZ(chromatogram.getMetaValue(
"precursor_mz"));
478 f.
setRT(picked_chroms[chr_idx][peak_idx].getMZ());
483 f.
setMetaValue(
"native_id", chromatogram.getNativeID());
488 total_intensity += peak_integral;
491 mrmFeature.addPrecursorFeature(f, chromatogram.getNativeID());
494 mrmFeature.setRT(peak_apex);
495 mrmFeature.setIntensity(total_intensity);
497 mrmFeature.setMetaValue(
"leftWidth", best_left);
498 mrmFeature.setMetaValue(
"rightWidth", best_right);
499 mrmFeature.setMetaValue(
"total_xic", total_xic);
500 mrmFeature.setMetaValue(
"peak_apices_sum", total_peak_apices);
502 mrmFeature.ensureUniqueId();
519 template <
typename SpectrumT>
524 for (
Size k = 0;
k < picked_chroms.size();
k++)
526 for (
Size i = 0; i < picked_chroms[
k].size(); i++)
528 if (picked_chroms[
k][i].getMZ() >= best_left && picked_chroms[
k][i].getMZ() <= best_right)
532 picked_chroms[
k][i].setIntensity(0.0);
538 for (
Size k = 0;
k < picked_chroms.size();
k++)
540 for (
Size i = 0; i < picked_chroms[
k].size(); i++)
542 if (picked_chroms[
k][i].getIntensity() <= 0.0) {
continue; }
544 double left = picked_chroms[
k].getFloatDataArrays()[1][i];
545 double right = picked_chroms[
k].getFloatDataArrays()[2][i];
546 if ((left > best_left && left < best_right)
547 || (right > best_left && right < best_right))
551 picked_chroms[
k][i].setIntensity(0.0);
558 void findLargestPeak(std::vector<MSChromatogram >& picked_chroms,
int& chr_idx,
int& peak_idx);
568 void findWidestPeakIndices(
const std::vector<MSChromatogram>& picked_chroms,
Int& chrom_idx,
Int& point_idx)
const;
573 void updateMembers_()
override;
581 template <
typename SpectrumT,
typename TransitionT>
594 throw Exception::IllegalArgument(__FILE__, __LINE__, OPENMS_PRETTY_FUNCTION,
"Did not find chromatogram for id '" + native_id +
"'.");
614 template <
typename SpectrumT,
typename TransitionT>
616 std::vector<SpectrumT>& picked_chroms,
const int chr_idx,
617 const double best_left,
const double best_right,
String& outlier)
623 double resample_boundary = resample_boundary_;
624 SpectrumT master_peak_container;
625 const SpectrumT& ref_chromatogram = selectChromHelper_(transition_group, picked_chroms[chr_idx].getNativeID());
626 prepareMasterContainer_(ref_chromatogram, master_peak_container, best_left - resample_boundary, best_right + resample_boundary);
627 std::vector<std::vector<double> > all_ints;
628 for (
Size k = 0;
k < picked_chroms.size();
k++)
630 const SpectrumT chromatogram = selectChromHelper_(transition_group, picked_chroms[
k].getNativeID());
631 const SpectrumT used_chromatogram = resampleChromatogram_(chromatogram,
632 master_peak_container, best_left - resample_boundary, best_right + resample_boundary);
634 std::vector<double> int_here;
635 for (
Size i = 0; i < used_chromatogram.size(); i++)
637 int_here.push_back(used_chromatogram[i].getIntensity());
639 all_ints.push_back(int_here);
643 std::vector<double> mean_shapes;
644 std::vector<double> mean_coel;
645 for (
Size k = 0;
k < all_ints.size();
k++)
647 std::vector<double> shapes;
648 std::vector<double> coel;
649 for (
Size i = 0; i < all_ints.size(); i++)
651 if (i ==
k) {
continue;}
653 all_ints[
k], all_ints[i], boost::numeric_cast<int>(all_ints[i].size()), 1);
659 shapes.push_back(res_shape);
660 coel.push_back(res_coelution);
666 msc = std::for_each(shapes.begin(), shapes.end(), msc);
667 double shapes_mean = msc.
mean();
668 msc = std::for_each(coel.begin(), coel.end(), msc);
669 double coel_mean = msc.
mean();
673 mean_shapes.push_back(shapes_mean);
674 mean_coel.push_back(coel_mean);
680 int min_index_shape = std::distance(mean_shapes.begin(), std::min_element(mean_shapes.begin(), mean_shapes.end()));
681 int max_index_coel = std::distance(mean_coel.begin(), std::max_element(mean_coel.begin(), mean_coel.end()));
684 int missing_peaks = 0;
685 int multiple_peaks = 0;
688 std::vector<double> left_borders;
689 std::vector<double> right_borders;
690 for (
Size k = 0;
k < picked_chroms.size();
k++)
699 for (
Size i = 0; i < picked_chroms[
k].size(); i++)
701 if (picked_chroms[
k][i].getMZ() >= best_left && picked_chroms[
k][i].getMZ() <= best_right)
704 if (picked_chroms[
k][i].getIntensity() > max_int)
706 max_int = picked_chroms[
k][i].getIntensity() > max_int;
707 l_tmp = picked_chroms[
k].getFloatDataArrays()[1][i];
708 r_tmp = picked_chroms[
k].getFloatDataArrays()[2][i];
713 if (l_tmp > 0.0) left_borders.push_back(l_tmp);
714 if (r_tmp > 0.0) right_borders.push_back(r_tmp);
716 if (pfound == 0) missing_peaks++;
717 if (pfound > 1) multiple_peaks++;
722 LOG_DEBUG <<
" Overall found missing : " << missing_peaks <<
" and multiple : " << multiple_peaks << std::endl;
728 if (min_index_shape == max_index_coel)
730 LOG_DEBUG <<
" element " << min_index_shape <<
" is a candidate for removal ... " << std::endl;
731 outlier =
String(picked_chroms[min_index_shape].getNativeID());
743 double shape_score = std::accumulate(mean_shapes.begin(), mean_shapes.end(), 0.0) / mean_shapes.size();
744 double coel_score = std::accumulate(mean_coel.begin(), mean_coel.end(), 0.0) / mean_coel.size();
745 coel_score = (coel_score - 1.0) / 2.0;
747 double score = shape_score - coel_score - 1.0 * missing_peaks / picked_chroms.size();
749 LOG_DEBUG <<
" computed score " << score <<
" (from " << shape_score <<
750 " - " << coel_score <<
" - " << 1.0 * missing_peaks / picked_chroms.size() <<
")" << std::endl;
764 template <
typename SpectrumT>
771 std::vector<double> left_borders;
772 std::vector<double> right_borders;
773 for (
Size k = 0;
k < picked_chroms.size();
k++)
778 for (
Size i = 0; i < picked_chroms[
k].size(); i++)
780 if (picked_chroms[
k][i].getMZ() >= best_left && picked_chroms[
k][i].getMZ() <= best_right)
782 if (picked_chroms[
k].getFloatDataArrays()[0][i] > max_int)
784 max_int = picked_chroms[
k].getFloatDataArrays()[0][i];
785 left = picked_chroms[
k].getFloatDataArrays()[1][i];
786 right = picked_chroms[
k].getFloatDataArrays()[2][i];
792 left_borders.push_back(left);
793 right_borders.push_back(right);
794 LOG_DEBUG <<
" * " <<
k <<
" left boundary " << left_borders.back() <<
" with int " << max_int << std::endl;
795 LOG_DEBUG <<
" * " <<
k <<
" right boundary " << right_borders.back() <<
" with int " << max_int << std::endl;
800 if (right_borders.empty())
818 mean = std::accumulate(right_borders.begin(), right_borders.end(), 0.0) / (
double) right_borders.size();
819 stdev = std::sqrt(std::inner_product(right_borders.begin(), right_borders.end(), right_borders.begin(), 0.0)
820 / right_borders.size() -
mean *
mean);
821 std::sort(right_borders.begin(), right_borders.end());
823 LOG_DEBUG <<
" - Recalculating right peak boundaries " <<
mean <<
" mean / best " 824 << best_right <<
" std " << stdev <<
" : " << std::fabs(best_right -
mean) / stdev
825 <<
" coefficient of variation" << std::endl;
828 if (std::fabs(best_right -
mean) / stdev > max_z)
830 best_right = right_borders[right_borders.size() / 2];
831 LOG_DEBUG <<
" - Setting right boundary to " << best_right << std::endl;
835 mean = std::accumulate(left_borders.begin(), left_borders.end(), 0.0) / (
double) left_borders.size();
836 stdev = std::sqrt(std::inner_product(left_borders.begin(), left_borders.end(), left_borders.begin(), 0.0)
837 / left_borders.size() -
mean *
mean);
838 std::sort(left_borders.begin(), left_borders.end());
840 LOG_DEBUG <<
" - Recalculating left peak boundaries " <<
mean <<
" mean / best " 841 << best_left <<
" std " << stdev <<
" : " << std::fabs(best_left -
mean) / stdev
842 <<
" coefficient of variation" << std::endl;
845 if (std::fabs(best_left -
mean) / stdev > max_z)
847 best_left = left_borders[left_borders.size() / 2];
848 LOG_DEBUG <<
" - Setting left boundary to " << best_left << std::endl;
870 template <
typename SpectrumT>
872 SpectrumT& master_peak_container,
double left_boundary,
double right_boundary)
879 typename SpectrumT::const_iterator begin = ref_chromatogram.begin();
880 while (begin != ref_chromatogram.end() && begin->getMZ() < left_boundary) {begin++; }
881 if (begin != ref_chromatogram.begin()) {begin--; }
883 typename SpectrumT::const_iterator end = begin;
884 while (end != ref_chromatogram.end() && end->getMZ() < right_boundary) {end++; }
885 if (end != ref_chromatogram.end()) {end++; }
888 master_peak_container.resize(distance(begin, end));
889 typename SpectrumT::iterator it = master_peak_container.begin();
890 for (
typename SpectrumT::const_iterator chrom_it = begin; chrom_it != end; chrom_it++, it++)
892 it->setMZ(chrom_it->getMZ());
906 template <
typename SpectrumT>
908 const SpectrumT& master_peak_container,
double left_boundary,
double right_boundary)
913 typename SpectrumT::const_iterator begin = chromatogram.begin();
914 while (begin != chromatogram.end() && begin->getMZ() < left_boundary) {begin++;}
915 if (begin != chromatogram.begin()) {begin--;}
917 typename SpectrumT::const_iterator end = begin;
918 while (end != chromatogram.end() && end->getMZ() < right_boundary) {end++;}
919 if (end != chromatogram.end()) {end++;}
921 SpectrumT resampled_peak_container = master_peak_container;
923 lresampler.
raster(begin, end, resampled_peak_container.begin(), resampled_peak_container.end());
925 return resampled_peak_container;
double total_width
Definition: PeakIntegrator.h:165
bool hasTransition(String key) const
Definition: MRMTransitionGroup.h:158
double min_qual_
Definition: MRMTransitionGroupPicker.h:937
String background_subtraction_
Definition: MRMTransitionGroupPicker.h:932
double recalculate_peaks_max_z_
Definition: MRMTransitionGroupPicker.h:942
A more convenient string class.
Definition: String.h:57
bool compute_peak_quality_
Definition: MRMTransitionGroupPicker.h:935
void setMZ(CoordinateType coordinate)
Mutable access to the m/z coordinate (index 1)
Definition: Peak2D.h:202
double mean() const
Definition: StatsHelpers.h:207
The representation of a chromatogram.
Definition: MSChromatogram.h:54
const std::vector< TransitionType > & getTransitions() const
Definition: MRMTransitionGroup.h:142
#define OPENMS_PRECONDITION(condition, message)
Precondition macro.
Definition: openms/include/OpenMS/CONCEPT/Macros.h:106
Definition: PeakIntegrator.h:106
bool hasPrecursorChromatogram(String key) const
Definition: MRMTransitionGroup.h:236
unsigned int UInt
Unsigned integer type.
Definition: Types.h:94
OPENSWATHALGO_DLLAPI XCorrArrayType::const_iterator xcorrArrayGetMaxPeak(const XCorrArrayType &array)
Find best peak in an cross-correlation (highest apex)
const std::vector< ChromatogramType > & getPrecursorChromatograms() const
Definition: MRMTransitionGroup.h:208
Int points_across_half_height
Definition: PeakIntegrator.h:207
double start_position_at_50
Definition: PeakIntegrator.h:149
The PeakPickerMRM finds peaks a single chromatogram.
Definition: PeakPickerMRM.h:68
PeakIntegrator pi_
Definition: MRMTransitionGroupPicker.h:953
double width_at_5
Definition: PeakIntegrator.h:129
double slope_of_baseline
Definition: PeakIntegrator.h:194
double start_position_at_5
Definition: PeakIntegrator.h:141
int stop_after_feature_
Definition: MRMTransitionGroupPicker.h:939
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
const std::vector< ConvexHull2D > & getConvexHulls() const
Non-mutable access to the convex hulls.
IntensityType getIntensity() const
Definition: Peak2D.h:166
String peak_integration_
Definition: MRMTransitionGroupPicker.h:931
A 2-dimensional hull representation in [counter]clockwise direction - depending on axis labelling...
Definition: ConvexHull2D.h:72
ChromatogramType & getChromatogram(String key)
Definition: MRMTransitionGroup.h:197
#define LOG_DEBUG
Macro for general debugging information.
Definition: LogStream.h:458
static double mean(IteratorType begin, IteratorType end)
Calculates the mean of a range of values.
Definition: StatisticFunctions.h:134
void setIntensity(IntensityType intensity)
Non-mutable access to the data point intensity (height)
Definition: Peak2D.h:172
#define LOG_WARN
Macro if a warning, a piece of information which should be read by the user, should be logged...
Definition: LogStream.h:450
double start_position_at_10
Definition: PeakIntegrator.h:145
void sortByIntensity(bool reverse=false)
Lexicographically sorts the peaks by their intensity.
double min_peak_width_
Definition: MRMTransitionGroupPicker.h:941
double resample_boundary_
Definition: MRMTransitionGroupPicker.h:943
const SpectrumT & selectChromHelper_(MRMTransitionGroup< SpectrumT, TransitionT > &transition_group, String native_id)
Select matching precursor or fragment ion chromatogram.
Definition: MRMTransitionGroupPicker.h:582
bool isInternallyConsistent() const
Check whether internal state is consistent, e.g. same number of chromatograms and transitions are pre...
Definition: MRMTransitionGroup.h:273
bool hasChromatogram(String key) const
Definition: MRMTransitionGroup.h:192
const std::vector< ChromatogramType > & getChromatograms() const
Definition: MRMTransitionGroup.h:174
A method or algorithm argument contains illegal values.
Definition: Exception.h:648
void setRT(CoordinateType coordinate)
Mutable access to the RT coordinate (index 0)
Definition: Peak2D.h:214
The MRMTransitionGroupPicker finds peaks in chromatograms that belong to the same precursors...
Definition: MRMTransitionGroupPicker.h:79
double end_position_at_10
Definition: PeakIntegrator.h:157
bool recalculate_peaks_
Definition: MRMTransitionGroupPicker.h:933
ConvexHull2D::PointArrayType hull_points
Definition: PeakIntegrator.h:98
void setQuality(Size index, QualityType q)
Set the quality in dimension c.
double width_at_50
Definition: PeakIntegrator.h:137
void raster(SpecT &container)
Applies the resampling algorithm to a container (MSSpectrum or MSChromatogram).
Definition: LinearResamplerAlign.h:80
bool compute_peak_shape_metrics_
Definition: MRMTransitionGroupPicker.h:936
Linear Resampling of raw data with alignment.
Definition: LinearResamplerAlign.h:57
void prepareMasterContainer_(const SpectrumT &ref_chromatogram, SpectrumT &master_peak_container, double left_boundary, double right_boundary)
Create an empty master peak container that has the correct mz / RT values set.
Definition: MRMTransitionGroupPicker.h:871
void setHullPoints(const PointArrayType &points)
accessor for the outer(!) points (no checking is performed if this is actually a convex hull) ...
const String & getTransitionGroupID() const
Definition: MRMTransitionGroup.h:130
double computeQuality_(MRMTransitionGroup< SpectrumT, TransitionT > &transition_group, std::vector< SpectrumT > &picked_chroms, const int chr_idx, const double best_left, const double best_right, String &outlier)
Compute transition group quality (higher score is better)
Definition: MRMTransitionGroupPicker.h:615
Int points_across_baseline
Definition: PeakIntegrator.h:203
An LC-MS feature.
Definition: Feature.h:69
ChromatogramType & getPrecursorChromatogram(String key)
Definition: MRMTransitionGroup.h:241
functor to compute the mean and stddev of sequence using the std::foreach algorithm ...
Definition: StatsHelpers.h:169
double end_position_at_5
Definition: PeakIntegrator.h:153
double area
Definition: PeakIntegrator.h:86
void addFeature(MRMFeature &feature)
Definition: MRMTransitionGroup.h:262
Definition: PeakIntegrator.h:124
double asymmetry_factor
Definition: PeakIntegrator.h:189
void setOverallQuality(QualityType q)
Set the overall quality.
double end_position_at_50
Definition: PeakIntegrator.h:161
SpectrumT resampleChromatogram_(const SpectrumT &chromatogram, const SpectrumT &master_peak_container, double left_boundary, double right_boundary)
Resample a container at the positions indicated by the master peak container.
Definition: MRMTransitionGroupPicker.h:907
double height
Definition: PeakIntegrator.h:115
double width_at_10
Definition: PeakIntegrator.h:133
const String & getNativeID() const
returns the native identifier for the spectrum, used by the acquisition software. ...
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
void pickTransitionGroup(MRMTransitionGroup< SpectrumT, TransitionT > &transition_group)
Pick a group of chromatograms belonging to the same peptide.
Definition: MRMTransitionGroupPicker.h:113
Compute the area, background and shape metrics of a peak.
Definition: PeakIntegrator.h:68
PeakPickerMRM picker_
Definition: MRMTransitionGroupPicker.h:952
bool chromatogramIdsMatch()
Ensure that chromatogram native ids match their keys in the map.
Definition: MRMTransitionGroup.h:282
Definition: PeakIntegrator.h:81
MRMFeature createMRMFeature(MRMTransitionGroup< SpectrumT, TransitionT > &transition_group, std::vector< SpectrumT > &picked_chroms, std::vector< SpectrumT > &smoothed_chroms, const int chr_idx, const int peak_idx)
Create feature from a vector of chromatograms and a specified peak.
Definition: MRMTransitionGroupPicker.h:216
double area
Definition: PeakIntegrator.h:111
bool use_precursors_
Definition: MRMTransitionGroupPicker.h:934
double apex_pos
Definition: PeakIntegrator.h:94
OPENSWATHALGO_DLLAPI XCorrArrayType normalizedCrossCorrelation(std::vector< double > &data1, std::vector< double > &data2, const int &maxdelay, const int &lag)
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:91
void remove_overlapping_features(std::vector< SpectrumT > &picked_chroms, double best_left, double best_right)
Remove overlapping features.
Definition: MRMTransitionGroupPicker.h:520
String boundary_selection_method_
Which method to use for selecting peaks' boundaries.
Definition: MRMTransitionGroupPicker.h:950
double stop_after_intensity_ratio_
Definition: MRMTransitionGroupPicker.h:940
A multi-chromatogram MRM feature.
Definition: MRMFeature.h:49
void recalculatePeakBorders_(std::vector< SpectrumT > &picked_chroms, double &best_left, double &best_right, double max_z)
Recalculate the borders of the peak.
Definition: MRMTransitionGroupPicker.h:765
double height
Definition: PeakIntegrator.h:90
int Int
Signed integer type.
Definition: Types.h:102
double tailing_factor
Definition: PeakIntegrator.h:179
const TransitionType & getTransition(String key)
Definition: MRMTransitionGroup.h:163
double baseline_delta_2_height
Definition: PeakIntegrator.h:199