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) {}
171 std::vector<PeptideIdentification>& peptides,
184 std::vector<PeptideIdentification>());
208 bool remove_unquantified =
true);
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);
306 std::map<String, String>& accession_to_leader);
A container for consensus elements.
Definition: ConsensusMap.h:92
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:92
Representation of an experimental design in OpenMS. Instances can be loaded with the ExperimentalDesi...
Definition: ExperimentalDesign.h:245
Representation of a Peak2D, RichPeak2D or Feature .
Definition: FeatureHandle.h:60
A container for features.
Definition: FeatureMap.h:106
Helper class for peptide and protein quantification based on feature data annotated with IDs.
Definition: PeptideAndProteinQuant.h:56
void readQuantData(ConsensusMap &consensus, const ExperimentalDesign &ed)
Read quantitative data from a consensus map.
void annotateQuantificationsToProteins(const ProteinQuant &protein_quants, ProteinIdentification &proteins, bool remove_unquantified=true)
Annotate protein quant results as meta data to protein ids.
std::map< AASequence, PeptideData > PeptideQuant
Mapping: peptide sequence (modified) -> peptide data.
Definition: PeptideAndProteinQuant.h:88
void readQuantData(FeatureMap &features, const ExperimentalDesign &ed)
Read quantitative data from a feature map.
void countPeptides_(std::vector< PeptideIdentification > &peptides)
Count the number of identifications (best hits only) of each peptide sequence.
void quantifyPeptides(const std::vector< PeptideIdentification > &peptides=std::vector< PeptideIdentification >())
Compute peptide abundances.
std::map< String, ProteinData > ProteinQuant
Mapping: protein accession -> protein data.
Definition: PeptideAndProteinQuant.h:115
const ProteinQuant & getProteinResults()
Get protein abundance data.
void quantifyFeature_(const FeatureHandle &feature, size_t fraction, size_t sample, const PeptideHit &hit)
Gather quantitative information from a feature.
bool getBest_(const std::map< Int, std::map< Int, SampleAbundances >> &peptide_abundances, std::pair< size_t, size_t > &best)
Determine fraction and charge state of a peptide with the highest number of abundances.
PeptideQuant pep_quant_
Peptide quantification data.
Definition: PeptideAndProteinQuant.h:216
const PeptideQuant & getPeptideResults()
Get peptide abundance data.
~PeptideAndProteinQuant() override
Destructor.
Definition: PeptideAndProteinQuant.h:149
void updateMembers_() override
Clear all data when parameters are set.
void normalizePeptides_()
Normalize peptide abundances across samples by (multiplicative) scaling to equal medians.
String getAccession_(const std::set< String > &pep_accessions, std::map< String, String > &accession_to_leader)
Get the "canonical" protein accession from the list of protein accessions of a peptide.
void quantifyProteins(const ProteinIdentification &proteins=ProteinIdentification())
Compute protein abundances.
Statistics stats_
Processing statistics for output in the end.
Definition: PeptideAndProteinQuant.h:213
PeptideHit getAnnotation_(std::vector< PeptideIdentification > &peptides)
Get the "canonical" annotation (a single peptide hit) of a feature/consensus feature from the associa...
const Statistics & getStatistics()
Get summary statistics.
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< UInt64, double > SampleAbundances
Mapping: sample ID -> abundance.
Definition: PeptideAndProteinQuant.h:60
ProteinQuant prot_quant_
Protein quantification data.
Definition: PeptideAndProteinQuant.h:219
PeptideAndProteinQuant()
Constructor.
void readQuantData(std::vector< ProteinIdentification > &proteins, std::vector< PeptideIdentification > &peptides, const ExperimentalDesign &ed)
Read quantitative data from identification results (for quantification via spectral counting).
Representation of a peptide hit.
Definition: PeptideHit.h:57
Representation of a protein identification run.
Definition: ProteinIdentification.h:76
A more convenient string class.
Definition: String.h:60
int Int
Signed integer type.
Definition: Types.h:102
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:48
Quantitative and associated data for a peptide.
Definition: PeptideAndProteinQuant.h:64
SampleAbundances total_psm_counts
spectral counting-based abundances
Definition: PeptideAndProteinQuant.h:75
SampleAbundances total_abundances
mapping: sample -> total abundance
Definition: PeptideAndProteinQuant.h:72
std::set< String > accessions
protein accessions for this peptide
Definition: PeptideAndProteinQuant.h:78
std::map< Int, std::map< Int, SampleAbundances > > abundances
mapping: fraction -> charge -> sample -> abundance
Definition: PeptideAndProteinQuant.h:66
std::map< Int, std::map< Int, SampleAbundances > > psm_counts
mapping: fraction -> charge -> sample -> abundance
Definition: PeptideAndProteinQuant.h:69
PeptideData()=default
constructor
Quantitative and associated data for a protein.
Definition: PeptideAndProteinQuant.h:92
ProteinData()=default
constructor
SampleAbundances total_psm_counts
spectral counting-based abundances
Definition: PeptideAndProteinQuant.h:102
SampleAbundances total_abundances
mapping: sample -> total abundance
Definition: PeptideAndProteinQuant.h:99
std::map< String, SampleAbundances > abundances
mapping: peptide (unmodified) -> sample -> abundance
Definition: PeptideAndProteinQuant.h:94
std::map< String, SampleAbundances > psm_counts
Definition: PeptideAndProteinQuant.h:96
SampleAbundances total_distinct_peptides
number of distinct peptide sequences
Definition: PeptideAndProteinQuant.h:105
Statistics for processing summary.
Definition: PeptideAndProteinQuant.h:119
Size quant_proteins
protein statistics
Definition: PeptideAndProteinQuant.h:130
Size quant_peptides
peptide statistics
Definition: PeptideAndProteinQuant.h:133
Size n_samples
number of samples (or assays in mzTab terms)
Definition: PeptideAndProteinQuant.h:121
Size n_fractions
number of fractions
Definition: PeptideAndProteinQuant.h:124
Statistics()
constructor
Definition: PeptideAndProteinQuant.h:139
Size n_ms_files
number of MS files
Definition: PeptideAndProteinQuant.h:127
Size ambig_features
Definition: PeptideAndProteinQuant.h:136