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
14#include <boost/regex.hpp>
15
16namespace OpenMS
17{
60 class OPENMS_DLLAPI SpectrumNativeIDParser
61 {
62 public:
77 static Int extractScanNumber(const String& native_id,
78 const boost::regex& scan_regexp,
79 bool no_error = false);
80
93 static Int extractScanNumber(const String& native_id,
94 const String& native_id_type_accession);
95
113 static std::string getRegExFromNativeID(const String& native_id);
114
124 static bool isNativeID(const String& id);
125
126 };
127
128} // namespace OpenMS
Parser for extracting scan numbers from spectrum native IDs.
Definition SpectrumNativeIDParser.h:61
static Int extractScanNumber(const String &native_id, const boost::regex &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 String &native_id, const String &native_id_type_accession)
Extract the scan number from the native ID using a CV accession.
static bool isNativeID(const String &id)
Check if a spectrum identifier is a native ID from a vendor file.
static std::string getRegExFromNativeID(const String &native_id)
Determine the regular expression to extract scan/index numbers from native IDs.
A more convenient string class.
Definition String.h:34
int Int
Signed integer type.
Definition Types.h:72
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19