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

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

Classes

class  SiriusAdapterHit
 Internal structure used in SiriusAdapter that is used for the conversion of the sirius output to an mzTab. More...
 
class  SiriusAdapterIdentification
 
class  SiriusAdapterRun
 
class  SiriusSpectrumMSInfo
 

Static Public Member Functions

static int extractScanIndex (const String &path)
 Extract scan_index from filepath. More...
 
static int extractScanNumber (const String &path)
 Extract scan_number from filepath. More...
 
static String extractFeatureId (const String &path)
 Extract feature_id from filepath. More...
 
static std::map< std::string, Sizeextract_columnname_to_columnindex (CsvFile &csvfile)
 Extract columnname and index based in SIRIUS entries. More...
 
static SiriusSpectrumMSInfo extractSpectrumMSInfo (const String &single_sirius_path)
 Extract mz, rt of the precursor and the nativeID of the corresponding MS2 spectra in the spectrum.ms file. More...
 
static void read (const std::vector< String > &sirius_output_paths, const String &original_input_mzml, const Size &top_n_hits, MzTab &result)
 Conversion of sirius output to mzTab. More...
 

Class Documentation

◆ OpenMS::SiriusMzTabWriter::SiriusAdapterHit

class OpenMS::SiriusMzTabWriter::SiriusAdapterHit

Internal structure used in SiriusAdapter that is used for the conversion of the sirius output to an mzTab.

SiriusAdapterHit: formula (String) - Sumformula adduct (String) - Assigned adduct precursor_formula (String) - Sumformula of the precursor (can be the same as formula) rank (int) - Rank of the possible sumformula for a compound (spectrum) calculated by Sirius rank_score (double) - Ranking score iso_score (double) - Isotope pattern score tree_score (double) - Fragmentation pattern score sirius_score (double) - Overall score of the possible sumformula for a compound (spectrum) calculated by Sirius explainedpeaks (int) - Number of explained peaks explainedintensity (double) - Relative amount of explained intensity

SiriusAdapterIdentification: scan_index (int) - Index of the spectrum used scan_number (int) - NativeId of the spectrum used feature_id (String) - FeatureId (if spectrum was assigned to a feature) hits (vector<SiriusAdapterHit>)

SiriusAdapterRun: identifications (vector<SiriusAdapterIdentification>)

Store a specific

Parameters
numberof lines from sirius output
Returns
mzTab
Collaboration diagram for SiriusMzTabWriter::SiriusAdapterHit:
[legend]
Class Members
String adduct
double explainedintensity
int explainedpeaks
String formula
double iso_score
double mass_error_precursor_ppm
double median_absolute_mass_error_fragment_peaks_ppm
double median_mass_error_fragment_peaks_ppm
String precursor_formula
int rank
double sirius_score
double tree_score

◆ OpenMS::SiriusMzTabWriter::SiriusAdapterIdentification

class OpenMS::SiriusMzTabWriter::SiriusAdapterIdentification
Collaboration diagram for SiriusMzTabWriter::SiriusAdapterIdentification:
[legend]
Class Members
String feature_id
vector< SiriusAdapterHit > hits
double mz
StringList native_ids
double rt
int scan_index
int scan_number

◆ OpenMS::SiriusMzTabWriter::SiriusAdapterRun

class OpenMS::SiriusMzTabWriter::SiriusAdapterRun
Collaboration diagram for SiriusMzTabWriter::SiriusAdapterRun:
[legend]
Class Members
vector< SiriusAdapterIdentification > identifications

◆ OpenMS::SiriusMzTabWriter::SiriusSpectrumMSInfo

class OpenMS::SiriusMzTabWriter::SiriusSpectrumMSInfo
Collaboration diagram for SiriusMzTabWriter::SiriusSpectrumMSInfo:
[legend]
Class Members
double ext_mz
StringList ext_n_id
double ext_rt

Member Function Documentation

◆ extract_columnname_to_columnindex()

static std::map< std::string, Size > extract_columnname_to_columnindex ( CsvFile csvfile)
static

Extract columnname and index based in SIRIUS entries.

◆ extractFeatureId()

static String extractFeatureId ( const String path)
static

Extract feature_id from filepath.

◆ extractScanIndex()

static int extractScanIndex ( const String path)
static

Extract scan_index from filepath.

◆ extractScanNumber()

static int extractScanNumber ( const String path)
static

Extract scan_number from filepath.

◆ extractSpectrumMSInfo()

static SiriusSpectrumMSInfo extractSpectrumMSInfo ( const String single_sirius_path)
static

Extract mz, rt of the precursor and the nativeID of the corresponding MS2 spectra in the spectrum.ms file.

◆ read()

static void read ( const std::vector< String > &  sirius_output_paths,
const String original_input_mzml,
const Size top_n_hits,
MzTab result 
)
static

Conversion of sirius output to mzTab.

Output of Sirius is one directory per spectrum/compound

Parameters
sirius_output_pathsPath to output directories of Sirius
original_input_mzmlPath to mzml input of SiriusAdapter
top_n_hitsTop n entries for each compound written to the result file
Returns
: Result written to mzTab