OpenMS
Loading...
Searching...
No Matches
SpectrumNativeIDParser.h
Go to the documentation of this file.
1// Copyright (c) 2002-present, OpenMS Inc. -- EKU Tuebingen, ETH Zurich, and FU Berlin
2// SPDX-License-Identifier: BSD-3-Clause
3//
4// --------------------------------------------------------------------------
5// $Maintainer: Timo Sachsenberg $
6// $Authors: Hendrik Weisser, Timo Sachsenberg $
7// --------------------------------------------------------------------------
8
9#pragma once
10
12#include <OpenMS/OpenMSConfig.h>
13
15
16namespace OpenMS
17{
60 class OPENMS_DLLAPI SpectrumNativeIDParser
61 {
62 public:
77 static Int extractScanNumber(const std::string& native_id, const RegularExpression& scan_regexp, bool no_error = false);
78
91 static Int extractScanNumber(const std::string& native_id,
92 const std::string& native_id_type_accession);
93
112 static std::string getRegExFromNativeID(const std::string& native_id);
113
123 static bool isNativeID(const std::string& id);
124
125 };
126
127} // namespace OpenMS
Compiled Perl-compatible regular expression, including named capture groups.
Definition RegularExpression.h:30
Parser for extracting scan numbers from spectrum native IDs.
Definition SpectrumNativeIDParser.h:61
static Int extractScanNumber(const std::string &native_id, const RegularExpression &scan_regexp, bool no_error=false)
Extract the scan number from the native ID of a spectrum using a regular expression.
static Int extractScanNumber(const std::string &native_id, const std::string &native_id_type_accession)
Extract the scan number from the native ID using a CV accession.
static std::string getRegExFromNativeID(const std::string &native_id)
Determine the regular expression to extract scan/index numbers from native IDs.
static bool isNativeID(const std::string &id)
Check if a spectrum identifier is a native ID from a vendor file.
int Int
Signed integer type.
Definition Types.h:72
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19