OpenMS
Loading...
Searching...
No Matches
DDAWorkflowCommons.h
Go to the documentation of this file.
1// Copyright (c) 2002-present, The OpenMS Team -- EKU Tuebingen, ETH Zurich, and FU Berlin
2// SPDX-License-Identifier: BSD-3-Clause
3//
4// --------------------------------------------------------------------------
5// $Maintainer: Timo Sachsenberg $
6// $Authors: Timo Sachsenberg $
7// --------------------------------------------------------------------------
8
9#pragma once
10
15#include <OpenMS/SYSTEM/File.h>
23
24#include <map>
25#include <vector>
26
27namespace OpenMS
28{
34 class OPENMS_DLLAPI DDAWorkflowCommons
35 {
36 public:
37 /* @brief create Map between mzML file and corresponding id file
38 * Checks implemented:
39 * - Check if the number of spectra and id files match.
40 * - If spectra and id files share common base names (without extension)
41 * but appear in different order, throw an error.
42 *
43 * @param[in] in <StringList> List of mzML file paths.
44 * @param[in] in_ids <StringList> List of identification file paths.
45 * @return <std::map<String, String>> A map where keys are mzML file paths and values are corresponding id file paths.
46 * @throws Exception::InvalidParameter if the number of mzML files and identification files don't match
47 * @throws Exception::MissingInformation if files share common base names but appear in different order
48 * @note This mapping is crucial for linking raw data with identification results in DDA workflows.
49 */
50 static std::map<String, String> mapMzML2Ids(StringList & in, StringList & in_ids);
51
61 static std::map<String, String> mapId2MzMLs(const std::map<String, String>& m2i);
62
71 static double estimateMedianChromatographicFWHM(MSExperiment & ms_centroided);
72
85 static void recalibrateMS1(MSExperiment & ms_centroided,
86 PeptideIdentificationList& peptide_ids,
87 const String & id_file_abs_path = ""
88 );
89
111 static void calculateSeeds(
112 const MSExperiment & ms_centroided,
113 const double intensity_threshold,
114 FeatureMap & seeds,
115 double median_fwhm,
116 Size charge_min = 2,
117 Size charge_max = 5
118 );
119
120 };
121
122}
Common functions for DDA workflows.
Definition DDAWorkflowCommons.h:35
static void calculateSeeds(const MSExperiment &ms_centroided, const double intensity_threshold, FeatureMap &seeds, double median_fwhm, Size charge_min=2, Size charge_max=5)
Extracts seeding features from centroided MS data (e.g., for untarged extraction).
static void recalibrateMS1(MSExperiment &ms_centroided, PeptideIdentificationList &peptide_ids, const String &id_file_abs_path="")
Recalibrates the masses of the MSExperiment using peptide identifications.
static std::map< String, String > mapMzML2Ids(StringList &in, StringList &in_ids)
static std::map< String, String > mapId2MzMLs(const std::map< String, String > &m2i)
Small helper to get the mapping from id files to mzML files.
static double estimateMedianChromatographicFWHM(MSExperiment &ms_centroided)
A container for features.
Definition FeatureMap.h:82
In-Memory representation of a mass spectrometry run.
Definition MSExperiment.h:49
Container for peptide identifications from multiple spectra.
Definition PeptideIdentificationList.h:66
A more convenient string class.
Definition String.h:34
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition Types.h:97
std::vector< String > StringList
Vector of String.
Definition ListUtils.h:44
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19