|  | OpenMS
    2.6.0
    | 
 
 
  
  
 
Go to the documentation of this file.
   65       std::map<Int, std::map<Int, SampleAbundances>> 
abundances;
 
   68       std::map<Int, std::map<Int, SampleAbundances>> 
psm_counts;
 
  139         n_samples(0), quant_proteins(0), too_few_peptides(0),
 
  140         quant_peptides(0), total_peptides(0), quant_features(0),
 
  141         total_features(0), blank_features(0), ambig_features(0) {}
 
  169     void readQuantData(std::vector<ProteinIdentification>& proteins,
 
  170                        std::vector<PeptideIdentification>& peptides,
 
  182     void quantifyPeptides(
const std::vector<PeptideIdentification>& peptides =
 
  183                           std::vector<PeptideIdentification>());
 
  195     const Statistics& getStatistics();
 
  198     const PeptideQuant& getPeptideResults();
 
  201     const ProteinQuant& getProteinResults();
 
  204     static void annotateQuantificationsToProteins(
 
  205       const ProteinQuant& protein_quants, 
 
  207       const UInt n_samples,
 
  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)
 
  254       size_t best_n_quant(0);
 
  255       double best_abundance(0);
 
  256       best = std::make_pair(0,0);
 
  258       for (
auto & fa : peptide_abundances)  
 
  260         for (
auto & ca : fa.second) 
 
  262           const Int & fraction = fa.first;
 
  263           const Int & charge = ca.first;
 
  265           double current_abundance = std::accumulate(
 
  266               std::begin(ca.second),
 
  269               [] (
int value, 
const SampleAbundances::value_type& p)
 
  270               { return value + p.second; }
 
  273           if (current_abundance <= 0) { 
continue; }
 
  275           const size_t current_n_quant = ca.second.size();
 
  276           if (current_n_quant > best_n_quant)
 
  278             best_abundance = current_abundance;
 
  279             best_n_quant = current_n_quant;
 
  280             best = std::make_pair(fraction, charge);
 
  282           else if (current_n_quant == best_n_quant 
 
  283             && current_abundance > best_abundance)  
 
  285             best_abundance = current_abundance;
 
  286             best = std::make_pair(fraction, charge);
 
  290       return best_abundance > 0.;
 
  298     template <
typename T>
 
  299     void orderBest_(
const std::map<T, SampleAbundances> & abundances,
 
  300                     std::vector<T>& result)
 
  302       typedef std::pair<Size, double> PairType;
 
  303       std::multimap<PairType, T, std::greater<PairType> > order;
 
  304       for (
typename std::map<T, SampleAbundances>::const_iterator ab_it =
 
  305              abundances.begin(); ab_it != abundances.end(); ++ab_it)
 
  308         for (SampleAbundances::const_iterator samp_it = ab_it->second.begin();
 
  309              samp_it != ab_it->second.end(); ++samp_it)
 
  311           total += samp_it->second;
 
  313         if (total <= 0.0) 
continue;         
 
  314         PairType key = std::make_pair(ab_it->second.size(), total);
 
  315         order.insert(std::make_pair(key, ab_it->first));
 
  318       for (
typename std::multimap<PairType, T, std::greater<PairType> >::
 
  319            iterator ord_it = order.begin(); ord_it != order.end(); ++ord_it)
 
  321         result.push_back(ord_it->second);
 
  330     void normalizePeptides_();
 
  344     String getAccession_(
const std::set<String>& pep_accessions,
 
  345                          std::map<String, String>& accession_to_leader);
 
  352     void countPeptides_(std::vector<PeptideIdentification>& peptides, 
const Size& n_fractions);
 
  355     void updateMembers_() 
override;
 
  
Representation of an experimental design in OpenMS. Instances can be loaded with the ExperimentalDesi...
Definition: ExperimentalDesign.h:243
Statistics for processing summary.
Definition: PeptideAndProteinQuant.h:117
Statistics()
constructor
Definition: PeptideAndProteinQuant.h:138
ProteinQuant prot_quant_
Protein quantification data.
Definition: PeptideAndProteinQuant.h:219
SampleAbundances total_abundances
mapping: sample -> total abundance
Definition: PeptideAndProteinQuant.h:71
PeptideQuant pep_quant_
Peptide quantification data.
Definition: PeptideAndProteinQuant.h:216
A more convenient string class.
Definition: String.h:59
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
SampleAbundances total_abundances
mapping: sample -> total abundance
Definition: PeptideAndProteinQuant.h:98
~PeptideAndProteinQuant() override
Destructor.
Definition: PeptideAndProteinQuant.h:148
std::set< String > accessions
protein accessions for this peptide
Definition: PeptideAndProteinQuant.h:77
Size total_features
Definition: PeptideAndProteinQuant.h:135
Size n_samples
number of samples (or assays in mzTab terms)
Definition: PeptideAndProteinQuant.h:120
Representation of a protein identification run.
Definition: ProteinIdentification.h:70
SampleAbundances total_psm_counts
spectral counting-based abundances
Definition: PeptideAndProteinQuant.h:101
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:92
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
Size n_ms_files
number of MS files
Definition: PeptideAndProteinQuant.h:126
std::map< String, SampleAbundances > psm_counts
Definition: PeptideAndProteinQuant.h:95
std::map< Int, std::map< Int, SampleAbundances > > abundances
mapping: fraction -> charge -> sample -> abundance
Definition: PeptideAndProteinQuant.h:65
SampleAbundances total_distinct_peptides
number of distinct peptide sequences
Definition: PeptideAndProteinQuant.h:104
std::map< UInt64, double > SampleAbundances
Mapping: sample ID -> abundance.
Definition: PeptideAndProteinQuant.h:59
Quantitative and associated data for a protein.
Definition: PeptideAndProteinQuant.h:90
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:299
SampleAbundances total_psm_counts
spectral counting-based abundances
Definition: PeptideAndProteinQuant.h:74
A container for consensus elements.
Definition: ConsensusMap.h:80
unsigned int UInt
Unsigned integer type.
Definition: Types.h:94
Size n_fractions
number of fractions
Definition: PeptideAndProteinQuant.h:123
std::map< Int, std::map< Int, SampleAbundances > > psm_counts
mapping: fraction -> charge -> sample -> abundance
Definition: PeptideAndProteinQuant.h:68
A container for features.
Definition: FeatureMap.h:97
Representation of a Peak2D, RichPeak2D or Feature .
Definition: FeatureHandle.h:57
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.
Definition: PeptideAndProteinQuant.h:250
Size too_few_peptides
Definition: PeptideAndProteinQuant.h:129
Statistics stats_
Processing statistics for output in the end.
Definition: PeptideAndProteinQuant.h:213
std::map< String, ProteinData > ProteinQuant
Mapping: protein accession -> protein data.
Definition: PeptideAndProteinQuant.h:114
Quantitative and associated data for a peptide.
Definition: PeptideAndProteinQuant.h:62
Size total_peptides
Definition: PeptideAndProteinQuant.h:132
std::map< AASequence, PeptideData > PeptideQuant
Mapping: peptide sequence (modified) -> peptide data.
Definition: PeptideAndProteinQuant.h:87
Representation of a peptide hit.
Definition: PeptideHit.h:55
Helper class for peptide and protein quantification based on feature data annotated with IDs.
Definition: PeptideAndProteinQuant.h:53
std::map< String, SampleAbundances > abundances
mapping: peptide (unmodified) -> sample -> abundance
Definition: PeptideAndProteinQuant.h:93