66 std::map<Int, std::map<Int, SampleAbundances>>
abundances;
69 std::map<Int, std::map<Int, SampleAbundances>>
psm_counts;
140 n_samples(0), quant_proteins(0), too_few_peptides(0),
141 quant_peptides(0), total_peptides(0), quant_features(0),
142 total_features(0), blank_features(0), ambig_features(0) {}
170 void readQuantData(std::vector<ProteinIdentification>& proteins,
171 std::vector<PeptideIdentification>& peptides,
183 void quantifyPeptides(
const std::vector<PeptideIdentification>& peptides =
184 std::vector<PeptideIdentification>());
196 const Statistics& getStatistics();
199 const PeptideQuant& getPeptideResults();
202 const ProteinQuant& getProteinResults();
205 void annotateQuantificationsToProteins(
206 const ProteinQuant& protein_quants,
208 bool remove_unquantified =
true);
228 PeptideHit getAnnotation_(std::vector<PeptideIdentification>& peptides);
251 const std::map<
Int, std::map<Int, SampleAbundances>> & peptide_abundances,
252 std::pair<size_t, size_t> & best);
259 template <
typename T>
260 void orderBest_(
const std::map<T, SampleAbundances> & abundances,
261 std::vector<T>& result)
263 typedef std::pair<Size, double> PairType;
264 std::multimap<PairType, T, std::greater<PairType> > order;
265 for (
typename std::map<T, SampleAbundances>::const_iterator ab_it =
266 abundances.begin(); ab_it != abundances.end(); ++ab_it)
269 for (SampleAbundances::const_iterator samp_it = ab_it->second.begin();
270 samp_it != ab_it->second.end(); ++samp_it)
272 total += samp_it->second;
274 if (total <= 0.0)
continue;
275 PairType key = std::make_pair(ab_it->second.size(), total);
276 order.insert(std::make_pair(key, ab_it->first));
279 for (
typename std::multimap<PairType, T, std::greater<PairType> >::
280 iterator ord_it = order.begin(); ord_it != order.end(); ++ord_it)
282 result.push_back(ord_it->second);
291 void normalizePeptides_();
305 String getAccession_(
const std::set<String>& pep_accessions,
306 std::map<String, String>& accession_to_leader);
313 void countPeptides_(std::vector<PeptideIdentification>& peptides);
316 void updateMembers_()
override;
Size too_few_peptides
Definition: PeptideAndProteinQuant.h:130
Representation of a protein identification run.
Definition: ProteinIdentification.h:74
SampleAbundances total_distinct_peptides
number of distinct peptide sequences
Definition: PeptideAndProteinQuant.h:105
Statistics()
constructor
Definition: PeptideAndProteinQuant.h:139
Size total_peptides
Definition: PeptideAndProteinQuant.h:133
A more convenient string class.
Definition: String.h:58
Size n_samples
number of samples (or assays in mzTab terms)
Definition: PeptideAndProteinQuant.h:121
A container for features.
Definition: FeatureMap.h:98
Size total_features
Definition: PeptideAndProteinQuant.h:136
A container for consensus elements.
Definition: ConsensusMap.h:82
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
~PeptideAndProteinQuant() override
Destructor.
Definition: PeptideAndProteinQuant.h:149
std::set< String > accessions
protein accessions for this peptide
Definition: PeptideAndProteinQuant.h:78
PeptideQuant pep_quant_
Peptide quantification data.
Definition: PeptideAndProteinQuant.h:216
Representation of an experimental design in OpenMS. Instances can be loaded with the ExperimentalDesi...
Definition: ExperimentalDesign.h:244
SampleAbundances total_psm_counts
spectral counting-based abundances
Definition: PeptideAndProteinQuant.h:75
std::map< String, ProteinData > ProteinQuant
Mapping: protein accession -> protein data.
Definition: PeptideAndProteinQuant.h:115
std::map< AASequence, PeptideData > PeptideQuant
Mapping: peptide sequence (modified) -> peptide data.
Definition: PeptideAndProteinQuant.h:88
Size n_ms_files
number of MS files
Definition: PeptideAndProteinQuant.h:127
std::map< Int, std::map< Int, SampleAbundances > > abundances
mapping: fraction -> charge -> sample -> abundance
Definition: PeptideAndProteinQuant.h:66
Size n_fractions
number of fractions
Definition: PeptideAndProteinQuant.h:124
std::map< Int, std::map< Int, SampleAbundances > > psm_counts
mapping: fraction -> charge -> sample -> abundance
Definition: PeptideAndProteinQuant.h:69
Helper class for peptide and protein quantification based on feature data annotated with IDs...
Definition: PeptideAndProteinQuant.h:54
Representation of a peptide hit.
Definition: PeptideHit.h:55
Quantitative and associated data for a peptide.
Definition: PeptideAndProteinQuant.h:63
SampleAbundances total_psm_counts
spectral counting-based abundances
Definition: PeptideAndProteinQuant.h:102
Statistics stats_
Processing statistics for output in the end.
Definition: PeptideAndProteinQuant.h:213
SampleAbundances total_abundances
mapping: sample -> total abundance
Definition: PeptideAndProteinQuant.h:72
SampleAbundances total_abundances
mapping: sample -> total abundance
Definition: PeptideAndProteinQuant.h:99
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
Representation of a Peak2D, RichPeak2D or Feature .
Definition: FeatureHandle.h:57
Statistics for processing summary.
Definition: PeptideAndProteinQuant.h:118
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:92
void orderBest_(const std::map< T, SampleAbundances > &abundances, std::vector< T > &result)
Order keys (charges/peptides for peptide/protein quantification) according to how many samples they a...
Definition: PeptideAndProteinQuant.h:260
std::map< String, SampleAbundances > abundances
mapping: peptide (unmodified) -> sample -> abundance
Definition: PeptideAndProteinQuant.h:94
Quantitative and associated data for a protein.
Definition: PeptideAndProteinQuant.h:91
std::map< String, SampleAbundances > psm_counts
Definition: PeptideAndProteinQuant.h:96
int Int
Signed integer type.
Definition: Types.h:102
ProteinQuant prot_quant_
Protein quantification data.
Definition: PeptideAndProteinQuant.h:219
std::map< UInt64, double > SampleAbundances
Mapping: sample ID -> abundance.
Definition: PeptideAndProteinQuant.h:60