OpenMS  2.6.0
IdentificationData.h
Go to the documentation of this file.
1 // --------------------------------------------------------------------------
2 // OpenMS -- Open-Source Mass Spectrometry
3 // --------------------------------------------------------------------------
4 // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
5 // ETH Zurich, and Freie Universitaet Berlin 2002-2020.
6 //
7 // This software is released under a three-clause BSD license:
8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above copyright
11 // notice, this list of conditions and the following disclaimer in the
12 // documentation and/or other materials provided with the distribution.
13 // * Neither the name of any author or any participating institution
14 // may be used to endorse or promote products derived from this software
15 // without specific prior written permission.
16 // For a full list of authors, refer to the file AUTHORS.
17 // --------------------------------------------------------------------------
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 // ARE DISCLAIMED. IN NO EVENT SHALL ANY OF THE AUTHORS OR THE CONTRIBUTING
22 // INSTITUTIONS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
25 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
27 // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
28 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 //
30 // --------------------------------------------------------------------------
31 // $Maintainer: Hendrik Weisser $
32 // $Authors: Hendrik Weisser $
33 // --------------------------------------------------------------------------
34 
35 #pragma once
36 
49 #include <OpenMS/FORMAT/MzTab.h>
50 
51 #include <boost/unordered_set.hpp>
52 
53 namespace OpenMS
54 {
89  class OPENMS_DLLAPI IdentificationData: public MetaInfoInterface
90  {
91  public:
92 
93  // type definitions:
96 
99 
100  using DataProcessingSoftware =
104  using ProcessingSoftwareRef =
106 
110 
115 
119 
120  using AppliedProcessingStep =
122  using AppliedProcessingSteps =
124 
128 
132 
135 
138  using IdentifiedPeptideRef =
140 
143  using IdentifiedCompoundRef =
145 
149 
151  using IdentifiedMoleculeRef =
153 
155  using MoleculeQueryMatches =
158 
159  // @TODO: allow multiple sets of groups, like with parent molecules
160  // ("ParentMoleculeGroupings")?
164 
166  using ParentMoleculeGroups =
169  using ParentMoleculeGrouping =
173 
174  using AddressLookup = boost::unordered_set<uintptr_t>;
175 
176 
179  current_step_ref_(processing_steps_.end())
180  {
181  }
182  // Copy constructor - not allowed, as references would be invalidated:
183  // @TODO: implement using deep copy
184  IdentificationData(const IdentificationData& other) = delete;
185 
188  input_files_(std::move(other.input_files_)),
189  processing_softwares_(std::move(other.processing_softwares_)),
190  processing_steps_(std::move(other.processing_steps_)),
191  db_search_params_(std::move(other.db_search_params_)),
192  db_search_steps_(std::move(other.db_search_steps_)),
193  score_types_(std::move(other.score_types_)),
194  data_queries_(std::move(other.data_queries_)),
195  parent_molecules_(std::move(other.parent_molecules_)),
196  parent_molecule_groupings_(std::move(other.parent_molecule_groupings_)),
197  identified_peptides_(std::move(other.identified_peptides_)),
198  identified_compounds_(std::move(other.identified_compounds_)),
199  identified_oligos_(std::move(other.identified_oligos_)),
200  query_matches_(std::move(other.query_matches_)),
201  query_match_groups_(std::move(other.query_match_groups_)),
202  current_step_ref_(std::move(other.current_step_ref_)),
203  // look-up tables:
204  data_query_lookup_(std::move(other.data_query_lookup_)),
205  parent_molecule_lookup_(std::move(other.parent_molecule_lookup_)),
206  identified_peptide_lookup_(std::move(other.identified_peptide_lookup_)),
207  identified_compound_lookup_(std::move(other.identified_compound_lookup_)),
208  identified_oligo_lookup_(std::move(other.identified_oligo_lookup_)),
209  query_match_lookup_(std::move(other.query_match_lookup_))
210  {
211  }
212 
217  InputFileRef registerInputFile(const String& file);
218 
223  ProcessingSoftwareRef registerDataProcessingSoftware(
224  const DataProcessingSoftware& software);
225 
230  SearchParamRef registerDBSearchParam(const DBSearchParam& param);
231 
236  ProcessingStepRef registerDataProcessingStep(const DataProcessingStep&
237  step);
238 
243  ProcessingStepRef registerDataProcessingStep(
244  const DataProcessingStep& step, SearchParamRef search_ref);
245 
250  ScoreTypeRef registerScoreType(const ScoreType& score);
251 
256  DataQueryRef registerDataQuery(const DataQuery& query);
257 
262  ParentMoleculeRef registerParentMolecule(const ParentMolecule& parent);
263 
265  void registerParentMoleculeGrouping(const ParentMoleculeGrouping& grouping);
266 
271  IdentifiedPeptideRef registerIdentifiedPeptide(const IdentifiedPeptide&
272  peptide);
273 
278  IdentifiedCompoundRef registerIdentifiedCompound(const IdentifiedCompound&
279  compound);
280 
285  IdentifiedOligoRef registerIdentifiedOligo(const IdentifiedOligo& oligo);
286 
291  QueryMatchRef registerMoleculeQueryMatch(const MoleculeQueryMatch& match);
292 
297  MatchGroupRef registerQueryMatchGroup(const QueryMatchGroup& group);
298 
300  const InputFiles& getInputFiles() const
301  {
302  return input_files_;
303  }
304 
307  {
308  return processing_softwares_;
309  }
310 
313  {
314  return processing_steps_;
315  }
316 
319  {
320  return db_search_params_;
321  }
322 
325  {
326  return db_search_steps_;
327  }
328 
330  const ScoreTypes& getScoreTypes() const
331  {
332  return score_types_;
333  }
334 
337  {
338  return data_queries_;
339  }
340 
343  {
344  return parent_molecules_;
345  }
346 
349  {
350  return parent_molecule_groupings_;
351  }
352 
355  {
356  return identified_peptides_;
357  }
358 
361  {
362  return identified_compounds_;
363  }
364 
367  {
368  return identified_oligos_;
369  }
370 
373  {
374  return query_matches_;
375  }
376 
379  {
380  return query_match_groups_;
381  }
382 
384  void addScore(QueryMatchRef match_ref, ScoreTypeRef score_ref,
385  double value);
386 
395  void setCurrentProcessingStep(ProcessingStepRef step_ref);
396 
402  ProcessingStepRef getCurrentProcessingStep();
403 
405  void clearCurrentProcessingStep();
406 
408  // @TODO: this currently doesn't take molecule type into account - should it?
409  std::vector<QueryMatchRef> getBestMatchPerQuery(ScoreTypeRef
410  score_ref) const;
411 
416  std::pair<ScoreTypeRef, bool> findScoreType(const String& score_name) const;
417 
419  void calculateCoverages(bool check_molecule_length = false);
420 
432  void cleanup(bool require_query_match = true,
433  bool require_identified_sequence = true,
434  bool require_parent_match = true,
435  bool require_parent_group = false,
436  bool require_match_group = false);
437 
439  static bool isBetterScore(double first, double second, bool higher_better)
440  {
441  if (higher_better) return first > second;
442  return first < second;
443  }
444 
445  protected:
446 
447  // containers:
452  // @TODO: store SearchParamRef inside ProcessingStep? (may not be required
453  // for many processing steps)
464 
467 
468  // look-up tables for fast checking of reference validity:
471  // @TODO: just use one "identified_molecule_lookup_" for all molecule types?
476 
478  void checkScoreTypes_(const std::map<ScoreTypeRef, double>& scores) const;
479 
481  void checkAppliedProcessingSteps_(const AppliedProcessingSteps&
482  steps_and_scores) const;
483 
485  void checkParentMatches_(const ParentMatches& matches,
486  MoleculeType expected_type) const;
487 
493  template <typename ElementType>
495  {
497  step_ref(step_ref)
498  {
499  }
500 
501  void operator()(ElementType& element)
502  {
503  element.addProcessingStep(step_ref);
504  }
505 
507  };
508 
514  template <typename ElementType>
516  {
517  ModifyMultiIndexAddScore(ScoreTypeRef score_type_ref, double value):
518  score_type_ref(score_type_ref), value(value)
519  {
520  }
521 
522  void operator()(ElementType& element)
523  {
524  if (element.steps_and_scores.empty())
525  {
526  element.addScore(score_type_ref, value);
527  }
528  else // add score to most recent step
529  {
530  element.addScore(score_type_ref, value,
531  element.steps_and_scores.back().processing_step_opt);
532  }
533  }
534 
536  double value;
537  };
538 
544  template <typename ElementType>
546  {
548  lookup(lookup)
549  {
550  }
551 
552  void operator()(ElementType& element)
553  {
554  removeFromSetIf_(element.parent_matches,
555  [&](const ParentMatches::iterator it)
556  {
557  return !lookup.count(it->first);
558  });
559  }
560 
562  };
563 
564 
566  template <typename ContainerType, typename ElementType>
567  typename ContainerType::iterator insertIntoMultiIndex_(
568  ContainerType& container, const ElementType& element)
569  {
570  checkAppliedProcessingSteps_(element.steps_and_scores);
571 
572  auto result = container.insert(element);
573  if (!result.second) // existing element - merge in new information
574  {
575  container.modify(result.first, [&element](ElementType& existing)
576  {
577  existing += element;
578  });
579  }
580 
581  // add current processing step (if necessary):
582  if (current_step_ref_ != processing_steps_.end())
583  {
585  modifier(current_step_ref_);
586  container.modify(result.first, modifier);
587  }
588 
589  return result.first;
590  }
591 
593  template <typename ContainerType, typename ElementType>
594  typename ContainerType::iterator insertIntoMultiIndex_(
595  ContainerType& container, const ElementType& element,
596  AddressLookup& lookup)
597  {
598  typename ContainerType::iterator ref =
599  insertIntoMultiIndex_(container, element);
600  lookup.insert(uintptr_t(&(*ref)));
601  return ref;
602  }
603 
605  template <typename RefType, typename ContainerType>
606  static bool isValidReference_(RefType ref, ContainerType& container)
607  {
608  for (auto it = container.begin(); it != container.end(); ++it)
609  {
610  if (ref == it) return true;
611  }
612  return false;
613  }
614 
616  template <typename RefType>
618  RefType ref, const AddressLookup& lookup)
619  {
620  return lookup.count(ref);
621  }
622 
624  template <typename ContainerType, typename PredicateType>
625  // static void removeFromSetIf_(ContainerType& container, std::function<bool(RefType)> predicate)
626  static void removeFromSetIf_(ContainerType& container, PredicateType predicate)
627  {
628  for (auto it = container.begin(); it != container.end(); )
629  {
630  if (predicate(it))
631  {
632  it = container.erase(it);
633  }
634  else
635  {
636  ++it;
637  }
638  }
639  }
640 
642  template <typename ContainerType>
644  ContainerType& container, const AddressLookup& lookup)
645  {
646  removeFromSetIf_(container, [&lookup](typename ContainerType::iterator it)
647  {
648  return !lookup.count(uintptr_t(&(*it)));
649  });
650  }
651 
653  template <typename ContainerType>
654  static void updateAddressLookup_(const ContainerType& container,
655  AddressLookup& lookup)
656  {
657  lookup.clear();
658  lookup.reserve(container.size());
659  for (const auto& element : container)
660  {
661  lookup.insert(uintptr_t(&element));
662  }
663  }
664 
665 
666  // IDFilter needs access to do its job:
667  friend class IDFilter;
668  };
669 }
OpenMS::IdentificationData::query_matches_
MoleculeQueryMatches query_matches_
Definition: IdentificationData.h:462
OpenMS::IdentificationData::parent_molecule_lookup_
AddressLookup parent_molecule_lookup_
Definition: IdentificationData.h:470
OpenMS::IdentificationData::ParentMoleculeGroupings
IdentificationDataInternal::ParentMoleculeGroupings ParentMoleculeGroupings
Definition: IdentificationData.h:172
OpenMS::IdentificationDataInternal::IdentifiedOligo
IdentifiedSequence< NASequence > IdentifiedOligo
Definition: IdentifiedSequence.h:107
OpenMS::IdentificationDataInternal::MoleculeType
MoleculeType
Definition: MetaData.h:63
OpenMS::IdentificationDataInternal::MassType
MassType
Definition: MetaData.h:72
OpenMS::IdentificationDataInternal::ProcessingStepRef
IteratorWrapper< DataProcessingSteps::iterator > ProcessingStepRef
Definition: DataProcessingStep.h:93
OpenMS::IdentificationData::db_search_steps_
DBSearchSteps db_search_steps_
Definition: IdentificationData.h:454
OpenMS::IdentificationData::current_step_ref_
ProcessingStepRef current_step_ref_
Reference to the current data processing step (see setCurrentProcessingStep())
Definition: IdentificationData.h:466
OpenMS::IdentificationData::QueryMatchGroups
IdentificationDataInternal::QueryMatchGroups QueryMatchGroups
Definition: IdentificationData.h:162
OpenMS::IdentificationDataInternal::IdentifiedPeptide
IdentifiedSequence< AASequence > IdentifiedPeptide
Definition: IdentifiedSequence.h:106
OpenMS::IdentificationData::IdentifiedPeptides
IdentificationDataInternal::IdentifiedPeptides IdentifiedPeptides
Definition: IdentificationData.h:137
OpenMS::IdentificationDataInternal::ParentMoleculeRef
IteratorWrapper< ParentMolecules::iterator > ParentMoleculeRef
Definition: ParentMolecule.h:100
OpenMS::IdentificationData::AppliedProcessingSteps
IdentificationDataInternal::AppliedProcessingSteps AppliedProcessingSteps
Definition: IdentificationData.h:123
OpenMS::IdentificationData::isValidReference_
static bool isValidReference_(RefType ref, ContainerType &container)
Check whether a reference points to an element in a container.
Definition: IdentificationData.h:606
OpenMS::IdentificationDataInternal::ParentMoleculeGroups
boost::multi_index_container< ParentMoleculeGroup, boost::multi_index::indexed_by< boost::multi_index::ordered_unique< boost::multi_index::member< ParentMoleculeGroup, std::set< ParentMoleculeRef >, &ParentMoleculeGroup::parent_molecule_refs > > > > ParentMoleculeGroups
Definition: ParentMoleculeGroup.h:64
OpenMS::IdentificationDataInternal::ProcessingSoftwareRef
IteratorWrapper< DataProcessingSoftwares::iterator > ProcessingSoftwareRef
Definition: DataProcessingSoftware.h:69
OpenMS::IdentificationData::data_query_lookup_
AddressLookup data_query_lookup_
Definition: IdentificationData.h:469
OpenMS::IdentificationData::query_match_lookup_
AddressLookup query_match_lookup_
Definition: IdentificationData.h:475
OpenMS::IdentificationData::data_queries_
DataQueries data_queries_
Definition: IdentificationData.h:456
OpenMS::IdentificationData::getParentMolecules
const ParentMolecules & getParentMolecules() const
Return the registered parent molecules (immutable)
Definition: IdentificationData.h:342
MetaData.h
OpenMS::IdentificationDataInternal::ParentMolecules
boost::multi_index_container< ParentMolecule, boost::multi_index::indexed_by< boost::multi_index::ordered_unique< boost::multi_index::member< ParentMolecule, String, &ParentMolecule::accession > > > > ParentMolecules
Definition: ParentMolecule.h:99
OpenMS::String
A more convenient string class.
Definition: String.h:59
OpenMS::IdentificationData::ParentMolecules
IdentificationDataInternal::ParentMolecules ParentMolecules
Definition: IdentificationData.h:130
ParentMoleculeGroup.h
OpenMS::IdentificationDataInternal::DBSearchParams
std::set< DBSearchParam > DBSearchParams
Definition: DBSearchParam.h:126
OpenMS::IdentificationData::ModifyMultiIndexAddProcessingStep
Helper functor for adding processing steps to elements in a boost::multi_index_container structure.
Definition: IdentificationData.h:494
OpenMS::IdentificationDataInternal::IdentifiedOligos
boost::multi_index_container< IdentifiedOligo, boost::multi_index::indexed_by< boost::multi_index::ordered_unique< boost::multi_index::member< IdentifiedOligo, NASequence, &IdentifiedOligo::sequence > > > > IdentifiedOligos
Definition: IdentifiedSequence.h:124
OpenMS::IdentificationData::insertIntoMultiIndex_
ContainerType::iterator insertIntoMultiIndex_(ContainerType &container, const ElementType &element)
Helper function for adding entries (derived from ScoredProcessingResult) to a boost::multi_index_cont...
Definition: IdentificationData.h:567
OpenMS::IdentificationData::ModifyMultiIndexAddScore::score_type_ref
ScoreTypeRef score_type_ref
Definition: IdentificationData.h:535
OpenMS::IdentificationData::identified_oligo_lookup_
AddressLookup identified_oligo_lookup_
Definition: IdentificationData.h:474
OpenMS::IdentificationData::getMoleculeQueryMatches
const MoleculeQueryMatches & getMoleculeQueryMatches() const
Return the registered molecule-query matches (immutable)
Definition: IdentificationData.h:372
OpenMS::IdentificationDataInternal::ParentGroupRef
IteratorWrapper< ParentMoleculeGroups::iterator > ParentGroupRef
Definition: ParentMoleculeGroup.h:65
OpenMS::IdentificationData::DBSearchParams
IdentificationDataInternal::DBSearchParams DBSearchParams
Definition: IdentificationData.h:112
OpenMS::IdentificationData::ModifyMultiIndexRemoveParentMatches::lookup
const AddressLookup & lookup
Definition: IdentificationData.h:561
ScoreType.h
OpenMS::IdentificationData::ModifyMultiIndexAddProcessingStep::ModifyMultiIndexAddProcessingStep
ModifyMultiIndexAddProcessingStep(ProcessingStepRef step_ref)
Definition: IdentificationData.h:496
OpenMS::IdentificationData::getParentMoleculeGroupings
const ParentMoleculeGroupings & getParentMoleculeGroupings() const
Return the registered parent molecule groupings (immutable)
Definition: IdentificationData.h:348
OpenMS::IdentificationDataInternal::ScoreType
Information about a score type.
Definition: ScoreType.h:45
OpenMS::IdentificationData::getInputFiles
const InputFiles & getInputFiles() const
Return the registered input files (immutable)
Definition: IdentificationData.h:300
OpenMS::IdentificationDataInternal::DataProcessingSoftware
Information about software used for data processing.
Definition: DataProcessingSoftware.h:49
OpenMS::IdentificationData::removeFromSetIfNotHashed_
static void removeFromSetIfNotHashed_(ContainerType &container, const AddressLookup &lookup)
Remove elements from a set (or ordered multi_index_container) if they don't occur in a look-up table.
Definition: IdentificationData.h:643
OpenMS::IdentificationData::PeakAnnotations
IdentificationDataInternal::PeakAnnotations PeakAnnotations
Definition: IdentificationData.h:150
OpenMS::IdentificationData::InputFiles
IdentificationDataInternal::InputFiles InputFiles
Definition: IdentificationData.h:97
OpenMS::IdentificationDataInternal::DataProcessingSteps
std::set< DataProcessingStep > DataProcessingSteps
Definition: DataProcessingStep.h:92
OpenMS::IdentificationData::MoleculeQueryMatches
IdentificationDataInternal::MoleculeQueryMatches MoleculeQueryMatches
Definition: IdentificationData.h:156
OpenMS::IdentificationDataInternal::DBSearchParam
Parameters specific to a database search step.
Definition: DBSearchParam.h:47
OpenMS::IdentificationDataInternal::QueryMatchRef
IteratorWrapper< MoleculeQueryMatches::iterator > QueryMatchRef
Definition: MoleculeQueryMatch.h:164
OpenMS::IdentificationData::identified_compounds_
IdentifiedCompounds identified_compounds_
Definition: IdentificationData.h:460
OpenMS::IdentificationData::ModifyMultiIndexAddScore::value
double value
Definition: IdentificationData.h:536
OpenMS::IdentificationData::score_types_
ScoreTypes score_types_
Definition: IdentificationData.h:455
IdentifiedSequence.h
OpenMS::IdentificationData::ModifyMultiIndexAddProcessingStep::operator()
void operator()(ElementType &element)
Definition: IdentificationData.h:501
OpenMS::IdentificationData::ModifyMultiIndexRemoveParentMatches::ModifyMultiIndexRemoveParentMatches
ModifyMultiIndexRemoveParentMatches(const AddressLookup &lookup)
Definition: IdentificationData.h:547
OpenMS::IdentificationData::IdentificationData
IdentificationData(IdentificationData &&other)
Move constructor.
Definition: IdentificationData.h:187
OpenMS
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
OpenMS::IdentificationDataInternal::SearchParamRef
IteratorWrapper< DBSearchParams::iterator > SearchParamRef
Definition: DBSearchParam.h:127
OpenMS::IdentificationData::getDBSearchParams
const DBSearchParams & getDBSearchParams() const
Return the registered database search parameters (immutable)
Definition: IdentificationData.h:318
OpenMS::IdentificationData::updateAddressLookup_
static void updateAddressLookup_(const ContainerType &container, AddressLookup &lookup)
Recreate the address look-up table for a container.
Definition: IdentificationData.h:654
OpenMS::IdentificationDataInternal::PeakAnnotations
std::vector< PeptideHit::PeakAnnotation > PeakAnnotations
Definition: MoleculeQueryMatch.h:52
OpenMS::IdentificationDataInternal::QueryMatchGroups
boost::multi_index_container< QueryMatchGroup, boost::multi_index::indexed_by< boost::multi_index::ordered_unique< boost::multi_index::member< QueryMatchGroup, std::set< QueryMatchRef >, &QueryMatchGroup::query_match_refs > > > > QueryMatchGroups
Definition: QueryMatchGroup.h:99
OpenMS::IdentificationDataInternal::IdentifiedOligoRef
IteratorWrapper< IdentifiedOligos::iterator > IdentifiedOligoRef
Definition: IdentifiedSequence.h:125
OpenMS::IdentificationData::ModifyMultiIndexAddScore::ModifyMultiIndexAddScore
ModifyMultiIndexAddScore(ScoreTypeRef score_type_ref, double value)
Definition: IdentificationData.h:517
OpenMS::IdentificationDataInternal::DBSearchSteps
std::map< ProcessingStepRef, SearchParamRef > DBSearchSteps
Definition: DBSearchParam.h:128
OpenMS::IdentificationData::parent_molecules_
ParentMolecules parent_molecules_
Definition: IdentificationData.h:457
OpenMS::IdentificationData::processing_softwares_
DataProcessingSoftwares processing_softwares_
Definition: IdentificationData.h:449
OpenMS::IdentificationDataInternal::DataProcessingSoftwares
std::set< DataProcessingSoftware > DataProcessingSoftwares
Definition: DataProcessingSoftware.h:68
OpenMS::IdentificationDataInternal::ParentMoleculeGroupings
std::vector< ParentMoleculeGrouping > ParentMoleculeGroupings
Definition: ParentMoleculeGroup.h:75
DataProcessingStep.h
OpenMS::IdentificationData::input_files_
InputFiles input_files_
Definition: IdentificationData.h:448
OpenMS::IdentificationData::ModifyMultiIndexAddScore
Helper functor for adding scores to elements in a boost::multi_index_container structure.
Definition: IdentificationData.h:515
OpenMS::IdentificationData::removeFromSetIf_
static void removeFromSetIf_(ContainerType &container, PredicateType predicate)
Remove elements from a set (or ordered multi_index_container) if they fulfill a predicate.
Definition: IdentificationData.h:626
OpenMS::MetaInfoInterface
Interface for classes that can store arbitrary meta information (Type-Name-Value tuples).
Definition: MetaInfoInterface.h:60
OpenMS::IdentificationDataInternal::ParentMoleculeGroup
: Group of ambiguously identified parent molecules (e.g. protein group)
Definition: ParentMoleculeGroup.h:50
OpenMS::IdentificationData::ParentMatches
IdentificationDataInternal::ParentMatches ParentMatches
Definition: IdentificationData.h:134
OpenMS::IdentificationData::identified_peptides_
IdentifiedPeptides identified_peptides_
Definition: IdentificationData.h:459
QueryMatchGroup.h
OpenMS::IdentificationData::getDataQueries
const DataQueries & getDataQueries() const
Return the registered data queries (immutable)
Definition: IdentificationData.h:336
OpenMS::IDFilter
Collection of functions for filtering peptide and protein identifications.
Definition: IDFilter.h:77
OpenMS::IdentificationDataInternal::IteratorWrapper
Wrapper that adds operator< to iterators, so they can be used as (part of) keys in maps/sets or multi...
Definition: MetaData.h:43
OpenMS::IdentificationData::ParentMoleculeGroups
IdentificationDataInternal::ParentMoleculeGroups ParentMoleculeGroups
Definition: IdentificationData.h:167
OpenMS::IdentificationData::parent_molecule_groupings_
ParentMoleculeGroupings parent_molecule_groupings_
Definition: IdentificationData.h:458
OpenMS::IdentificationDataInternal::DataQuery
Search query, e.g. spectrum or feature.
Definition: DataQuery.h:47
OpenMS::IdentificationData::identified_oligos_
IdentifiedOligos identified_oligos_
Definition: IdentificationData.h:461
OpenMS::IdentificationDataInternal::InputFiles
std::set< String > InputFiles
Definition: MetaData.h:79
OpenMS::IdentificationData::getIdentifiedCompounds
const IdentifiedCompounds & getIdentifiedCompounds() const
Return the registered compounds (immutable)
Definition: IdentificationData.h:360
OpenMS::IdentificationData::DataProcessingSoftwares
IdentificationDataInternal::DataProcessingSoftwares DataProcessingSoftwares
Definition: IdentificationData.h:103
OpenMS::IdentificationData::IdentifiedOligos
IdentificationDataInternal::IdentifiedOligos IdentifiedOligos
Definition: IdentificationData.h:147
OpenMS::IdentificationData::insertIntoMultiIndex_
ContainerType::iterator insertIntoMultiIndex_(ContainerType &container, const ElementType &element, AddressLookup &lookup)
Variant of insertIntoMultiIndex_() that also updates a look-up table of valid references (addresses)
Definition: IdentificationData.h:594
OpenMS::IdentificationDataInternal::MoleculeQueryMatch
Meta data for a search hit (e.g. peptide-spectrum match).
Definition: MoleculeQueryMatch.h:61
OpenMS::IdentificationDataInternal::IdentifiedMoleculeRef
boost::variant< IdentifiedPeptideRef, IdentifiedCompoundRef, IdentifiedOligoRef > IdentifiedMoleculeRef
Definition: MoleculeQueryMatch.h:57
OpenMS::IdentificationDataInternal::MoleculeQueryMatches
boost::multi_index_container< MoleculeQueryMatch, boost::multi_index::indexed_by< boost::multi_index::ordered_unique< boost::multi_index::composite_key< MoleculeQueryMatch, boost::multi_index::member< MoleculeQueryMatch, DataQueryRef, &MoleculeQueryMatch::data_query_ref >, boost::multi_index::member< MoleculeQueryMatch, IdentifiedMoleculeRef, &MoleculeQueryMatch::identified_molecule_ref > > > > > MoleculeQueryMatches
Definition: MoleculeQueryMatch.h:163
OpenMS::IdentificationData::getDataProcessingSteps
const DataProcessingSteps & getDataProcessingSteps() const
Return the registered data processing steps (immutable)
Definition: IdentificationData.h:312
MzTab.h
OpenMS::IdentificationData::getDataProcessingSoftwares
const DataProcessingSoftwares & getDataProcessingSoftwares() const
Return the registered data processing software (immutable)
Definition: IdentificationData.h:306
OpenMS::IdentificationData::getDBSearchSteps
const DBSearchSteps & getDBSearchSteps() const
Return the registered database search steps (immutable)
Definition: IdentificationData.h:324
OpenMS::IdentificationData::processing_steps_
DataProcessingSteps processing_steps_
Definition: IdentificationData.h:450
OpenMS::IdentificationDataInternal::ParentMolecule
Representation of a parent molecule that is identified only indirectly (e.g. a protein).
Definition: ParentMolecule.h:49
OpenMS::IdentificationData::DataProcessingSteps
IdentificationDataInternal::DataProcessingSteps DataProcessingSteps
Definition: IdentificationData.h:108
MoleculeParentMatch.h
OpenMS::IdentificationData::ModifyMultiIndexAddProcessingStep::step_ref
ProcessingStepRef step_ref
Definition: IdentificationData.h:506
OpenMS::IdentificationData::IdentifiedCompounds
IdentificationDataInternal::IdentifiedCompounds IdentifiedCompounds
Definition: IdentificationData.h:142
OpenMS::IdentificationDataInternal::AppliedProcessingStep
A processing step that was applied to a data item, possibly with associated scores.
Definition: AppliedProcessingStep.h:52
OpenMS::IdentificationData::getScoreTypes
const ScoreTypes & getScoreTypes() const
Return the registered score types (immutable)
Definition: IdentificationData.h:330
OpenMS::IdentificationData::db_search_params_
DBSearchParams db_search_params_
Definition: IdentificationData.h:451
OpenMS::IdentificationData::getQueryMatchGroups
const QueryMatchGroups & getQueryMatchGroups() const
Return the registered groups of molecule-query matches (immutable)
Definition: IdentificationData.h:378
OpenMS::IdentificationData::query_match_groups_
QueryMatchGroups query_match_groups_
Definition: IdentificationData.h:463
OpenMS::IdentificationDataInternal::InputFileRef
IteratorWrapper< InputFiles::iterator > InputFileRef
Definition: MetaData.h:80
OpenMS::IdentificationDataInternal::AppliedProcessingSteps
boost::multi_index_container< AppliedProcessingStep, boost::multi_index::indexed_by< boost::multi_index::sequenced<>, boost::multi_index::ordered_unique< boost::multi_index::member< AppliedProcessingStep, boost::optional< ProcessingStepRef >, &AppliedProcessingStep::processing_step_opt > > > > AppliedProcessingSteps
Definition: AppliedProcessingStep.h:116
OpenMS::IdentificationDataInternal::ParentMatches
std::map< ParentMoleculeRef, std::set< MoleculeParentMatch > > ParentMatches
mapping: parent molecule -> match information
Definition: MoleculeParentMatch.h:101
OpenMS::IdentificationData
Representation of spectrum identification results and associated data.
Definition: IdentificationData.h:89
OpenMS::IdentificationData::identified_peptide_lookup_
AddressLookup identified_peptide_lookup_
Definition: IdentificationData.h:472
IdentifiedCompound.h
OpenMS::IdentificationData::ModifyMultiIndexRemoveParentMatches
Helper functor for removing invalid parent matches from elements in a boost::multi_index_container st...
Definition: IdentificationData.h:545
OpenMS::IdentificationData::IdentificationData
IdentificationData()
Default constructor.
Definition: IdentificationData.h:178
OpenMS::IdentificationData::ModifyMultiIndexAddScore::operator()
void operator()(ElementType &element)
Definition: IdentificationData.h:522
OpenMS::IdentificationDataInternal::IdentifiedSequence
Identified sequence (peptide or oligonucleotide)
Definition: IdentifiedSequence.h:52
ParentMolecule.h
OpenMS::IdentificationDataInternal::ScoreTypes
std::set< ScoreType > ScoreTypes
Definition: ScoreType.h:85
OpenMS::IdentificationData::AddressLookup
boost::unordered_set< uintptr_t > AddressLookup
Definition: IdentificationData.h:174
OpenMS::IdentificationData::ModifyMultiIndexRemoveParentMatches::operator()
void operator()(ElementType &element)
Definition: IdentificationData.h:552
OpenMS::IdentificationData::getIdentifiedOligos
const IdentifiedOligos & getIdentifiedOligos() const
Return the registered identified oligonucleotides (immutable)
Definition: IdentificationData.h:366
OpenMS::IdentificationData::IdentifiedMoleculeRef
IdentificationDataInternal::IdentifiedMoleculeRef IdentifiedMoleculeRef
Definition: IdentificationData.h:152
OpenMS::IdentificationDataInternal::MoleculeParentMatch
Meta data for the association between an identified molecule (e.g. peptide) and a parent molecule (e....
Definition: MoleculeParentMatch.h:45
OpenMS::IdentificationData::identified_compound_lookup_
AddressLookup identified_compound_lookup_
Definition: IdentificationData.h:473
OpenMS::IdentificationDataInternal::DataProcessingStep
Data processing step that is applied to the data (e.g. database search, PEP calculation,...
Definition: DataProcessingStep.h:46
MoleculeQueryMatch.h
OpenMS::IdentificationDataInternal::DataQueryRef
IteratorWrapper< DataQueries::iterator > DataQueryRef
Definition: DataQuery.h:90
OpenMS::IdentificationData::isBetterScore
static bool isBetterScore(double first, double second, bool higher_better)
Helper function to compare two scores.
Definition: IdentificationData.h:439
OpenMS::IdentificationDataInternal::ParentMoleculeGrouping
Set of groups of ambiguously identified parent molecules (e.g. results of running a protein inference...
Definition: ParentMoleculeGroup.h:69
OpenMS::IdentificationDataInternal::IdentifiedPeptides
boost::multi_index_container< IdentifiedPeptide, boost::multi_index::indexed_by< boost::multi_index::ordered_unique< boost::multi_index::member< IdentifiedPeptide, AASequence, &IdentifiedPeptide::sequence > > > > IdentifiedPeptides
Definition: IdentifiedSequence.h:115
OpenMS::IdentificationDataInternal::DataQueries
std::set< DataQuery > DataQueries
Definition: DataQuery.h:89
OpenMS::IdentificationData::isValidHashedReference_
static bool isValidHashedReference_(RefType ref, const AddressLookup &lookup)
Check validity of a reference based on a look-up table of addresses.
Definition: IdentificationData.h:617
OpenMS::IdentificationDataInternal::MatchGroupRef
IteratorWrapper< QueryMatchGroups::iterator > MatchGroupRef
Definition: QueryMatchGroup.h:100
OpenMS::IdentificationData::getIdentifiedPeptides
const IdentifiedPeptides & getIdentifiedPeptides() const
Return the registered identified peptides (immutable)
Definition: IdentificationData.h:354
OpenMS::IdentificationData::DataQueries
IdentificationDataInternal::DataQueries DataQueries
Definition: IdentificationData.h:126
DataQuery.h
OpenMS::IdentificationDataInternal::IdentifiedCompounds
boost::multi_index_container< IdentifiedCompound, boost::multi_index::indexed_by< boost::multi_index::ordered_unique< boost::multi_index::member< IdentifiedCompound, String, &IdentifiedCompound::identifier > > > > IdentifiedCompounds
Definition: IdentifiedCompound.h:79
OpenMS::IdentificationDataInternal::IdentifiedCompound
Definition: IdentifiedCompound.h:47
OpenMS::IdentificationData::DBSearchSteps
IdentificationDataInternal::DBSearchSteps DBSearchSteps
Definition: IdentificationData.h:114
OpenMS::IdentificationDataInternal::QueryMatchGroup
: Group of related (co-identified) molecule-query matches
Definition: QueryMatchGroup.h:50
OpenMS::IdentificationDataInternal::IdentifiedPeptideRef
IteratorWrapper< IdentifiedPeptides::iterator > IdentifiedPeptideRef
Definition: IdentifiedSequence.h:116
OpenMS::IdentificationDataInternal::IdentifiedCompoundRef
IteratorWrapper< IdentifiedCompounds::iterator > IdentifiedCompoundRef
Definition: IdentifiedCompound.h:80
OpenMS::IdentificationDataInternal::ScoreTypeRef
IteratorWrapper< ScoreTypes::iterator > ScoreTypeRef
Definition: ScoreType.h:86
DBSearchParam.h
OpenMS::IdentificationData::ScoreTypes
IdentificationDataInternal::ScoreTypes ScoreTypes
Definition: IdentificationData.h:117