OpenMS  2.7.0
Public Member Functions | Protected Member Functions | Private Member Functions | Static Private Attributes | List of all members
TOPPGNPSExport Class Reference
Inheritance diagram for TOPPGNPSExport:
[legend]
Collaboration diagram for TOPPGNPSExport:
[legend]

Public Member Functions

 TOPPGNPSExport ()
 

Protected Member Functions

void registerOptionsAndFlags_ () override
 
ExitCodes main_ (int, const char **) override
 

Private Member Functions

void binPeaks_ (const vector< Peak1D > &peaks, const double bin_width, vector< Peak1D > &binned_peaks)
 Bin peaks by similar m/z position and averaged intensities. More...
 
void flattenAndBinSpectra_ (MSExperiment &exp, const double bin_width, vector< Peak1D > &merged_peaks)
 Flatten spectra from MSExperiment into a single vector of Peak1D peaks. More...
 
void writeMSMSBlockHeader_ (ofstream &output_file, const String &output_type, const int &scan_index, const String &feature_id, const int &feature_charge, const String &feature_mz, const String &spec_index, const String &feature_rt)
 Private function that outputs MS/MS Block Header. More...
 
void writeMSMSBlock_ (ofstream &output_file, const vector< Peak1D > &peaks)
 Private function to write peak mass and intensity to output file. More...
 
void sortElementMapsByIntensity_ (const ConsensusFeature &feature, vector< pair< int, double >> &element_maps)
 Private method used to sort PeptideIdentification map indices in order of annotation's intensity. More...
 
void getElementPeptideIdentificationsByElementIntensity_ (const ConsensusFeature &feature, vector< pair< int, double >> &sorted_element_maps, vector< pair< int, int >> &pepts)
 Retrieve list of PeptideIdentification parameters from ConsensusFeature metadata, sorted by map intensity. More...
 

Static Private Attributes

static constexpr double DEF_COSINE_SIMILARITY = 0.9
 
static constexpr double DEF_MERGE_BIN_SIZE = static_cast<double>(BinnedSpectrum::DEFAULT_BIN_WIDTH_HIRES)
 
static constexpr double DEF_PREC_MASS_TOL = 0.5
 
static constexpr bool DEF_PREC_MASS_TOL_ISPPM = false
 
static constexpr double DEF_PEPT_CUTOFF = 5
 
static constexpr double DEF_MSMAP_CACHE = 50
 

Constructor & Destructor Documentation

◆ TOPPGNPSExport()

TOPPGNPSExport ( )
inline

Member Function Documentation

◆ binPeaks_()

void binPeaks_ ( const vector< Peak1D > &  peaks,
const double  bin_width,
vector< Peak1D > &  binned_peaks 
)
inlineprivate

Bin peaks by similar m/z position and averaged intensities.

Parameters
peaksVector of Peak1D peaks sorted by m/z position
bin_widthSize of bin
binned_peaksResult vector with binned peaks passed in by reference

◆ flattenAndBinSpectra_()

void flattenAndBinSpectra_ ( MSExperiment &  exp,
const double  bin_width,
vector< Peak1D > &  merged_peaks 
)
inlineprivate

Flatten spectra from MSExperiment into a single vector of Peak1D peaks.

Parameters
expMSExperiment containing at least 1 spectrum
bin_widthSize of binned scan (m/z)
merged_peaksResult vector of peaks passed in by reference

◆ getElementPeptideIdentificationsByElementIntensity_()

void getElementPeptideIdentificationsByElementIntensity_ ( const ConsensusFeature &  feature,
vector< pair< int, double >> &  sorted_element_maps,
vector< pair< int, int >> &  pepts 
)
inlineprivate

Retrieve list of PeptideIdentification parameters from ConsensusFeature metadata, sorted by map intensity.

Parameters
featureConsensusFeature feature containing PeptideIdentification annotations
sorted_element_mapsSorted list of element_maps
peptsResult vector of <map_index,spectrum_index> of PeptideIdentification annotations sorted by map intensity in feature

◆ main_()

ExitCodes main_ ( int  ,
const char **   
)
inlineoverrideprotected

◆ registerOptionsAndFlags_()

void registerOptionsAndFlags_ ( )
inlineoverrideprotected

◆ sortElementMapsByIntensity_()

void sortElementMapsByIntensity_ ( const ConsensusFeature &  feature,
vector< pair< int, double >> &  element_maps 
)
inlineprivate

Private method used to sort PeptideIdentification map indices in order of annotation's intensity.

Parameters
featureConsensusFeature annotated with PeptideIdentifications
featureMaps_sortedByIntResult vector of map indices in order of PeptideIdentification intensity

◆ writeMSMSBlock_()

void writeMSMSBlock_ ( ofstream &  output_file,
const vector< Peak1D > &  peaks 
)
inlineprivate

Private function to write peak mass and intensity to output file.

Parameters
output_fileStream that will write to file
peaksVector of peaks that will be outputted

◆ writeMSMSBlockHeader_()

void writeMSMSBlockHeader_ ( ofstream &  output_file,
const String &  output_type,
const int &  scan_index,
const String &  feature_id,
const int &  feature_charge,
const String &  feature_mz,
const String &  spec_index,
const String &  feature_rt 
)
inlineprivate

Private function that outputs MS/MS Block Header.

Parameters
output_fileStream that will write to file
scan_indexCurrent scan index in GNPSExport formatted output
feature_idConsensusFeature Id found in input mzXML file
feature_chargeConsensusFeature's highest charge as mentioned in the input mzXML file
feature_mzm/z position of PeptideIdentification with highest intensity
spec_indexSpectrum index of PeptideIdentification with highest intensity
feature_rtConsensusFeature's retention time specified in input mzXML file

Member Data Documentation

◆ DEF_COSINE_SIMILARITY

constexpr double DEF_COSINE_SIMILARITY = 0.9
staticconstexprprivate

◆ DEF_MERGE_BIN_SIZE

constexpr double DEF_MERGE_BIN_SIZE = static_cast<double>(BinnedSpectrum::DEFAULT_BIN_WIDTH_HIRES)
staticconstexprprivate

◆ DEF_MSMAP_CACHE

constexpr double DEF_MSMAP_CACHE = 50
staticconstexprprivate

◆ DEF_PEPT_CUTOFF

constexpr double DEF_PEPT_CUTOFF = 5
staticconstexprprivate

◆ DEF_PREC_MASS_TOL

constexpr double DEF_PREC_MASS_TOL = 0.5
staticconstexprprivate

◆ DEF_PREC_MASS_TOL_ISPPM

constexpr bool DEF_PREC_MASS_TOL_ISPPM = false
staticconstexprprivate