| OpenMS 2.5.0

Classes | Static Public Member Functions | Static Protected Member Functions | List of all members
SiriusMSFile Class Reference

`#include <OpenMS/ANALYSIS/ID/SiriusMSConverter.h>`

## Classes

struct | AccessionInfo
struct | CompoundInfo

## Static Public Member Functions

static void | store (const MSExperiment &spectra, const OpenMS::String &msfile, const FeatureMapping::FeatureToMs2Indices &feature_mapping, const bool &feature_only, const int &isotope_pattern_iterations, const bool no_mt_info, std::vector< SiriusMSFile::CompoundInfo > &v_cmpinfo)
| Internal structure used in SiriusAdapter that is used for the conversion of a MzMlFile to an internal format. More...

## Static Protected Member Functions

static void | writeMsFile_ (std::ofstream &os, const MSExperiment &spectra, const std::vector< size_t > &ms2_spectra_index, const SiriusMSFile::AccessionInfo &ainfo, const StringList &adducts, const std::vector< String > &v_description, const std::vector< String > &v_sumformula, const std::vector< std::pair< double, double >> &f_isotopes, int &feature_charge, uint64_t &feature_id, const double &feature_rt, const double &feature_mz, bool &writecompound, const bool &no_masstrace_info_isotope_pattern, const int &isotope_pattern_iterations, int &count_skipped_spectra, int &count_assume_mono, int &count_no_ms1, std::vector< SiriusMSFile::CompoundInfo > &v_cmpinfo)
| Internal structure to write the .ms file (called in store function) More...

## Class Documentation

## ◆ OpenMS::SiriusMSFile::AccessionInfo

struct OpenMS::SiriusMSFile::AccessionInfo

Class Members
String | native_id_accession | nativeID accession for mztab-m
String | native_id_type | nativeID type for mztab-m
String | sf_accession | sourcefile accessions for mztab-m
String | sf_path | sourcefile path for mztab-m
String | sf_type | sourcefile type for mztab-m

## ◆ OpenMS::SiriusMSFile::CompoundInfo

struct OpenMS::SiriusMSFile::CompoundInfo

Class Members
int | charge | precursor/feature charge
String | cmp | query_id used compound in .ms file
String | des | description/name of the compound
String | fid | annotated feature_id (if available)
double | fmz | annotated mass of a feature (if available)
String | formula | sumformula of the compound
String | ionization | adduct information
vector< String > | mids | native ids and identifier for multiple possible identification via AMS
vector< String > | native_ids | native ids of the associated spectra
double | pint_mono | parent/precursor intensity of the compound
double | pmass | parent/precursor mass of the compound
double | rt | retention time of the compound
vector< String > | scan_indices | index of the associated spectra
String | source_file | sourcefile for mztab-m
String | source_format | format of the sourcefile for mztab-m
String | specref_format | spectra ref format for mztab-m
vector< String > | specrefs | spectra reference for mztab-m

## Member Function Documentation

## ◆ store()

static void store | ( | const MSExperiment & | spectra,
|  | const OpenMS::String & | msfile,
|  | const FeatureMapping::FeatureToMs2Indices & | feature_mapping,
|  | const bool & | feature_only,
|  | const int & | isotope_pattern_iterations,
|  | const bool | no_mt_info,
|  | std::vector< SiriusMSFile::CompoundInfo > & | v_cmpinfo
| ) |  |

static

Internal structure used in SiriusAdapter that is used for the conversion of a MzMlFile to an internal format.

Store .ms file. Comments (see CompoundInfo) are written to SIRIUS .ms file and additionally stores in CompoundInfo struct. If adduct information for a spectrum is missing, no adduct information is added. In this case, SIRIUS assumes default adducts for the respective spectrum.

Returns
  writes .ms file
  stores CompoundInfo

Parameters

  spectra | Peakmap from input mzml.
  msfile | Writes .ms file from sirius.
  feature_mapping | Adducts and features (index).
  feature_only | Only use features.
  isotope_pattern_iterations | At which depth to stop isotope_pattern extraction (if possible).
  v_cmpinfo | Vector of CompoundInfo.

## ◆ writeMsFile_()

static void writeMsFile_ | ( | std::ofstream & | os,
|  | const MSExperiment & | spectra,
|  | const std::vector< size_t > & | ms2_spectra_index,
|  | const SiriusMSFile::AccessionInfo & | ainfo,
|  | const StringList & | adducts,
|  | const std::vector< String > & | v_description,
|  | const std::vector< String > & | v_sumformula,
|  | const std::vector< std::pair< double, double >> & | f_isotopes,
|  | int & | feature_charge,
|  | uint64_t & | feature_id,
|  | const double & | feature_rt,
|  | const double & | feature_mz,
|  | bool & | writecompound,
|  | const bool & | no_masstrace_info_isotope_pattern,
|  | const int & | isotope_pattern_iterations,
|  | int & | count_skipped_spectra,
|  | int & | count_assume_mono,
|  | int & | count_no_ms1,
|  | std::vector< SiriusMSFile::CompoundInfo > & | v_cmpinfo
| ) |  |

static protected

Internal structure to write the .ms file (called in store function)

Parameters

  os | stream
  spectra | spectra
  ms2_spectra_index | vector of index ms2 spectra (in feautre)
  ainfo | accession information
  adducts | vector of adducts
  v_description | vector of descriptions
  v_sumformula | vector of sumformulas
  f_isotopes | isotope pattern of the feature
  feature_charge | feature charge
  feature_id | feature id
  feature_rt | features retention time
  feature_mz | feature mass to charge
  writecompound | bool if new compound should be written in .ms file
  no_masstrace_info_isotope_pattern | bool if isotope pattern should be extracted (if not in feature)
  isotope_pattern_iterations | number of iterations (trying to find a C13 pattern)
  count_skipped_spectra | count number of skipped spectra
  count_assume_mono | count number of features where mono charge was assumend
  count_no_ms1 | count number of compounds without a valid ms1 spectrum
  v_cmpinfo | vector of CompoundInfo