OpenMS
Loading...
Searching...
No Matches
ProteinIdentification.h
Go to the documentation of this file.
1// Copyright (c) 2002-present, OpenMS Inc. -- EKU Tuebingen, ETH Zurich, and FU Berlin
2// SPDX-License-Identifier: BSD-3-Clause
3//
4// --------------------------------------------------------------------------
5// $Maintainer: Chris Bielow $
6// $Authors: Nico Pfeifer, Chris Bielow $
7// --------------------------------------------------------------------------
8
9#pragma once
10
22
23#include <functional>
24#include <set>
25
26namespace OpenMS
27{
28 class MSExperiment;
29 class PeptideIdentification;
30 class PeptideEvidence;
31 class ConsensusMap;
32
52 class OPENMS_DLLAPI ProteinIdentification :
54 {
55public:
58
60 struct Mapping
61 {
62 std::map<String, StringList> identifier_to_msrunpath;
63 std::map<StringList, String> runpath_to_identifier;
64
65 Mapping() = default;
66
67 explicit Mapping(const std::vector<ProteinIdentification>& prot_ids)
68 {
69 create(prot_ids);
70 }
71
72 void create(const std::vector<ProteinIdentification>& prot_ids)
73 {
74 identifier_to_msrunpath.clear();
75 runpath_to_identifier.clear();
76 StringList filenames;
77 for (const ProteinIdentification& prot_id : prot_ids)
78 {
79 prot_id.getPrimaryMSRunPath(filenames);
80 if (filenames.empty())
81 {
82 throw Exception::MissingInformation(__FILE__, __LINE__, OPENMS_PRETTY_FUNCTION, "No MS run path annotated in ProteinIdentification.");
83 }
84 identifier_to_msrunpath[prot_id.getIdentifier()] = filenames;
85 const auto& it = runpath_to_identifier.find(filenames);
86 if (it != runpath_to_identifier.end())
87 {
88 throw Exception::InvalidValue(__FILE__, __LINE__, OPENMS_PRETTY_FUNCTION,
89 "Multiple protein identifications with the same ms-run-path in Consensus/FeatureXML. Check input!\n",
90 ListUtils::concatenate(filenames, ","));
91 }
92 runpath_to_identifier[filenames] = prot_id.getIdentifier();
93 }
94 }
95
97 {
98 // if a merge index n is annotated, we use the filename annotated at index n in the protein identification, otherwise the one at index 0
99 size_t merge_index = pepid.getMetaValue(Constants::UserParam::ID_MERGE_INDEX, 0);
100 const auto& filenames = identifier_to_msrunpath.at(pepid.getIdentifier());
101 return (merge_index < filenames.size()) ? filenames[merge_index] : ""; // return filename or empty string if missing
102 }
103 };
104
108 class OPENMS_DLLAPI ProteinGroup
109 {
110 public:
113 typedef std::vector<FloatDataArray> FloatDataArrays;
116 typedef std::vector<StringDataArray> StringDataArrays;
119 typedef std::vector<IntegerDataArray> IntegerDataArrays;
120
123
125 std::vector<String> accessions;
126
128
130 bool operator==(const ProteinGroup& rhs) const;
131
132 /*
133 @brief Comparison operator (for sorting)
134
135 This operator is intended for sorting protein groups in a "best first"
136 manner. That means higher probabilities are "less" than lower
137 probabilities (!); smaller groups are "less" than larger groups;
138 everything else being equal, accessions are compared lexicographically.
139 */
140 bool operator<(const ProteinGroup& rhs) const;
141
143
156
159 {
160 return float_data_arrays_;
161 }
162
165
168
171
174
177
180
183
186 {
187 return *std::find_if(integer_data_arrays_.begin(), integer_data_arrays_.end(),
188 [&name](const IntegerDataArray& da) { return da.getName() == name; } );
189 }
190
193 {
194 return *std::find_if(string_data_arrays_.begin(), string_data_arrays_.end(),
195 [&name](const StringDataArray& da) { return da.getName() == name; } );
196 }
197
200 {
201 return *std::find_if(float_data_arrays_.begin(), float_data_arrays_.end(),
202 [&name](const FloatDataArray& da) { return da.getName() == name; } );
203 }
204
207 {
208 return *std::find_if(integer_data_arrays_.begin(), integer_data_arrays_.end(),
209 [&name](const IntegerDataArray& da) { return da.getName() == name; } );
210 }
211
214 {
215 return *std::find_if(string_data_arrays_.begin(), string_data_arrays_.end(),
216 [&name](const StringDataArray& da) { return da.getName() == name; } );
217 }
218
221 {
222 return *std::find_if(float_data_arrays_.begin(), float_data_arrays_.end(),
223 [&name](const FloatDataArray& da) { return da.getName() == name; } );
224 }
225
226 private:
229
232
235 };
236
239 {
242 SIZE_OF_PEAKMASSTYPE
243 };
244
246 static const std::string NamesOfPeakMassType[SIZE_OF_PEAKMASSTYPE];
247
250
299
310
315
317 bool operator==(const ProteinIdentification& rhs) const;
319 bool operator!=(const ProteinIdentification& rhs) const;
321
323
324
325 const std::vector<ProteinHit>& getHits() const;
327 std::vector<ProteinHit>& getHits();
329 void insertHit(const ProteinHit& input);
331 void insertHit(ProteinHit&& input);
332
338 void setHits(const std::vector<ProteinHit>& hits);
339
341 std::vector<ProteinHit>::iterator findHit(const String& accession);
342
344 const std::vector<ProteinGroup>& getProteinGroups() const;
346 std::vector<ProteinGroup>& getProteinGroups();
349
351 const std::vector<ProteinGroup>& getIndistinguishableProteins() const;
353 std::vector<ProteinGroup>& getIndistinguishableProteins();
358
362 void setSignificanceThreshold(double value);
364 const String& getScoreType() const;
366 void setScoreType(const String& type);
370 void setHigherScoreBetter(bool higher_is_better);
372 void sort();
373
382 void computeCoverage(const ConsensusMap& cmap, bool use_unassigned_ids);
384
392 const PeptideIdentificationList& pep_ids,
393 const StringList& skip_modifications);
395 const ConsensusMap& cmap,
396 const StringList& skip_modifications,
397 bool use_unassigned_ids);
398
399
401
402
403 const DateTime& getDateTime() const;
405 void setDateTime(const DateTime& date);
407 void setSearchEngine(const String& search_engine);
409 const String& getSearchEngine() const;
413 void setSearchEngineVersion(const String& search_engine_version);
417 void setInferenceEngine(const String& search_engine);
421 void setInferenceEngineVersion(const String& inference_engine_version);
425 void setSearchParameters(const SearchParameters& search_parameters);
427 void setSearchParameters(SearchParameters&& search_parameters);
433 const String& getIdentifier() const;
435 void setIdentifier(const String& id);
442 void setPrimaryMSRunPath(const StringList& s, bool raw = false);
443
446 void addPrimaryMSRunPath(const String& s, bool raw = false);
447 void addPrimaryMSRunPath(const StringList& s, bool raw = false);
448
455 void getPrimaryMSRunPath(StringList& output, bool raw = false) const;
456
458 Size nrPrimaryMSRunPaths(bool raw = false) const;
459
462 bool hasInferenceData() const;
463
466
470 bool peptideIDsMergeable(const ProteinIdentification& id_run, const String& experiment_type) const;
471
474 std::vector<std::pair<String,String>> getSearchEngineSettingsAsPairs(const String& se = "") const;
475
477
480protected:
482
489
491
494 std::vector<ProteinHit> protein_hits_;
495 std::vector<ProteinGroup> protein_groups_;
497 std::vector<ProteinGroup> indistinguishable_proteins_;
500
501 private:
502 void computeCoverageFromEvidenceMapping_(const std::unordered_map<String, std::set<PeptideEvidence>>& map);
503 void fillEvidenceMapping_(std::unordered_map<String, std::set<PeptideEvidence> >& map_acc_2_evidence,
504 const PeptideIdentificationList& pep_ids) const;
505
506 void fillModMapping_(const PeptideIdentificationList& pep_ids, const StringList& skip_modifications,
507 std::unordered_map<String, std::set<std::pair<Size, ResidueModification>>>& prot2mod) const;
508 };
509
510
511} //namespace OpenMS
512
513// Hash function specializations
514namespace std
515{
517 template<>
518 struct hash<OpenMS::ProteinIdentification::ProteinGroup>
519 {
520 std::size_t operator()(const OpenMS::ProteinIdentification::ProteinGroup& pg) const noexcept
521 {
522 std::size_t seed = OpenMS::hash_float(pg.probability);
523 for (const auto& acc : pg.accessions)
524 {
526 }
527 return seed;
528 }
529 };
530
532 template<>
533 struct hash<OpenMS::ProteinIdentification::SearchParameters>
534 {
536 {
537 std::size_t seed = OpenMS::fnv1a_hash_string(sp.db);
541 OpenMS::hash_combine(seed, OpenMS::hash_int(static_cast<int>(sp.mass_type)));
542 // Hash fixed_modifications
543 for (const auto& mod : sp.fixed_modifications)
544 {
546 }
547 // Hash variable_modifications
548 for (const auto& mod : sp.variable_modifications)
549 {
551 }
552 OpenMS::hash_combine(seed, OpenMS::hash_int(sp.missed_cleavages));
553 OpenMS::hash_combine(seed, OpenMS::hash_float(sp.fragment_mass_tolerance));
554 OpenMS::hash_combine(seed, OpenMS::hash_int(static_cast<int>(sp.fragment_mass_tolerance_ppm)));
555 OpenMS::hash_combine(seed, OpenMS::hash_float(sp.precursor_mass_tolerance));
556 OpenMS::hash_combine(seed, OpenMS::hash_int(static_cast<int>(sp.precursor_mass_tolerance_ppm)));
557 // Hash digestion_enzyme using the base class hash
558 OpenMS::hash_combine(seed, std::hash<OpenMS::DigestionEnzyme>{}(sp.digestion_enzyme));
559 OpenMS::hash_combine(seed, OpenMS::hash_int(static_cast<int>(sp.enzyme_term_specificity)));
560 // Hash MetaInfoInterface base class
561 OpenMS::hash_combine(seed, std::hash<OpenMS::MetaInfoInterface>{}(sp));
562 return seed;
563 }
564 };
565
567 template<>
568 struct hash<OpenMS::ProteinIdentification>
569 {
570 std::size_t operator()(const OpenMS::ProteinIdentification& pi) const noexcept
571 {
572 // Hash identifier and search engine info
573 std::size_t seed = OpenMS::fnv1a_hash_string(pi.getIdentifier());
574 OpenMS::hash_combine(seed, OpenMS::fnv1a_hash_string(pi.getSearchEngine()));
575 OpenMS::hash_combine(seed, OpenMS::fnv1a_hash_string(pi.getSearchEngineVersion()));
576 // Hash SearchParameters
577 OpenMS::hash_combine(seed, std::hash<OpenMS::ProteinIdentification::SearchParameters>{}(pi.getSearchParameters()));
578 // Hash DateTime
579 OpenMS::hash_combine(seed, std::hash<OpenMS::DateTime>{}(pi.getDateTime()));
580 // Hash protein_hits
581 for (const auto& hit : pi.getHits())
582 {
583 OpenMS::hash_combine(seed, OpenMS::hash_float(hit.getScore()));
584 OpenMS::hash_combine(seed, OpenMS::hash_int(hit.getRank()));
585 OpenMS::hash_combine(seed, OpenMS::fnv1a_hash_string(hit.getAccession()));
586 OpenMS::hash_combine(seed, OpenMS::fnv1a_hash_string(hit.getSequence()));
587 OpenMS::hash_combine(seed, OpenMS::hash_float(hit.getCoverage()));
588 }
589 // Hash protein_groups
590 for (const auto& group : pi.getProteinGroups())
591 {
592 OpenMS::hash_combine(seed, std::hash<OpenMS::ProteinIdentification::ProteinGroup>{}(group));
593 }
594 // Hash indistinguishable_proteins
595 for (const auto& group : pi.getIndistinguishableProteins())
596 {
597 OpenMS::hash_combine(seed, std::hash<OpenMS::ProteinIdentification::ProteinGroup>{}(group));
598 }
599 // Hash score type and threshold
600 OpenMS::hash_combine(seed, OpenMS::fnv1a_hash_string(pi.getScoreType()));
601 OpenMS::hash_combine(seed, OpenMS::hash_float(pi.getSignificanceThreshold()));
602 OpenMS::hash_combine(seed, OpenMS::hash_int(static_cast<int>(pi.isHigherScoreBetter())));
603 // Hash MetaInfoInterface base class
604 OpenMS::hash_combine(seed, std::hash<OpenMS::MetaInfoInterface>{}(pi));
605 return seed;
606 }
607 };
608} // namespace std
A container for consensus elements.
Definition ConsensusMap.h:68
Float data array class.
Definition DataArrays.h:25
Integer data array class.
Definition DataArrays.h:75
String data array class.
Definition DataArrays.h:125
DateTime Class.
Definition DateTime.h:35
Representation of a digestion enzyme for proteins (protease)
Definition DigestionEnzymeProtein.h:24
Specificity
when querying for valid digestion products, this determines if the specificity of the two peptide end...
Definition EnzymaticDigestion.h:42
Invalid value exception.
Definition Exception.h:306
Not all required information provided.
Definition Exception.h:155
In-Memory representation of a mass spectrometry run.
Definition MSExperiment.h:49
Interface for classes that can store arbitrary meta information (Type-Name-Value tuples).
Definition MetaInfoInterface.h:36
const DataValue & getMetaValue(const String &name) const
Returns the value corresponding to a string, or DataValue::EMPTY if not found.
Container for peptide identifications from multiple spectra.
Definition PeptideIdentificationList.h:66
Represents the set of candidates (SpectrumMatches) identified for a single precursor spectrum.
Definition PeptideIdentification.h:64
const String & getIdentifier() const
Returns the identifier which links this PI to its corresponding ProteinIdentification.
Representation of a protein hit.
Definition ProteinHit.h:35
Bundles multiple (e.g. indistinguishable) proteins in a group.
Definition ProteinIdentification.h:109
void setIntegerDataArrays(const IntegerDataArrays &ida)
Sets the integer meta data arrays.
StringDataArray & getStringDataArrayByName(String name)
Returns a mutable reference to the first string meta data array with the given name.
Definition ProteinIdentification.h:192
FloatDataArray & getFloatDataArrayByName(String name)
Returns a mutable reference to the first float meta data array with the given name.
Definition ProteinIdentification.h:199
const IntegerDataArrays & getIntegerDataArrays() const
Returns a const reference to the integer meta data arrays.
double probability
Probability of this group.
Definition ProteinIdentification.h:122
bool operator<(const ProteinGroup &rhs) const
std::vector< StringDataArray > StringDataArrays
Definition ProteinIdentification.h:116
OpenMS::DataArrays::FloatDataArray FloatDataArray
Float data array vector type.
Definition ProteinIdentification.h:112
const StringDataArray & getStringDataArrayByName(String name) const
Returns a const reference to the first string meta data array with the given name.
Definition ProteinIdentification.h:213
IntegerDataArray & getIntegerDataArrayByName(String name)
Returns a mutable reference to the first integer meta data array with the given name.
Definition ProteinIdentification.h:185
const IntegerDataArray & getIntegerDataArrayByName(String name) const
Returns a const reference to the first integer meta data array with the given name.
Definition ProteinIdentification.h:206
const StringDataArrays & getStringDataArrays() const
Returns a const reference to the string meta data arrays.
const FloatDataArray & getFloatDataArrayByName(String name) const
Returns a const reference to the first float meta data array with the given name.
Definition ProteinIdentification.h:220
std::vector< String > accessions
Accessions of (indistinguishable) proteins that belong to the same group.
Definition ProteinIdentification.h:125
StringDataArrays string_data_arrays_
String data arrays.
Definition ProteinIdentification.h:231
FloatDataArrays & getFloatDataArrays()
Returns a mutable reference to the float meta data arrays.
Definition ProteinIdentification.h:158
IntegerDataArrays integer_data_arrays_
Integer data arrays.
Definition ProteinIdentification.h:234
OpenMS::DataArrays::StringDataArray StringDataArray
String data array vector type.
Definition ProteinIdentification.h:115
IntegerDataArrays & getIntegerDataArrays()
Returns a mutable reference to the integer meta data arrays.
FloatDataArrays float_data_arrays_
Float data arrays.
Definition ProteinIdentification.h:228
void setStringDataArrays(const StringDataArrays &sda)
Sets the string meta data arrays.
const FloatDataArrays & getFloatDataArrays() const
Returns a const reference to the float meta data arrays.
std::vector< FloatDataArray > FloatDataArrays
Definition ProteinIdentification.h:113
OpenMS::DataArrays::IntegerDataArray IntegerDataArray
Integer data array vector type.
Definition ProteinIdentification.h:118
bool operator==(const ProteinGroup &rhs) const
Equality operator.
std::vector< IntegerDataArray > IntegerDataArrays
Definition ProteinIdentification.h:119
void setFloatDataArrays(const FloatDataArrays &fda)
Sets the float meta data arrays.
StringDataArrays & getStringDataArrays()
Returns a mutable reference to the string meta data arrays.
Representation of a protein identification run.
Definition ProteinIdentification.h:54
void setIdentifier(const String &id)
Sets the identifier.
ProteinIdentification(const ProteinIdentification &)=default
Copy constructor.
const String & getIdentifier() const
Returns the identifier.
void insertProteinGroup(const ProteinGroup &group)
Appends a new protein group.
const std::vector< ProteinGroup > & getProteinGroups() const
Returns the protein groups.
void insertHit(const ProteinHit &input)
Appends a protein hit.
const String getInferenceEngineVersion() const
Returns the search engine version.
void setSearchEngine(const String &search_engine)
Sets the search engine type.
void addPrimaryMSRunPath(const String &s, bool raw=false)
const String & getSearchEngine() const
Returns the type of search engine used.
const String getOriginalSearchEngineName() const
Return the type of search engine that was first applied (e.g., before percolator or consensusID) or "...
bool hasInferenceEngineAsSearchEngine() const
Checks if the search engine name matches an inference engine known to OpenMS.
const String & getScoreType() const
Returns the protein score type.
void setHigherScoreBetter(bool higher_is_better)
Sets the orientation of the score (is higher better?)
Size nrPrimaryMSRunPaths(bool raw=false) const
get the number of primary MS runs involve in this ID run
double getSignificanceThreshold() const
Returns the protein significance threshold value.
const String getInferenceEngine() const
Returns the type of search engine used.
std::vector< ProteinGroup > & getProteinGroups()
Returns the protein groups (mutable)
void computeModifications(const PeptideIdentificationList &pep_ids, const StringList &skip_modifications)
Compute the modifications of all ProteinHits given PeptideHits.
void sort()
Sorts the protein hits according to their score.
void insertIndistinguishableProteins(const ProteinGroup &group)
Appends new indistinguishable proteins.
const std::vector< ProteinGroup > & getIndistinguishableProteins() const
Returns the indistinguishable proteins.
String search_engine_
Definition ProteinIdentification.h:484
PeakMassType
Peak mass type.
Definition ProteinIdentification.h:239
@ AVERAGE
Definition ProteinIdentification.h:241
@ MONOISOTOPIC
Definition ProteinIdentification.h:240
ProteinIdentification()
Default constructor.
ProteinIdentification & operator=(ProteinIdentification &&)=default
Move assignment operator.
void setSignificanceThreshold(double value)
Sets the protein significance threshold value.
void fillModMapping_(const PeptideIdentificationList &pep_ids, const StringList &skip_modifications, std::unordered_map< String, std::set< std::pair< Size, ResidueModification > > > &prot2mod) const
std::vector< ProteinHit > protein_hits_
Definition ProteinIdentification.h:494
const SearchParameters & getSearchParameters() const
Returns the search parameters.
std::vector< ProteinGroup > & getIndistinguishableProteins()
Returns the indistinguishable proteins (mutable)
std::vector< ProteinHit > & getHits()
Returns the protein hits (mutable)
void setInferenceEngineVersion(const String &inference_engine_version)
Sets the search engine version.
bool operator!=(const ProteinIdentification &rhs) const
Inequality operator.
std::vector< std::pair< String, String > > getSearchEngineSettingsAsPairs(const String &se="") const
ProteinHit HitType
Hit type definition.
Definition ProteinIdentification.h:57
String search_engine_version_
Definition ProteinIdentification.h:485
void setSearchEngineVersion(const String &search_engine_version)
Sets the search engine version.
void setHits(const std::vector< ProteinHit > &hits)
Sets the protein hits.
void computeCoverage(const ConsensusMap &cmap, bool use_unassigned_ids)
void getPrimaryMSRunPath(StringList &output, bool raw=false) const
double protein_significance_threshold_
Definition ProteinIdentification.h:498
SearchParameters search_parameters_
Definition ProteinIdentification.h:486
void fillIndistinguishableGroupsWithSingletons()
Appends singleton groups (with the current score) for every yet ungrouped protein hit.
void setScoreType(const String &type)
Sets the protein score type.
String protein_score_type_
Definition ProteinIdentification.h:492
static StringList getAllNamesOfPeakMassType()
returns all peak mass type names known to OpenMS
std::vector< ProteinHit >::iterator findHit(const String &accession)
Finds a protein hit by accession (returns past-the-end iterator if not found)
bool higher_score_better_
Definition ProteinIdentification.h:493
void fillEvidenceMapping_(std::unordered_map< String, std::set< PeptideEvidence > > &map_acc_2_evidence, const PeptideIdentificationList &pep_ids) const
void setPrimaryMSRunPath(const StringList &s, bool raw=false)
void computeModifications(const ConsensusMap &cmap, const StringList &skip_modifications, bool use_unassigned_ids)
DateTime date_
Definition ProteinIdentification.h:487
void setInferenceEngine(const String &search_engine)
Sets the inference engine type.
void copyMetaDataOnly(const ProteinIdentification &)
Copies only metadata (no protein hits or protein groups)
const std::vector< ProteinHit > & getHits() const
Returns the protein hits.
bool peptideIDsMergeable(const ProteinIdentification &id_run, const String &experiment_type) const
bool isHigherScoreBetter() const
Returns true if a higher score represents a better score.
void computeCoverage(const PeptideIdentificationList &pep_ids)
Compute the coverage (in percent) of all ProteinHits given PeptideHits.
ProteinIdentification(ProteinIdentification &&)=default
Move constructor.
std::vector< ProteinGroup > indistinguishable_proteins_
Indistinguishable proteins: accessions[0] is "group leader", probability is meaningless.
Definition ProteinIdentification.h:497
const DateTime & getDateTime() const
Returns the date of the protein identification run.
std::vector< ProteinGroup > protein_groups_
Definition ProteinIdentification.h:495
virtual ~ProteinIdentification()
Destructor.
void setDateTime(const DateTime &date)
Sets the date of the protein identification run.
void setSearchParameters(SearchParameters &&search_parameters)
Sets the search parameters (move)
String id_
Definition ProteinIdentification.h:483
bool operator==(const ProteinIdentification &rhs) const
Equality operator.
void insertHit(ProteinHit &&input)
Appends a protein hit.
const String & getSearchEngineVersion() const
Returns the search engine version.
void setPrimaryMSRunPath(const StringList &s, MSExperiment &e)
set the file path to the primary MS run but try to use the mzML annotated in the MSExperiment.
ProteinIdentification & operator=(const ProteinIdentification &)=default
Assignment operator.
void computeCoverageFromEvidenceMapping_(const std::unordered_map< String, std::set< PeptideEvidence > > &map)
void addPrimaryMSRunPath(const StringList &s, bool raw=false)
SearchParameters & getSearchParameters()
Returns the search parameters (mutable)
void setSearchParameters(const SearchParameters &search_parameters)
Sets the search parameters.
A more convenient string class.
Definition String.h:34
unsigned int UInt
Unsigned integer type.
Definition Types.h:64
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition Types.h:97
std::vector< String > StringList
Vector of String.
Definition ListUtils.h:44
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
std::size_t hash_int(T value) noexcept
Hash for an integer type.
Definition HashUtils.h:107
void hash_combine(std::size_t &seed, std::size_t value) noexcept
Combine a hash value with additional data using golden ratio mixing.
Definition HashUtils.h:87
std::size_t hash_float(T value) noexcept
Hash for a floating point type (float or double).
Definition HashUtils.h:142
std::size_t fnv1a_hash_string(const std::string &s) noexcept
FNV-1a hash for a string.
Definition HashUtils.h:70
STL namespace.
two way mapping from ms-run-path to protID|pepID-identifier
Definition ProteinIdentification.h:61
void create(const std::vector< ProteinIdentification > &prot_ids)
Definition ProteinIdentification.h:72
std::map< StringList, String > runpath_to_identifier
Definition ProteinIdentification.h:63
Mapping(const std::vector< ProteinIdentification > &prot_ids)
Definition ProteinIdentification.h:67
String getPrimaryMSRunPath(const PeptideIdentification &pepid) const
Definition ProteinIdentification.h:96
std::map< String, StringList > identifier_to_msrunpath
Definition ProteinIdentification.h:62
Search parameters of the DB search.
Definition ProteinIdentification.h:254
String db_version
The database version.
Definition ProteinIdentification.h:256
bool operator!=(const SearchParameters &rhs) const
bool fragment_mass_tolerance_ppm
Mass tolerance unit of fragment ions (true: ppm, false: Dalton)
Definition ProteinIdentification.h:264
SearchParameters & operator=(SearchParameters &&) &=default
Move assignment operator.
EnzymaticDigestion::Specificity enzyme_term_specificity
The number of required cutting-rule matching termini during search (none=0, semi=1,...
Definition ProteinIdentification.h:268
String taxonomy
The taxonomy restriction.
Definition ProteinIdentification.h:257
std::vector< String > fixed_modifications
Used fixed modifications.
Definition ProteinIdentification.h:260
SearchParameters(const SearchParameters &)=default
Copy constructor.
String charges
The allowed charges for the search.
Definition ProteinIdentification.h:258
Protease digestion_enzyme
The cleavage site information in details (from ProteaseDB)
Definition ProteinIdentification.h:267
bool operator==(const SearchParameters &rhs) const
SearchParameters & operator=(const SearchParameters &)=default
Assignment operator.
bool mergeable(const ProteinIdentification::SearchParameters &sp, const String &experiment_type) const
double fragment_mass_tolerance
Mass tolerance of fragment ions (Dalton or ppm)
Definition ProteinIdentification.h:263
bool precursor_mass_tolerance_ppm
Mass tolerance unit of precursor ions (true: ppm, false: Dalton)
Definition ProteinIdentification.h:266
SearchParameters(SearchParameters &&)=default
Move constructor.
double precursor_mass_tolerance
Mass tolerance of precursor ions (Dalton or ppm)
Definition ProteinIdentification.h:265
std::pair< int, int > getChargeRange() const
returns the charge range from the search engine settings as a pair of ints
std::vector< String > variable_modifications
Allowed variable modifications.
Definition ProteinIdentification.h:261
PeakMassType mass_type
Mass type of the peaks.
Definition ProteinIdentification.h:259
String db
The used database.
Definition ProteinIdentification.h:255
int getChargeValue_(String &charge_str) const
UInt missed_cleavages
The number of allowed missed cleavages.
Definition ProteinIdentification.h:262
std::size_t operator()(const OpenMS::ProteinIdentification &pi) const noexcept
Definition ProteinIdentification.h:570
std::size_t operator()(const OpenMS::ProteinIdentification::ProteinGroup &pg) const noexcept
Definition ProteinIdentification.h:520
std::size_t operator()(const OpenMS::ProteinIdentification::SearchParameters &sp) const noexcept
Definition ProteinIdentification.h:535