OpenMS
FLASHIda Class Reference

FLASHIda class for real time deconvolution This class contains functions to perform deconvolution (by SpectralDeconvolution) for the spectrum received from Thermo iAPI. Also precursor selection is done in this class. The functions in this class are invoked in C# Thermo iAPI side through the functions in FLASHIdaBridgeFunctions class. More...

#include <OpenMS/ANALYSIS/TOPDOWN/FLASHIda.h>

Collaboration diagram for FLASHIda:
[legend]

Public Types

typedef FLASHHelperClasses::PrecalculatedAveragine PrecalculatedAveragine
 
typedef FLASHHelperClasses::LogMzPeak LogMzPeak
 

Public Member Functions

 FLASHIda (char *arg)
 constructor that takes string input argument More...
 
 ~FLASHIda ()=default
 destructor More...
 
 FLASHIda (const FLASHIda &)=default
 copy constructor More...
 
 FLASHIda (FLASHIda &&other)=default
 move constructor More...
 
FLASHIdaoperator= (const FLASHIda &fd)=default
 assignment operator More...
 
int getPeakGroups (const double *mzs, const double *intensities, int length, double rt, int ms_level, const char *name, const char *cv)
 get peak groups (deconvolved masses) from input spectrum, specified by mzs and intensities (due to C# interface it is necessary) More...
 
void getIsolationWindows (double *window_start, double *window_end, double *qscores, int *charges, int *min_charges, int *max_charges, double *mono_masses, double *charge_cos, double *charge_snrs, double *iso_cos, double *snrs, double *charge_scores, double *ppm_errors, double *precursor_intensities, double *peakgroup_intensities, int *ids)
 get isolation windows using FLASHDeconv algorithm. Many parameters are in primitive types so they can be passed to C# FLASHIda side. All parameters are for isolation windows. More...
 
void removeFromExlusionList (int id)
 Remove a given precursor from the exclusion list by id (needed for FAIMS) More...
 
double getRepresentativeMass ()
 
void getAllMonoisotopicMasses (double *masses, int length)
 
int GetAllPeakGroupSize ()
 

Static Public Member Functions

static std::map< int, std::vector< std::vector< float > > > parseFLASHIdaLog (const String &in_log_file)
 parse FLASHIda log file More...
 

Private Member Functions

void filterPeakGroupsUsingMassExclusion_ (int ms_level, double rt)
 discard peak groups using mass exclusion More...
 

Static Private Member Functions

static MSSpectrum makeMSSpectrum_ (const double *mzs, const double *ints, int length, double rt, int ms_level, const char *name)
 generate MSSpectrum class using mzs and intensities. mzs and intensities and other information are provided by Thermo iAPI More...
 

Private Attributes

std::unordered_map< int, double > tqscore_exceeding_mz_rt_map_
 PeakGroup comparator for soring by QScore. More...
 
std::unordered_map< int, double > tqscore_exceeding_mass_rt_map_
 integer mz value vs. retention time with tqscore exceeding total qscore threshold More...
 
std::unordered_map< int, double > all_mass_rt_map_
 integer mass value vs. retention time with tqscore exceeding total qscore threshold More...
 
std::unordered_map< int, double > mass_qscore_map_
 mz value vs. retention time for all acquired precursors More...
 
std::unordered_map< int, int > id_mass_map_
 mass value vs. total qscore for all acquired precursors More...
 
std::unordered_map< int, int > id_mz_map_
 
std::unordered_map< int, double > id_qscore_map_
 
DeconvolvedSpectrum deconvolved_spectrum_
 deconvolved spectrum that contains the peak group More...
 
DeconvolvedSpectrum selected_peak_groups_
 selected peak groups out of deconvolved_spectrum_ More...
 
std::vector< int > trigger_charges
 peakGroup charges to be triggered More...
 
std::vector< double > trigger_left_isolation_mzs_
 peakGroup isolation window ranges More...
 
std::vector< double > trigger_right_isolation_mzs_
 
std::vector< int > trigger_ids_
 
SpectralDeconvolution fd_
 SpectralDeconvolution class for deconvolution. More...
 
double tqscore_threshold = .99
 total QScore threshold More...
 
double qscore_threshold_
 q score threshold - determined from C# side More...
 
double rt_window_
 retention time window - determined from C# side More...
 
IntList mass_count_
 how many masses will be selected per ms level? - determined from C# side More...
 
int targeting_mode_ = 0
 
std::map< double, std::vector< double > > target_mass_rt_map_
 0 no targeting 1 inclusive 2 exclusive More...
 
std::map< double, std::vector< double > > target_mass_qscore_map_
 
std::vector< double > target_masses_
 
int window_id_ = 0
 current target masses. updated per spectrum More...
 
std::map< double, std::vector< double > > exclusion_rt_masses_map_
 maps for global exclusion More...
 
std::vector< double > excluded_masses_
 if rt == 0, its mapped masses are always excluded. More...
 
double snr_threshold_ = 1
 current target masses. updated per spectrum More...
 
DoubleList tol_
 mass tolerance More...
 
std::map< double, std::vector< double > > cv_to_mass_
 

Detailed Description

FLASHIda class for real time deconvolution This class contains functions to perform deconvolution (by SpectralDeconvolution) for the spectrum received from Thermo iAPI. Also precursor selection is done in this class. The functions in this class are invoked in C# Thermo iAPI side through the functions in FLASHIdaBridgeFunctions class.

See also
FLASHIdaBridgeFunction, https://stackoverflow.com/questions/31417688/passing-a-vector-array-from-unmanaged-c-to-c-sharp

Member Typedef Documentation

◆ LogMzPeak

◆ PrecalculatedAveragine

Constructor & Destructor Documentation

◆ FLASHIda() [1/3]

FLASHIda ( char *  arg)
explicit

constructor that takes string input argument

◆ ~FLASHIda()

~FLASHIda ( )
default

destructor

◆ FLASHIda() [2/3]

FLASHIda ( const FLASHIda )
default

copy constructor

◆ FLASHIda() [3/3]

FLASHIda ( FLASHIda &&  other)
default

move constructor

Member Function Documentation

◆ filterPeakGroupsUsingMassExclusion_()

void filterPeakGroupsUsingMassExclusion_ ( int  ms_level,
double  rt 
)
private

discard peak groups using mass exclusion

Parameters
ms_levelMS level
rtRetention time

◆ getAllMonoisotopicMasses()

void getAllMonoisotopicMasses ( double *  masses,
int  length 
)

◆ GetAllPeakGroupSize()

int GetAllPeakGroupSize ( )

◆ getIsolationWindows()

void getIsolationWindows ( double *  window_start,
double *  window_end,
double *  qscores,
int *  charges,
int *  min_charges,
int *  max_charges,
double *  mono_masses,
double *  charge_cos,
double *  charge_snrs,
double *  iso_cos,
double *  snrs,
double *  charge_scores,
double *  ppm_errors,
double *  precursor_intensities,
double *  peakgroup_intensities,
int *  ids 
)

get isolation windows using FLASHDeconv algorithm. Many parameters are in primitive types so they can be passed to C# FLASHIda side. All parameters are for isolation windows.

Parameters
window_startwindow start mzs
window_endwindow end mzs
qscoresQScores of windows
chargescharges of windows
min_chargesminimum charges
max_chargesmaximum charges
mono_massesmonoisotopic masses
charge_coscharge cosine scores
charge_snrscharge SNRs or precursor SNRs
iso_cosmass cosine scores
snrsmass SNRs
charge_scorescharge distribution scores
ppm_errorsaverage PPM errors
precursor_intensitiesprecursor peak intensities
peakgroup_intensitiesprecursor mass intensities
idsprecursor IDs

◆ getPeakGroups()

int getPeakGroups ( const double *  mzs,
const double *  intensities,
int  length,
double  rt,
int  ms_level,
const char *  name,
const char *  cv 
)

get peak groups (deconvolved masses) from input spectrum, specified by mzs and intensities (due to C# interface it is necessary)

Parameters
mzsmz values of the input spectrum
intensitiesintensities of the input spectrum
lengthlength of mzs and ints
rtRetention time in seconds
ms_levelms level
namespectrum name
cvCV values when FAIMS is used
Returns
number of acquired peak groups

◆ getRepresentativeMass()

double getRepresentativeMass ( )

◆ makeMSSpectrum_()

static MSSpectrum makeMSSpectrum_ ( const double *  mzs,
const double *  ints,
int  length,
double  rt,
int  ms_level,
const char *  name 
)
staticprivate

generate MSSpectrum class using mzs and intensities. mzs and intensities and other information are provided by Thermo iAPI

Parameters
mzsm/z values
intsintensities
lengthnumber of peaks
rtRetention time
ms_levelMS level
namespectrum name

◆ operator=()

FLASHIda& operator= ( const FLASHIda fd)
default

assignment operator

◆ parseFLASHIdaLog()

static std::map<int, std::vector<std::vector<float> > > parseFLASHIdaLog ( const String in_log_file)
static

parse FLASHIda log file

Parameters
in_log_fileinput log file
Returns
parsed information : scan number - percursor information

◆ removeFromExlusionList()

void removeFromExlusionList ( int  id)

Remove a given precursor from the exclusion list by id (needed for FAIMS)

Parameters
idid of precursor

Member Data Documentation

◆ all_mass_rt_map_

std::unordered_map<int, double> all_mass_rt_map_
private

integer mass value vs. retention time with tqscore exceeding total qscore threshold

◆ cv_to_mass_

std::map<double, std::vector<double> > cv_to_mass_
private
Initial value:
= {
{-80.0, {2400.0, 2900.0}},
{-70.0, {3500.0, 4000.0}},
{-60.0, {4500.0, 5000.0}},
{-50.0, {5100.0, 6500.0}},
{-40.0, {7500.0, 10000.0}},
{-30.0, {11000.0, 14000.0}},
{-20.0, {12000.0, 15000.0}},
{-10.0, {13000.0, 15500.0}},
{-0.0, {14000.0, 16000.0}},
{10.0, {15000.0, 16500.0}},
}

◆ deconvolved_spectrum_

DeconvolvedSpectrum deconvolved_spectrum_
private

deconvolved spectrum that contains the peak group

◆ excluded_masses_

std::vector<double> excluded_masses_
private

if rt == 0, its mapped masses are always excluded.

◆ exclusion_rt_masses_map_

std::map<double, std::vector<double> > exclusion_rt_masses_map_
private

maps for global exclusion

◆ fd_

SpectralDeconvolution fd_
private

SpectralDeconvolution class for deconvolution.

◆ id_mass_map_

std::unordered_map<int, int> id_mass_map_
private

mass value vs. total qscore for all acquired precursors

Maps that are neccessary for selectively disabling mass exclusion (needed for FAIMS support)

◆ id_mz_map_

std::unordered_map<int, int> id_mz_map_
private

◆ id_qscore_map_

std::unordered_map<int, double> id_qscore_map_
private

◆ mass_count_

IntList mass_count_
private

how many masses will be selected per ms level? - determined from C# side

◆ mass_qscore_map_

std::unordered_map<int, double> mass_qscore_map_
private

mz value vs. retention time for all acquired precursors

◆ qscore_threshold_

double qscore_threshold_
private

q score threshold - determined from C# side

◆ rt_window_

double rt_window_
private

retention time window - determined from C# side

◆ selected_peak_groups_

DeconvolvedSpectrum selected_peak_groups_
private

selected peak groups out of deconvolved_spectrum_

◆ snr_threshold_

double snr_threshold_ = 1
private

current target masses. updated per spectrum

precursor SNR threshold

◆ target_mass_qscore_map_

std::map<double, std::vector<double> > target_mass_qscore_map_
private

◆ target_mass_rt_map_

std::map<double, std::vector<double> > target_mass_rt_map_
private

0 no targeting 1 inclusive 2 exclusive

maps for global inclusion targeting

◆ target_masses_

std::vector<double> target_masses_
private

◆ targeting_mode_

int targeting_mode_ = 0
private

◆ tol_

DoubleList tol_
private

mass tolerance

◆ tqscore_exceeding_mass_rt_map_

std::unordered_map<int, double> tqscore_exceeding_mass_rt_map_
private

integer mz value vs. retention time with tqscore exceeding total qscore threshold

◆ tqscore_exceeding_mz_rt_map_

std::unordered_map<int, double> tqscore_exceeding_mz_rt_map_
private

PeakGroup comparator for soring by QScore.

Maps that are necessary for mass exclusion

◆ tqscore_threshold

double tqscore_threshold = .99
private

total QScore threshold

◆ trigger_charges

std::vector<int> trigger_charges
private

peakGroup charges to be triggered

◆ trigger_ids_

std::vector<int> trigger_ids_
private

◆ trigger_left_isolation_mzs_

std::vector<double> trigger_left_isolation_mzs_
private

peakGroup isolation window ranges

◆ trigger_right_isolation_mzs_

std::vector<double> trigger_right_isolation_mzs_
private

◆ window_id_

int window_id_ = 0
private

current target masses. updated per spectrum