libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
pappso::XtandemSpectrumProcess Class Reference

#include <xtandemspectrumprocess.h>

Public Member Functions

 XtandemSpectrumProcess ()
 
 XtandemSpectrumProcess (const XtandemSpectrumProcess &copy)
 
 ~XtandemSpectrumProcess ()
 
MassSpectrum process (const MassSpectrum &spectrum, pappso_double parent_ion_mass, unsigned int parent_charge) const
 process raw spectrum to prepare hyperscore computation
 
void setMinimumMz (pappso_double minimum_mz)
 
void setNmostIntense (unsigned int nmost_intense)
 
void setDynamicRange (pappso::pappso_double dynamic_range)
 
void setRemoveIsotope (bool remove_isotope)
 
void setExcludeParent (bool exclude_parent)
 
void setExcludeParentNeutralLoss (bool neutral_loss)
 
void setNeutralLossMass (pappso::pappso_double neutral_loss_mass)
 
void setNeutralLossWindowDalton (pappso::pappso_double neutral_loss_precision)
 
void setRefineSpectrumModel (bool refine)
 
void setIonScore (PeptideIon ion_type, bool compute_score)
 
pappso_double getMinimumMz () const
 
unsigned int getNmostIntense () const
 
pappso::pappso_double getDynamicRange () const
 
bool getRemoveIsotope () const
 
bool getExcludeParent () const
 
bool getExcludeParentNeutralLoss () const
 
pappso::pappso_double getNeutralLossMass () const
 
pappso::pappso_double getNeutralLossWindowDalton () const
 
bool getRefineSpectrumModel () const
 
bool getIonScore (PeptideIon ion_type) const
 

Private Attributes

FilterResampleKeepGreater m_filter_keep_greater
 
FilterGreatestY m_n_most_intense
 
FilterRescaleY m_filter_rescale
 
FilterTandemDeisotope m_filter_remove_c13 = FilterTandemDeisotope(1.5, 200)
 
FilterFloorY m_filter_floor
 
FilterHighPass m_filter_highpass
 
bool m_isRemoveIsotope = true
 
bool m_isExcludeParent = false
 
pappso::pappso_double m_isExcludeParent_lower_dalton = 2
 
pappso::pappso_double m_isExcludeParent_upper_dalton = 2
 
bool m_isExcludeParent_neutral_loss = false
 
pappso::pappso_double m_neutralLossMass = MASSH2O
 
pappso::pappso_double m_neutralLossWindowDalton = 0.5
 
bool m_isRefineSpectrumModel = true
 
bool _y_ions = true
 
bool _ystar_ions = false
 
bool _b_ions = true
 
bool _bstar_ions = false
 
bool _c_ions = false
 
bool _z_ions = false
 
bool _a_ions = false
 
bool _x_ions = false
 
bool _astar_ions = false
 
bool _ao_ions = false
 
bool _bo_ions = false
 
bool _yo_ions = false
 

Detailed Description

Definition at line 41 of file xtandemspectrumprocess.h.

Constructor & Destructor Documentation

◆ XtandemSpectrumProcess() [1/2]

pappso::XtandemSpectrumProcess::XtandemSpectrumProcess ( )

Definition at line 37 of file xtandemspectrumprocess.cpp.

◆ XtandemSpectrumProcess() [2/2]

pappso::XtandemSpectrumProcess::XtandemSpectrumProcess ( const XtandemSpectrumProcess & copy)

Definition at line 45 of file xtandemspectrumprocess.cpp.

47 : m_filter_keep_greater(copy.m_filter_keep_greater),
48 m_n_most_intense(copy.m_n_most_intense),
49 m_filter_rescale(copy.m_filter_rescale),
50 m_filter_highpass(copy.m_filter_highpass)
51{
52 m_isRemoveIsotope = copy.m_isRemoveIsotope;
53 m_isExcludeParent_neutral_loss = copy.m_isExcludeParent_neutral_loss;
54 m_neutralLossMass = copy.m_neutralLossMass;
55 m_neutralLossWindowDalton = copy.m_neutralLossWindowDalton;
56
57 m_isExcludeParent = copy.m_isExcludeParent;
58 m_isExcludeParent_lower_dalton = copy.m_isExcludeParent_lower_dalton;
59 m_isExcludeParent_upper_dalton = copy.m_isExcludeParent_upper_dalton;
60 m_isRefineSpectrumModel = copy.m_isRefineSpectrumModel;
61 _y_ions = copy._y_ions; // PeptideIon::y
62 _b_ions = copy._b_ions; // PeptideIon::b
63 _ystar_ions = copy._ystar_ions; // PeptideIon::ystar
64 _bstar_ions = copy._bstar_ions; // PeptideIon::bstar
65 _c_ions = copy._c_ions; // PeptideIon::c
66 _z_ions = copy._z_ions; // PeptideIon::z
67 _a_ions = copy._a_ions; // PeptideIon::a
68 _x_ions = copy._x_ions; // CO2
69
70 _astar_ions = copy._astar_ions; // PeptideIon::a
71 _ao_ions = copy._ao_ions;
72 _bo_ions = copy._bo_ions;
73 _yo_ions = copy._yo_ions;
74}
pappso::pappso_double m_isExcludeParent_upper_dalton
pappso::pappso_double m_isExcludeParent_lower_dalton
pappso::pappso_double m_neutralLossWindowDalton

References _a_ions, _ao_ions, _astar_ions, _b_ions, _bo_ions, _bstar_ions, _c_ions, _x_ions, _y_ions, _yo_ions, _ystar_ions, _z_ions, m_isExcludeParent, m_isExcludeParent_lower_dalton, m_isExcludeParent_neutral_loss, m_isExcludeParent_upper_dalton, m_isRefineSpectrumModel, m_isRemoveIsotope, m_neutralLossMass, and m_neutralLossWindowDalton.

◆ ~XtandemSpectrumProcess()

pappso::XtandemSpectrumProcess::~XtandemSpectrumProcess ( )

Definition at line 75 of file xtandemspectrumprocess.cpp.

76{
77}

Member Function Documentation

◆ getDynamicRange()

pappso::pappso_double pappso::XtandemSpectrumProcess::getDynamicRange ( ) const

Definition at line 199 of file xtandemspectrumprocess.cpp.

200{
202}
double getDynamicRange() const

References pappso::FilterRescaleY::getDynamicRange(), and m_filter_rescale.

◆ getExcludeParent()

bool pappso::XtandemSpectrumProcess::getExcludeParent ( ) const

Definition at line 209 of file xtandemspectrumprocess.cpp.

210{
211 return m_isExcludeParent;
212}

References m_isExcludeParent.

◆ getExcludeParentNeutralLoss()

bool pappso::XtandemSpectrumProcess::getExcludeParentNeutralLoss ( ) const

Definition at line 214 of file xtandemspectrumprocess.cpp.

215{
217}

References m_isExcludeParent_neutral_loss.

◆ getIonScore()

bool pappso::XtandemSpectrumProcess::getIonScore ( PeptideIon ion_type) const

Definition at line 237 of file xtandemspectrumprocess.cpp.

238{
239 switch(ion_type)
240 {
241 case PeptideIon::y:
242 return _y_ions;
243
244 case PeptideIon::b:
245 return _b_ions;
246
248 return _ystar_ions;
249
251 return _bstar_ions;
252
253 case PeptideIon::yo:
254 return _yo_ions;
255
256 case PeptideIon::bo:
257 return _bo_ions;
258
259 case PeptideIon::z:
260 return _z_ions;
261
262 case PeptideIon::a:
263 return _a_ions;
264
266 return _astar_ions;
267 case PeptideIon::ao:
268 return _ao_ions;
269
270 case PeptideIon::c:
271 return _c_ions;
272 case PeptideIon::x:
273 return _x_ions;
274 default:
275 break;
276 }
277 return false;
278}
@ a
Nter aldimine ions.
@ y
Cter amino ions.
@ c
Nter amino ions.
@ astar
Nter aldimine ions + NH3 loss.
@ ystar
Cter amino ions + NH3 loss.
@ yo
Cter amino ions + H2O loss.
@ bstar
Nter acylium ions + NH3 loss.
@ b
Nter acylium ions.
@ x
Cter acylium ions.
@ bo
Nter acylium ions + H2O loss.
@ ao
Nter aldimine ions + H2O loss.
@ z
Cter carbocations.

References _a_ions, _ao_ions, _astar_ions, _b_ions, _bo_ions, _bstar_ions, _c_ions, _x_ions, _y_ions, _yo_ions, _ystar_ions, _z_ions, pappso::a, pappso::ao, pappso::astar, pappso::b, pappso::bo, pappso::bstar, pappso::c, pappso::x, pappso::y, pappso::yo, pappso::ystar, and pappso::z.

◆ getMinimumMz()

pappso_double pappso::XtandemSpectrumProcess::getMinimumMz ( ) const

◆ getNeutralLossMass()

pappso::pappso_double pappso::XtandemSpectrumProcess::getNeutralLossMass ( ) const

Definition at line 219 of file xtandemspectrumprocess.cpp.

220{
221 return m_neutralLossMass;
222}

References m_neutralLossMass.

◆ getNeutralLossWindowDalton()

pappso_double pappso::XtandemSpectrumProcess::getNeutralLossWindowDalton ( ) const

Definition at line 224 of file xtandemspectrumprocess.cpp.

225{
227}

References m_neutralLossWindowDalton.

◆ getNmostIntense()

unsigned int pappso::XtandemSpectrumProcess::getNmostIntense ( ) const

Definition at line 194 of file xtandemspectrumprocess.cpp.

195{
197}
std::size_t getNumberOfPoints() const

References pappso::FilterGreatestY::getNumberOfPoints(), and m_n_most_intense.

◆ getRefineSpectrumModel()

bool pappso::XtandemSpectrumProcess::getRefineSpectrumModel ( ) const

Definition at line 230 of file xtandemspectrumprocess.cpp.

231{
233}

References m_isRefineSpectrumModel.

◆ getRemoveIsotope()

bool pappso::XtandemSpectrumProcess::getRemoveIsotope ( ) const

Definition at line 204 of file xtandemspectrumprocess.cpp.

205{
206 return m_isRemoveIsotope;
207}

References m_isRemoveIsotope.

◆ process()

MassSpectrum pappso::XtandemSpectrumProcess::process ( const MassSpectrum & spectrum,
pappso_double parent_ion_mass,
unsigned int parent_charge ) const

process raw spectrum to prepare hyperscore computation

Definition at line 281 of file xtandemspectrumprocess.cpp.

284{
285 qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__
286 << " parent_charge==" << parent_charge;
287
288 // 1) clean isotopes
289 MassSpectrum spectrum_process(spectrum);
291 {
292 spectrum_process.massSpectrumFilter(FilterTandemDeisotope());
293 }
294 qDebug() << __FILE__ << "@" << __LINE__ << __FUNCTION__ << "()";
295 // 2) remove parent ion mass
297 {
298 spectrum_process.massSpectrumFilter(
299 MassSpectrumFilterResampleRemoveMzRange(
300 MzRange(parent_ion_mz,
302 m_isExcludeParent_lower_dalton / parent_charge),
304 m_isExcludeParent_upper_dalton / parent_charge))));
305 }
306 qDebug() << __FILE__ << "@" << __LINE__ << __FUNCTION__ << "() ";
307 // 3) remove low masses
308 // 4) normalization
309 m_filter_keep_greater.filter(spectrum_process);
310 qDebug() << __FILE__ << "@" << __LINE__ << __FUNCTION__ << "()";
311 m_filter_rescale.filter(spectrum_process);
312 qDebug() << __FILE__ << "@" << __LINE__ << __FUNCTION__ << "()";
313 // m_filter_floor.filter(spectrum_process);
314 m_filter_highpass.filter(spectrum_process);
315
316 qDebug() << __FILE__ << "@" << __LINE__ << __FUNCTION__ << "()";
317 // 5) remove neutral loss
319 {
320 pappso_double parent_ion_mhplus =
321 ((parent_ion_mz - (MHPLUS * parent_charge)) * parent_charge) + MHPLUS;
322
323 MassSpectrumFilterResampleRemoveMzRange filter_parent(MzRange(
324 parent_ion_mhplus - m_neutralLossMass,
326
327 filter_parent.filter(spectrum_process);
328 }
329 // 6) clean isotopes
330 // 7) keep n most intense peaks
331 qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__
332 << " parent_charge==" << parent_charge;
333 // return spectrum_process.massSpectrumFilter(m_filter_remove_c13)
334 // .filter(m_nMostIntense);
335
336 m_filter_remove_c13.filter(spectrum_process);
337 m_n_most_intense.filter(spectrum_process);
338 qDebug() << __FILE__ << "@" << __LINE__ << __FUNCTION__ << "() "
339 << spectrum_process.size();
340 return spectrum_process;
341}
Trace & filter(Trace &data_points) const override
Trace & filter(Trace &data_points) const override
Trace & filter(Trace &trace) const override
Trace & filter(Trace &data_points) const override
MassSpectrum & filter(MassSpectrum &data_points) const override
static PrecisionPtr getDaltonInstance(pappso_double value)
get a Dalton precision pointer
FilterTandemDeisotope m_filter_remove_c13
const pappso_double MHPLUS(1.007276466879)
double pappso_double
A type definition for doubles.
Definition types.h:50

References pappso::FilterGreatestY::filter(), pappso::FilterHighPass::filter(), pappso::FilterResampleKeepGreater::filter(), pappso::FilterRescaleY::filter(), pappso::FilterTandemDeisotope::filter(), pappso::MassSpectrumFilterResampleRemoveMzRange::filter(), pappso::PrecisionFactory::getDaltonInstance(), m_filter_highpass, m_filter_keep_greater, m_filter_remove_c13, m_filter_rescale, m_isExcludeParent, m_isExcludeParent_lower_dalton, m_isExcludeParent_neutral_loss, m_isExcludeParent_upper_dalton, m_isRemoveIsotope, m_n_most_intense, m_neutralLossMass, m_neutralLossWindowDalton, pappso::MassSpectrum::massSpectrumFilter(), and pappso::MHPLUS().

◆ setDynamicRange()

void pappso::XtandemSpectrumProcess::setDynamicRange ( pappso::pappso_double dynamic_range)

Definition at line 90 of file xtandemspectrumprocess.cpp.

91{
92 m_filter_rescale = FilterRescaleY(dynamic_range);
93}

References m_filter_rescale.

◆ setExcludeParent()

void pappso::XtandemSpectrumProcess::setExcludeParent ( bool exclude_parent)

Definition at line 102 of file xtandemspectrumprocess.cpp.

103{
104 m_isExcludeParent = exclude_parent;
105}

References m_isExcludeParent.

◆ setExcludeParentNeutralLoss()

void pappso::XtandemSpectrumProcess::setExcludeParentNeutralLoss ( bool neutral_loss)

Definition at line 107 of file xtandemspectrumprocess.cpp.

108{
109 m_isExcludeParent_neutral_loss = neutral_loss;
110}

References m_isExcludeParent_neutral_loss.

◆ setIonScore()

void pappso::XtandemSpectrumProcess::setIonScore ( PeptideIon ion_type,
bool compute_score )

Definition at line 133 of file xtandemspectrumprocess.cpp.

134{
135 switch(ion_type)
136 {
137 case PeptideIon::y:
138 _y_ions = compute_score;
139 break;
140
141 case PeptideIon::b:
142 _b_ions = compute_score;
143 break;
144
146 _ystar_ions = compute_score;
147 break;
148
150 _bstar_ions = compute_score;
151 break;
152
153 case PeptideIon::yo:
154 _yo_ions = compute_score;
155 break;
156
157 case PeptideIon::bo:
158 _bo_ions = compute_score;
159 break;
160
161 case PeptideIon::z:
162 _z_ions = compute_score;
163 break;
164
165 case PeptideIon::a:
166 _a_ions = compute_score;
167 break;
168
170 _astar_ions = compute_score;
171 break;
172 case PeptideIon::ao:
173 _ao_ions = compute_score;
174 break;
175 case PeptideIon::c:
176 _c_ions = compute_score;
177 break;
178 case PeptideIon::x:
179 _x_ions = compute_score;
180 break;
181
182 case PeptideIon::bp:
183 case PeptideIon::yp:
184 break;
185 }
186}

References _a_ions, _ao_ions, _astar_ions, _b_ions, _bo_ions, _bstar_ions, _c_ions, _x_ions, _y_ions, _yo_ions, _ystar_ions, _z_ions, pappso::a, pappso::ao, pappso::astar, pappso::b, pappso::bo, pappso::bp, pappso::bstar, pappso::c, pappso::x, pappso::y, pappso::yo, pappso::yp, pappso::ystar, and pappso::z.

◆ setMinimumMz()

void pappso::XtandemSpectrumProcess::setMinimumMz ( pappso_double minimum_mz)

Definition at line 80 of file xtandemspectrumprocess.cpp.

81{
82 m_filter_keep_greater = FilterResampleKeepGreater(minimum_mz);
83}

References m_filter_keep_greater.

◆ setNeutralLossMass()

void pappso::XtandemSpectrumProcess::setNeutralLossMass ( pappso::pappso_double neutral_loss_mass)

Definition at line 112 of file xtandemspectrumprocess.cpp.

114{
115 m_neutralLossMass = neutral_loss_mass;
116}

References m_neutralLossMass.

◆ setNeutralLossWindowDalton()

void pappso::XtandemSpectrumProcess::setNeutralLossWindowDalton ( pappso::pappso_double neutral_loss_precision)

Definition at line 118 of file xtandemspectrumprocess.cpp.

120{
121 m_neutralLossWindowDalton = neutral_loss_precision;
122}

References m_neutralLossWindowDalton.

◆ setNmostIntense()

void pappso::XtandemSpectrumProcess::setNmostIntense ( unsigned int nmost_intense)

Definition at line 85 of file xtandemspectrumprocess.cpp.

86{
87 m_n_most_intense = FilterGreatestY(nmost_intense);
88}

References m_n_most_intense.

◆ setRefineSpectrumModel()

void pappso::XtandemSpectrumProcess::setRefineSpectrumModel ( bool refine)

Definition at line 126 of file xtandemspectrumprocess.cpp.

127{
129}

References m_isRefineSpectrumModel.

◆ setRemoveIsotope()

void pappso::XtandemSpectrumProcess::setRemoveIsotope ( bool remove_isotope)

Definition at line 96 of file xtandemspectrumprocess.cpp.

97{
98 m_isRemoveIsotope = remove_isotope;
99}

References m_isRemoveIsotope.

Member Data Documentation

◆ _a_ions

bool pappso::XtandemSpectrumProcess::_a_ions = false
private

Definition at line 100 of file xtandemspectrumprocess.h.

Referenced by XtandemSpectrumProcess(), getIonScore(), and setIonScore().

◆ _ao_ions

bool pappso::XtandemSpectrumProcess::_ao_ions = false
private

Definition at line 103 of file xtandemspectrumprocess.h.

Referenced by XtandemSpectrumProcess(), getIonScore(), and setIonScore().

◆ _astar_ions

bool pappso::XtandemSpectrumProcess::_astar_ions = false
private

Definition at line 102 of file xtandemspectrumprocess.h.

Referenced by XtandemSpectrumProcess(), getIonScore(), and setIonScore().

◆ _b_ions

bool pappso::XtandemSpectrumProcess::_b_ions = true
private

Definition at line 96 of file xtandemspectrumprocess.h.

Referenced by XtandemSpectrumProcess(), getIonScore(), and setIonScore().

◆ _bo_ions

bool pappso::XtandemSpectrumProcess::_bo_ions = false
private

Definition at line 104 of file xtandemspectrumprocess.h.

Referenced by XtandemSpectrumProcess(), getIonScore(), and setIonScore().

◆ _bstar_ions

bool pappso::XtandemSpectrumProcess::_bstar_ions = false
private

Definition at line 97 of file xtandemspectrumprocess.h.

Referenced by XtandemSpectrumProcess(), getIonScore(), and setIonScore().

◆ _c_ions

bool pappso::XtandemSpectrumProcess::_c_ions = false
private

Definition at line 98 of file xtandemspectrumprocess.h.

Referenced by XtandemSpectrumProcess(), getIonScore(), and setIonScore().

◆ _x_ions

bool pappso::XtandemSpectrumProcess::_x_ions = false
private

Definition at line 101 of file xtandemspectrumprocess.h.

Referenced by XtandemSpectrumProcess(), getIonScore(), and setIonScore().

◆ _y_ions

bool pappso::XtandemSpectrumProcess::_y_ions = true
private

Definition at line 94 of file xtandemspectrumprocess.h.

Referenced by XtandemSpectrumProcess(), getIonScore(), and setIonScore().

◆ _yo_ions

bool pappso::XtandemSpectrumProcess::_yo_ions = false
private

Definition at line 105 of file xtandemspectrumprocess.h.

Referenced by XtandemSpectrumProcess(), getIonScore(), and setIonScore().

◆ _ystar_ions

bool pappso::XtandemSpectrumProcess::_ystar_ions = false
private

Definition at line 95 of file xtandemspectrumprocess.h.

Referenced by XtandemSpectrumProcess(), getIonScore(), and setIonScore().

◆ _z_ions

bool pappso::XtandemSpectrumProcess::_z_ions = false
private

Definition at line 99 of file xtandemspectrumprocess.h.

Referenced by XtandemSpectrumProcess(), getIonScore(), and setIonScore().

◆ m_filter_floor

FilterFloorY pappso::XtandemSpectrumProcess::m_filter_floor
private

Definition at line 84 of file xtandemspectrumprocess.h.

◆ m_filter_highpass

FilterHighPass pappso::XtandemSpectrumProcess::m_filter_highpass
private

Definition at line 85 of file xtandemspectrumprocess.h.

Referenced by process().

◆ m_filter_keep_greater

FilterResampleKeepGreater pappso::XtandemSpectrumProcess::m_filter_keep_greater
private

Definition at line 80 of file xtandemspectrumprocess.h.

Referenced by getMinimumMz(), process(), and setMinimumMz().

◆ m_filter_remove_c13

FilterTandemDeisotope pappso::XtandemSpectrumProcess::m_filter_remove_c13 = FilterTandemDeisotope(1.5, 200)
private

Definition at line 83 of file xtandemspectrumprocess.h.

Referenced by process().

◆ m_filter_rescale

FilterRescaleY pappso::XtandemSpectrumProcess::m_filter_rescale
private

Definition at line 82 of file xtandemspectrumprocess.h.

Referenced by getDynamicRange(), process(), and setDynamicRange().

◆ m_isExcludeParent

bool pappso::XtandemSpectrumProcess::m_isExcludeParent = false
private

◆ m_isExcludeParent_lower_dalton

pappso::pappso_double pappso::XtandemSpectrumProcess::m_isExcludeParent_lower_dalton = 2
private

Definition at line 88 of file xtandemspectrumprocess.h.

Referenced by XtandemSpectrumProcess(), and process().

◆ m_isExcludeParent_neutral_loss

bool pappso::XtandemSpectrumProcess::m_isExcludeParent_neutral_loss = false
private

◆ m_isExcludeParent_upper_dalton

pappso::pappso_double pappso::XtandemSpectrumProcess::m_isExcludeParent_upper_dalton = 2
private

Definition at line 89 of file xtandemspectrumprocess.h.

Referenced by XtandemSpectrumProcess(), and process().

◆ m_isRefineSpectrumModel

bool pappso::XtandemSpectrumProcess::m_isRefineSpectrumModel = true
private

◆ m_isRemoveIsotope

bool pappso::XtandemSpectrumProcess::m_isRemoveIsotope = true
private

◆ m_n_most_intense

FilterGreatestY pappso::XtandemSpectrumProcess::m_n_most_intense
private

Definition at line 81 of file xtandemspectrumprocess.h.

Referenced by getNmostIntense(), process(), and setNmostIntense().

◆ m_neutralLossMass

pappso::pappso_double pappso::XtandemSpectrumProcess::m_neutralLossMass = MASSH2O
private

◆ m_neutralLossWindowDalton

pappso::pappso_double pappso::XtandemSpectrumProcess::m_neutralLossWindowDalton = 0.5
private

The documentation for this class was generated from the following files: