OpenMS  2.7.0
Classes | Static Public Member Functions | Static Protected Member Functions | List of all members
SiriusFragmentAnnotation Class Reference

#include <OpenMS/FORMAT/DATAACCESS/SiriusFragmentAnnotation.h>

Classes

class  SiriusTargetDecoySpectra
 SiriusTargetDecoySpectra holds the target and/or decoy information for one entry (subdirectory from SIRIUS) More...
 

Static Public Member Functions

static std::vector< SiriusTargetDecoySpectraextractAndResolveSiriusAnnotations (const std::vector< String > &sirius_workspace_subdirs, const double &score_threshold, bool use_exact_mass)
 extractAndResolveSiriusAnnotations Extract and resolves SIRIUS target and/or decoy annotation for mapping native_id to MSSpectrum. More...
 
static void extractSiriusFragmentAnnotationMapping (const String &path_to_sirius_workspace, MSSpectrum &msspectrum_to_fill, bool use_exact_mass=false)
 extractSiriusFragmentAnnotationMapping Extract concatenated native ids and concatenated m_ids (unique identifier) from (./spectrum.ms) and fragment annotation (./spectra/1_sumformula.tsv) from SIRIUS output (per compound). More...
 
static void extractSiriusDecoyAnnotationMapping (const String &path_to_sirius_workspace, MSSpectrum &msspectrum_to_fill)
 extractSiriusDecoyAnnotationMapping Extract concatenated native ids and concatenated m_ids (./spectrum.ms) and fragment annotation (./decoy/1_sumformula.tsv) from SIRIUS/PASSATUTTO output (per compound). More...
 

Static Protected Member Functions

static OpenMS::String extractConcatNativeIDsFromSiriusMS_ (const OpenMS::String &path_to_sirius_workspace)
 extractConcatNativeIDsFromSiriusMS Extract concatenated native id from SIRIUS output (./spectrum.ms) and concatenates them. More...
 
static OpenMS::String extractConcatMIDsFromSiriusMS_ (const String &path_to_sirius_workspace)
 extractConcatMIDsFromSiriusMS Extract m_ids from SIRIUS output (./spectrum.ms) and concatenates them. M_id is the native id + an index, which is incremented based on the number of possible identifications (accurate mass search). More...
 
static void extractAnnotationFromSiriusFile_ (const String &path_to_sirius_workspace, MSSpectrum &msspectrum_to_fill, bool use_exact_mass=false)
 extractAnnotationFromSiriusFile Extract fragment annotation from SIRIUS (./spectra/1_sumformula.tsv). More...
 
static std::map< Size, StringextractCompoundRankingAndFilename_ (const String &path_to_sirius_workspace)
 extractCompoundRankingAndFilename Extract compound ranking and filename (./formula_candidates.tsv). More...
 
static std::map< Size, double > extractCompoundRankingAndScore_ (const String &path_to_sirius_workspace)
 extractCompoundRankingAndFilename Extract compound ranking and score (./formula_candidates.tsv). More...
 
static void extractAnnotationFromDecoyFile_ (const String &path_to_sirius_workspace, MSSpectrum &msspectrum_to_fill)
 extractAnnotationFromDecoyFile Extract decoy annotation from SIRIUS/PASSATUTTO (./decoys/1_sumformula.tsv). More...
 

Member Function Documentation

◆ extractAndResolveSiriusAnnotations()

static std::vector<SiriusTargetDecoySpectra> extractAndResolveSiriusAnnotations ( const std::vector< String > &  sirius_workspace_subdirs,
const double &  score_threshold,
bool  use_exact_mass 
)
static

extractAndResolveSiriusAnnotations Extract and resolves SIRIUS target and/or decoy annotation for mapping native_id to MSSpectrum.

Returns
map native_id to annotated MSSpectrum (target or decoy)

If there are multiple identifications for a feature with the same MS2 spectras (concatenated native ids) the identification with the higher SIRIUS score is chosen (currently based on the explained peak intensities).

Parameters
sirius_workspace_subdirsVector of paths to SIRIUS subdirectories.
use_exact_massOption to use exact mass instead of peak mz in MSSpectrum.

◆ extractAnnotationFromDecoyFile_()

static void extractAnnotationFromDecoyFile_ ( const String path_to_sirius_workspace,
MSSpectrum msspectrum_to_fill 
)
staticprotected

extractAnnotationFromDecoyFile Extract decoy annotation from SIRIUS/PASSATUTTO (./decoys/1_sumformula.tsv).

Returns
annotated decoy MSSpectrum (mz, rel. int, fragment explanation, ionization).

MetaValues: peak_mz annotated_sumformula annotated_adduct

Parameters
path_to_sirius_workspacePath to SIRIUS workspace.
use_exact_massOption to use exact mass instead of peak mz in MSSpectrum.

◆ extractAnnotationFromSiriusFile_()

static void extractAnnotationFromSiriusFile_ ( const String path_to_sirius_workspace,
MSSpectrum msspectrum_to_fill,
bool  use_exact_mass = false 
)
staticprotected

extractAnnotationFromSiriusFile Extract fragment annotation from SIRIUS (./spectra/1_sumformula.tsv).

Returns
annotated (consensus) MSSpectrum (mz, int, exact mass, fragment explanation).

MetaValues: peak_mz indicates which mass input was used in Peak1D (mz or exact_mass). annotated_sumformula annotated_adduct

Parameters
path_to_sirius_workspacePath to SIRIUS workspace.
use_exact_massOption to use exact mass instead of peak mz in MSSpectrum.

◆ extractCompoundRankingAndFilename_()

static std::map< Size, String > extractCompoundRankingAndFilename_ ( const String path_to_sirius_workspace)
staticprotected

extractCompoundRankingAndFilename Extract compound ranking and filename (./formula_candidates.tsv).

Returns
a map with specified rank and filename (formula_adduct.tsv) (based on the annotation)
Parameters
path_to_sirius_workspacePath to SIRIUS workspace.

◆ extractCompoundRankingAndScore_()

static std::map< Size, double > extractCompoundRankingAndScore_ ( const String path_to_sirius_workspace)
staticprotected

extractCompoundRankingAndFilename Extract compound ranking and score (./formula_candidates.tsv).

Returns
a map with specified rank and score (explainedIntensity) (based on the annotation)
Parameters
path_to_sirius_workspacePath to SIRIUS workspace.

◆ extractConcatMIDsFromSiriusMS_()

static OpenMS::String extractConcatMIDsFromSiriusMS_ ( const String path_to_sirius_workspace)
staticprotected

extractConcatMIDsFromSiriusMS Extract m_ids from SIRIUS output (./spectrum.ms) and concatenates them. M_id is the native id + an index, which is incremented based on the number of possible identifications (accurate mass search).

Returns
String m_id of current SIRIUS compound
Parameters
path_to_sirius_workspacePath to SIRIUS workspace.

◆ extractConcatNativeIDsFromSiriusMS_()

static OpenMS::String extractConcatNativeIDsFromSiriusMS_ ( const OpenMS::String path_to_sirius_workspace)
staticprotected

extractConcatNativeIDsFromSiriusMS Extract concatenated native id from SIRIUS output (./spectrum.ms) and concatenates them.

Returns
String native id of current SIRIUS compound
Parameters
path_to_sirius_workspacePath to SIRIUS workspace.

◆ extractSiriusDecoyAnnotationMapping()

static void extractSiriusDecoyAnnotationMapping ( const String path_to_sirius_workspace,
MSSpectrum msspectrum_to_fill 
)
static

extractSiriusDecoyAnnotationMapping Extract concatenated native ids and concatenated m_ids (./spectrum.ms) and fragment annotation (./decoy/1_sumformula.tsv) from SIRIUS/PASSATUTTO output (per compound).

Returns
annotated decoy MSSpectrum with associated native id

MetaValues: peak_mz annotated_sumformula annotated_adduct

The data is stored in a MSSpectrum, which contains a Peak1D (mz, int), a FloatDataArray (exact mass),a StringDataArray (explanation), and a StringDataArray (ionization).

MSSpectrum
Peak1D FloatDataArray StringDataArray
mz intensity exact_mass explanation
56.050855 20794.85 56.049476 C3H5N
Parameters
path_to_sirius_workspacePath to SIRIUS workspace.
use_exact_massOption to use exact mass instead of peak mz in MSSpectrum.

◆ extractSiriusFragmentAnnotationMapping()

static void extractSiriusFragmentAnnotationMapping ( const String path_to_sirius_workspace,
MSSpectrum msspectrum_to_fill,
bool  use_exact_mass = false 
)
static

extractSiriusFragmentAnnotationMapping Extract concatenated native ids and concatenated m_ids (unique identifier) from (./spectrum.ms) and fragment annotation (./spectra/1_sumformula.tsv) from SIRIUS output (per compound).

Returns
annotated (consensus) MSSpectrum with associated native id

MetaValues: peak_mz indicates which mass input was used in Peak1D (mass or exact_mass). annotated_sumformula annotated_adduct

The data is stored in a MSSpectrum, which contains a Peak1D (mz, int), a FloatDataArray (exact mass), and a StringDataArray (explanation).

MSSpectrum
Peak1D FloatDataArray StringDataArray
mz intensity exact_mass explanation
56.050855 20794.85 56.049476 C3H5N
Parameters
path_to_sirius_workspacePath to SIRIUS workspace.
use_exact_massOption to use exact mass instead of peak mz in MSSpectrum.