40 std::map<Int, std::map<Int, SampleAbundances>>
abundances;
43 std::map<Int, std::map<Int, SampleAbundances>>
psm_counts;
114 n_samples(0), quant_proteins(0), too_few_peptides(0),
115 quant_peptides(0), total_peptides(0), quant_features(0),
116 total_features(0), blank_features(0), ambig_features(0) {}
145 std::vector<PeptideIdentification>& peptides,
158 std::vector<PeptideIdentification>());
182 bool remove_unquantified =
true);
225 const std::map<
Int, std::map<Int, SampleAbundances>> & peptide_abundances,
226 std::pair<size_t, size_t> & best);
233 template <
typename T>
234 void orderBest_(
const std::map<T, SampleAbundances> & abundances,
235 std::vector<T>& result)
237 typedef std::pair<Size, double> PairType;
238 std::multimap<PairType, T, std::greater<PairType> > order;
239 for (
typename std::map<T, SampleAbundances>::const_iterator ab_it =
240 abundances.begin(); ab_it != abundances.end(); ++ab_it)
243 for (SampleAbundances::const_iterator samp_it = ab_it->second.begin();
244 samp_it != ab_it->second.end(); ++samp_it)
246 total += samp_it->second;
248 if (total <= 0.0)
continue;
249 PairType key = std::make_pair(ab_it->second.size(), total);
250 order.insert(std::make_pair(key, ab_it->first));
253 for (
typename std::multimap<PairType, T, std::greater<PairType> >::
254 iterator ord_it = order.begin(); ord_it != order.end(); ++ord_it)
256 result.push_back(ord_it->second);
280 std::map<String, String>& accession_to_leader);
A container for consensus elements.
Definition: ConsensusMap.h:66
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:66
Representation of an experimental design in OpenMS. Instances can be loaded with the ExperimentalDesi...
Definition: ExperimentalDesign.h:219
Representation of a Peak2D, RichPeak2D or Feature .
Definition: FeatureHandle.h:34
A container for features.
Definition: FeatureMap.h:80
Helper class for peptide and protein quantification based on feature data annotated with IDs.
Definition: PeptideAndProteinQuant.h:30
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:62
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:89
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:190
const PeptideQuant & getPeptideResults()
Get peptide abundance data.
~PeptideAndProteinQuant() override
Destructor.
Definition: PeptideAndProteinQuant.h:123
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:187
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:234
std::map< UInt64, double > SampleAbundances
Mapping: sample ID -> abundance.
Definition: PeptideAndProteinQuant.h:34
ProteinQuant prot_quant_
Protein quantification data.
Definition: PeptideAndProteinQuant.h:193
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:31
Representation of a protein identification run.
Definition: ProteinIdentification.h:50
A more convenient string class.
Definition: String.h:34
int Int
Signed integer type.
Definition: Types.h:72
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:97
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
Quantitative and associated data for a peptide.
Definition: PeptideAndProteinQuant.h:38
SampleAbundances total_psm_counts
spectral counting-based abundances
Definition: PeptideAndProteinQuant.h:49
SampleAbundances total_abundances
mapping: sample -> total abundance
Definition: PeptideAndProteinQuant.h:46
std::set< String > accessions
protein accessions for this peptide
Definition: PeptideAndProteinQuant.h:52
std::map< Int, std::map< Int, SampleAbundances > > abundances
mapping: fraction -> charge -> sample -> abundance
Definition: PeptideAndProteinQuant.h:40
std::map< Int, std::map< Int, SampleAbundances > > psm_counts
mapping: fraction -> charge -> sample -> abundance
Definition: PeptideAndProteinQuant.h:43
PeptideData()=default
constructor
Quantitative and associated data for a protein.
Definition: PeptideAndProteinQuant.h:66
ProteinData()=default
constructor
SampleAbundances total_psm_counts
spectral counting-based abundances
Definition: PeptideAndProteinQuant.h:76
SampleAbundances total_abundances
mapping: sample -> total abundance
Definition: PeptideAndProteinQuant.h:73
std::map< String, SampleAbundances > abundances
mapping: peptide (unmodified) -> sample -> abundance
Definition: PeptideAndProteinQuant.h:68
std::map< String, SampleAbundances > psm_counts
Definition: PeptideAndProteinQuant.h:70
SampleAbundances total_distinct_peptides
number of distinct peptide sequences
Definition: PeptideAndProteinQuant.h:79
Statistics for processing summary.
Definition: PeptideAndProteinQuant.h:93
Size quant_proteins
protein statistics
Definition: PeptideAndProteinQuant.h:104
Size quant_peptides
peptide statistics
Definition: PeptideAndProteinQuant.h:107
Size n_samples
number of samples (or assays in mzTab terms)
Definition: PeptideAndProteinQuant.h:95
Size n_fractions
number of fractions
Definition: PeptideAndProteinQuant.h:98
Statistics()
constructor
Definition: PeptideAndProteinQuant.h:113
Size n_ms_files
number of MS files
Definition: PeptideAndProteinQuant.h:101
Size ambig_features
Definition: PeptideAndProteinQuant.h:110