1
// -*- mode: C++; tab-width: 2; -*-
4
// --------------------------------------------------------------------------
5
// OpenMS Mass Spectrometry Framework
6
// --------------------------------------------------------------------------
7
// Copyright (C) 2003-2011 -- Oliver Kohlbacher, Knut Reinert
9
// This library is free software; you can redistribute it and/or
10
// modify it under the terms of the GNU Lesser General Public
11
// License as published by the Free Software Foundation; either
12
// version 2.1 of the License, or (at your option) any later version.
14
// This library is distributed in the hope that it will be useful,
15
// but WITHOUT ANY WARRANTY; without even the implied warranty of
16
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
// Lesser General Public License for more details.
19
// You should have received a copy of the GNU Lesser General Public
20
// License along with this library; if not, write to the Free Software
21
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23
// --------------------------------------------------------------------------
24
// $Maintainer: Chris Bielow $
25
// $Authors: Chris Bielow $
26
// --------------------------------------------------------------------------
28
#ifndef OPENMS_ANALYSIS_QUANTITATION_ITRAQQUANTIFIER_H
29
#define OPENMS_ANALYSIS_QUANTITATION_ITRAQQUANTIFIER_H
33
#include <OpenMS/ANALYSIS/QUANTITATION/ItraqConstants.h>
34
#include <OpenMS/KERNEL/ConsensusMap.h>
35
#include <OpenMS/METADATA/ProteinIdentification.h>
36
#include <OpenMS/METADATA/PeptideIdentification.h>
43
@brief Does post-processing on raw iTRAQ channel quantitation
45
Using the raw consensus map from ItraqChannelExtractor, a non-negative isotope correction, normalization (using median)
46
and [optionally] protein inference is computed.
48
@htmlinclude OpenMS_ItraqQuantifier.parameters
51
class OPENMS_DLLAPI ItraqQuantifier
52
: public DefaultParamHandler,
58
typedef ItraqConstants::ChannelInfo ChannelInfo;
59
typedef ItraqConstants::ChannelMapType ChannelMapType;
60
typedef ItraqConstants::IsotopeMatrices IsotopeMatrices;
62
/// Constructor (assuming 4-plex experiment)
65
/// Constructor with iTRAQ-type (either ItraqConstants::FOURPLEX or ItraqConstants::EIGHTPLEX)
66
ItraqQuantifier(Int itraq_type);
68
/// Constructor with iTRAQ-type (either ItraqConstants::FOURPLEX or ItraqConstants::EIGHTPLEX) and Param
69
ItraqQuantifier(Int itraq_type, const Param& param);
72
ItraqQuantifier(const ItraqQuantifier& cp);
74
/// assignment operator
75
ItraqQuantifier& operator = (const ItraqQuantifier& rhs);
78
* @brief using the raw iTRAQ intensities we apply isotope correction, normalization (using median)
80
* @param consensus_map_in Raw iTRAQ intensities from previous step
81
* @param consensus_map_out Post-processed iTRAQ ratios for peptides
83
* @throws Exception::FailedAPICall is least-squares fit fails
84
* @throws Exception::InvalidParameter if parameter is invalid (e.g. reference_channel)
86
void run(const ConsensusMap& consensus_map_in,
87
ConsensusMap& consensus_map_out
91
@brief Statistics for quantitation performance and comparison of NNLS vs. naive method (aka matrix inversion)
94
struct ItraqQuantifierStats
96
ItraqQuantifierStats()
99
iso_number_ms2_negative(0),
100
iso_number_reporter_negative(0),
101
iso_number_reporter_different(0),
102
iso_solution_different_intensity(0),
103
iso_total_intensity_negative(0),
110
Size channel_count; //< 4plex or 8 plex?!
111
Size iso_number_ms2_negative; //< number of MS2 spectra where one or more channels had negative solution
112
Size iso_number_reporter_negative; //< number of channels where naive solution was negative
113
Size iso_number_reporter_different; //< number of channels >0 where naive solution was different; happens when naive solution is negative in other channels
114
DoubleReal iso_solution_different_intensity; //< absolute intensity difference between both solutions (for channels > 0)
115
DoubleReal iso_total_intensity_negative; //< only for spectra where naive solution is negative
116
Size number_ms2_total; //< total number of MS2 spectra
117
Size number_ms2_empty; //< number of empty MS2 (no reporters at all)
118
std::map<Size,Size> empty_channels; //< Channel_ID -> Missing; indicating the number of empty channels from all MS2 scans, i.e., numbers are between number_ms2_empty and number_ms2_total
121
ItraqQuantifierStats getStats() const;
125
void setDefaultParams_();
127
void updateMembers_();
132
void initIsotopeCorrections_();
134
void reconstructChannelInfo_(const ConsensusMap& consensus_map);
136
/// either ItraqConstants::FOURPLEX or ItraqConstants::EIGHTPLEX
139
/// map the channel-name (e.g., 114) onto its channel_info
140
/// the channel-description is also the id-string in the mapList section of the ConsensusMap
141
ChannelMapType channel_map_;
143
/// Matrices with isotope correction values (one for each plex-type)
144
IsotopeMatrices isotope_corrections_;
146
/// stats for isotope correction
147
ItraqQuantifierStats stats_;
151
OPENMS_DLLAPI std::ostream& operator << (std::ostream& os, const ItraqQuantifier::ItraqQuantifierStats& stats);
155
#endif // OPENMS_ANALYSIS_QUANTITATION_ITRAQQUANTIFIER_H