OpenMS
SiriusFragmentAnnotation.h
Go to the documentation of this file.
1 // Copyright (c) 2002-2023, The OpenMS Team -- EKU Tuebingen, ETH Zurich, and FU Berlin
2 // SPDX-License-Identifier: BSD-3-Clause
3 //
4 // --------------------------------------------------------------------------
5 // $Maintainer: Oliver Alka $
6 // $Authors: Oliver Alka $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
12 
13 namespace OpenMS
14 {
15  class OPENMS_DLLAPI SiriusFragmentAnnotation
16  {
17  public:
18 
23  {
24  public:
25 
28 
30  SiriusTargetDecoySpectra(MSSpectrum target_spectrum, MSSpectrum decoy_spectrum) : target(std::move(target_spectrum)), decoy(std::move(decoy_spectrum)) {}
31  };
32 
45  static std::vector<SiriusTargetDecoySpectra> extractAndResolveSiriusAnnotations(const std::vector<String>& sirius_workspace_subdirs, double score_threshold,
46  bool use_exact_mass);
47  static std::vector<MSSpectrum> extractSiriusAnnotationsTgtOnly(const std::vector<String>& sirius_workspace_subdirs, double score_threshold, bool use_exact_mass, bool resolve);
48 
49 
81  static std::vector<MSSpectrum> extractAnnotationsFromSiriusFile(const String& path_to_sirius_workspace, Size max_rank = 1, bool decoy = false, bool use_exact_mass = false);
82 
83  protected:
92  static OpenMS::String extractConcatNativeIDsFromSiriusMS_(const OpenMS::String& path_to_sirius_workspace);
93 
104  static OpenMS::String extractConcatMIDsFromSiriusMS_(const String& path_to_sirius_workspace);
105 
114  static OpenMS::String extractFeatureIDFromSiriusMS_(const String& path_to_sirius_workspace);
115 
124  static std::map< Size, String > extractCompoundRankingAndFilename_(const String& path_to_sirius_workspace);
125 
134  static std::map< Size, double > extractCompoundRankingAndScore_(const String& path_to_sirius_workspace);
135 
136  };
137 } // namespace OpenMS
The representation of a 1D spectrum.
Definition: MSSpectrum.h:44
SiriusTargetDecoySpectra holds the target and/or decoy information for one entry (subdirectory from S...
Definition: SiriusFragmentAnnotation.h:23
SiriusTargetDecoySpectra(MSSpectrum target_spectrum, MSSpectrum decoy_spectrum)
Definition: SiriusFragmentAnnotation.h:30
MSSpectrum target
Definition: SiriusFragmentAnnotation.h:26
MSSpectrum decoy
Definition: SiriusFragmentAnnotation.h:27
Definition: SiriusFragmentAnnotation.h:16
static std::map< Size, double > extractCompoundRankingAndScore_(const String &path_to_sirius_workspace)
extractCompoundRankingAndFilename Extract compound ranking and score (./formula_candidates....
static std::vector< MSSpectrum > extractAnnotationsFromSiriusFile(const String &path_to_sirius_workspace, Size max_rank=1, bool decoy=false, bool use_exact_mass=false)
extractSiriusFragmentAnnotationMapping Extract concatenated native ids and concatenated m_ids (unique...
static OpenMS::String extractConcatMIDsFromSiriusMS_(const String &path_to_sirius_workspace)
extractConcatMIDsFromSiriusMS Extract m_ids from SIRIUS output (./spectrum.ms) and concatenates them....
static OpenMS::String extractFeatureIDFromSiriusMS_(const String &path_to_sirius_workspace)
extractConcatMIDsFromSiriusMS Extract fid (i.e. original OpenMS feature ID) from SIRIUS output (....
static OpenMS::String extractConcatNativeIDsFromSiriusMS_(const OpenMS::String &path_to_sirius_workspace)
extractConcatNativeIDsFromSiriusMS Extract concatenated native id from SIRIUS output (....
static std::map< Size, String > extractCompoundRankingAndFilename_(const String &path_to_sirius_workspace)
extractCompoundRankingAndFilename Extract compound ranking and filename (./formula_candidates....
static std::vector< SiriusTargetDecoySpectra > extractAndResolveSiriusAnnotations(const std::vector< String > &sirius_workspace_subdirs, double score_threshold, bool use_exact_mass)
extractAndResolveSiriusAnnotations Extract and resolves SIRIUS target and/or decoy annotation for map...
static std::vector< MSSpectrum > extractSiriusAnnotationsTgtOnly(const std::vector< String > &sirius_workspace_subdirs, double score_threshold, bool use_exact_mass, bool resolve)
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:101
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:22