![]() |
OpenMS
|
A container for consensus elements. More...
#include <OpenMS/KERNEL/ConsensusMap.h>
Classes | |
| struct | ColumnHeader |
| Description of the columns in a consensus map. More... | |
Public Types | |
| enum class | SplitMeta { DISCARD , COPY_ALL , COPY_FIRST } |
Public Types inherited from MetaInfoInterface | |
| using | MetaInfoConstIterator = MetaInfo::const_iterator |
| Const iterator type for iterating over meta info entries. | |
Public Types inherited from RangeManagerContainer< RangeRT, RangeMZ, RangeIntensity > | |
| using | ThisRangeType = typename RangeManager< RangeBases... >::ThisRangeType |
Public Types inherited from RangeManager< RangeBases... > | |
| using | ThisRangeType = RangeManager< RangeBases... > |
Public Types inherited from ExposedVector< ConsensusFeature > | |
| using | VecMember = std::vector< ConsensusFeature > |
| using | value_type = typename VecMember::value_type |
| using | iterator = typename VecMember::iterator |
| using | const_iterator = typename VecMember::const_iterator |
| using | reverse_iterator = typename VecMember::reverse_iterator |
| using | const_reverse_iterator = typename VecMember::const_reverse_iterator |
| using | size_type = typename VecMember::size_type |
| using | pointer = typename VecMember::pointer |
| using | reference = typename VecMember::reference |
| using | const_reference = typename VecMember::const_reference |
| using | difference_type = typename VecMember::difference_type |
Public Types inherited from UniqueIdInterface | |
| enum | { INVALID = 0 } |
| This is the invalid unique id (cast it to a UInt64 if you like) More... | |
Public Types inherited from UniqueIdIndexer< ConsensusMap > | |
| typedef std::unordered_map< UInt64, Size > | UniqueIdMap |
Public Member Functions | |
Sorting. | |
These specialized sorting methods are supported in addition to the standard sorting methods of std::vector. All use stable sorting. | |
| void | sortByIntensity (bool reverse=false) |
| Sorts the peaks according to ascending intensity. | |
| void | sortByRT () |
| Sorts the peaks to RT position. | |
| void | sortByMZ () |
| Sorts the peaks to m/z position. | |
| void | sortByPosition () |
| Lexicographically sorts the peaks by their position (First RT then m/z). | |
| void | sortByQuality (bool reverse=false) |
| Sorts the peaks according to ascending quality. | |
| void | sortBySize () |
| Sorts with respect to the size (number of elements) | |
| void | sortByMaps () |
| Sorts with respect to the sets of maps covered by the consensus features (lexicographically). | |
| void | sortPeptideIdentificationsByMapIndex () |
| Sorts PeptideIdentifications of consensus features with respect to their map index. | |
| void | updateRanges () override |
| void | swap (ConsensusMap &from) |
Swaps the content of this map with the content of from. | |
| const std::vector< ProteinIdentification > & | getProteinIdentifications () const |
| non-mutable access to the protein identifications | |
| std::vector< ProteinIdentification > & | getProteinIdentifications () |
| mutable access to the protein identifications | |
| void | setProteinIdentifications (const std::vector< ProteinIdentification > &protein_identifications) |
| sets the protein identifications | |
| void | setProteinIdentifications (std::vector< ProteinIdentification > &&protein_identifications) |
| sets the protein identifications by moving | |
| const ProteinIdentification * | findProteinIdentification (const std::string &identifier) const |
| finds a protein identification by its identifier (returns nullptr if not found) | |
| ProteinIdentification * | findProteinIdentification (const std::string &identifier) |
| finds a protein identification by its identifier (returns nullptr if not found) | |
| const PeptideIdentificationList & | getUnassignedPeptideIdentifications () const |
| non-mutable access to the unassigned peptide identifications | |
| PeptideIdentificationList & | getUnassignedPeptideIdentifications () |
| mutable access to the unassigned peptide identifications | |
| void | setUnassignedPeptideIdentifications (const PeptideIdentificationList &unassigned_peptide_identifications) |
| sets the unassigned peptide identifications | |
| const std::vector< DataProcessing > & | getDataProcessing () const |
| returns a const reference to the description of the applied data processing | |
| std::vector< DataProcessing > & | getDataProcessing () |
| returns a mutable reference to the description of the applied data processing | |
| void | setDataProcessing (const std::vector< DataProcessing > &processing_method) |
| sets the description of the applied data processing | |
| void | setPrimaryMSRunPath (const StringList &s) |
| set the file paths to the primary MS run (stored in ColumnHeaders) | |
| void | setPrimaryMSRunPath (const StringList &s, MSExperiment &e) |
| void | getPrimaryMSRunPath (StringList &toFill) const |
| returns the MS run path (stored in ColumnHeaders) | |
| bool | operator== (const ConsensusMap &rhs) const |
| Equality operator. | |
| bool | operator!= (const ConsensusMap &rhs) const |
| Equality operator. | |
| template<typename Type > | |
| Size | applyMemberFunction (Size(Type::*member_function)()) |
| Applies a member function of Type to the container itself and all consensus features. The returned values are accumulated. | |
| template<typename Type > | |
| Size | applyMemberFunction (Size(Type::*member_function)() const) const |
| The "const" variant. | |
| bool | isMapConsistent (Logger::LogStream *stream=nullptr) const |
| checks if the given maps are unique and all FeatureHandles actually refer to a registered map | |
| std::vector< FeatureMap > | split (SplitMeta mode=SplitMeta::DISCARD) const |
| splits ConsensusMap into its original FeatureMaps | |
Functions for dealing with identifications in new format | |
| std::set< IdentificationData::ObservationMatchRef > | getUnassignedIDMatches () const |
| Return observation matches (e.g. PSMs) from the identification data that are not assigned to any feature in the map. | |
| const IdentificationData & | getIdentificationData () const |
| Immutable access to the contained identification data. | |
| IdentificationData & | getIdentificationData () |
| Mutable access to the contained identification data. | |
Public Member Functions inherited from MetaInfoInterface | |
| MetaInfoInterface ()=default | |
| Constructor. | |
| MetaInfoInterface (const MetaInfoInterface &rhs) | |
| Copy constructor. | |
| MetaInfoInterface (MetaInfoInterface &&) noexcept | |
| Move constructor. | |
| ~MetaInfoInterface () | |
| Destructor. | |
| MetaInfoInterface & | operator= (const MetaInfoInterface &rhs) |
| Assignment operator. | |
| MetaInfoInterface & | operator= (MetaInfoInterface &&) noexcept |
| Move assignment operator. | |
| void | swap (MetaInfoInterface &rhs) |
| Swap contents. | |
| bool | operator== (const MetaInfoInterface &rhs) const |
| Equality operator. | |
| bool | operator!= (const MetaInfoInterface &rhs) const |
| Equality operator. | |
| const DataValue & | getMetaValue (const std::string &name) const |
| Returns the value corresponding to a string, or DataValue::EMPTY if not found. | |
| DataValue | getMetaValue (const std::string &name, const DataValue &default_value) const |
| Returns the value corresponding to a string, or a default value (e.g.: DataValue::EMPTY) if not found | |
| const DataValue & | getMetaValue (UInt index) const |
| Returns the value corresponding to the index, or DataValue::EMPTY if not found. | |
| DataValue | getMetaValue (UInt index, const DataValue &default_value) const |
| Returns the value corresponding to the index, or a default value (e.g.: DataValue::EMPTY) if not found | |
| bool | metaValueExists (const std::string &name) const |
| Returns whether an entry with the given name exists. | |
| bool | metaValueExists (UInt index) const |
| Returns whether an entry with the given index exists. | |
| void | setMetaValue (const std::string &name, const DataValue &value) |
| Sets the DataValue corresponding to a name. | |
| void | setMetaValue (UInt index, const DataValue &value) |
| Sets the DataValue corresponding to an index. | |
| void | removeMetaValue (const std::string &name) |
Removes the DataValue corresponding to name if it exists. | |
| void | removeMetaValue (UInt index) |
Removes the DataValue corresponding to index if it exists. | |
| void | addMetaValues (const MetaInfoInterface &from) |
| void | getKeys (std::vector< std::string > &keys) const |
| Fills the given vector with a list of all keys for which a value is set. | |
| void | getKeys (std::vector< UInt > &keys) const |
| Fills the given vector with a list of all keys for which a value is set. | |
| bool | isMetaEmpty () const |
| Returns if the MetaInfo is empty. | |
| void | clearMetaInfo () |
| Removes all meta values. | |
| MetaInfoConstIterator | metaBegin () const |
| Returns a const iterator to the beginning of the meta info entries. | |
| MetaInfoConstIterator | metaEnd () const |
| Returns a const iterator to the end of the meta info entries. | |
| Size | metaSize () const |
| Returns the number of meta info entries. | |
Public Member Functions inherited from RangeManagerContainer< RangeRT, RangeMZ, RangeIntensity > | |
| virtual | ~RangeManagerContainer ()=default |
| D'tor. | |
| const ThisRangeType & | getRange () const |
| get range of current data (call updateRanges() before to ensure the range is accurate) | |
| ThisRangeType & | getRange () |
| get mutable range, provided for efficiency reasons (avoid updateRanges(), if only minor changes were made) | |
Public Member Functions inherited from RangeManager< RangeBases... > | |
| bool | operator== (const RangeManager &rhs) const |
| bool | operator!= (const RangeManager &rhs) const |
| bool | assignUnsafe (const RangeManager< RangeBasesOther... > &rhs) |
| auto & | assign (const RangeManager< RangeBasesOther... > &rhs) |
| bool | extendUnsafe (const RangeManager< RangeBasesOther... > &rhs) |
| void | extend (const RangeManager< RangeBasesOther... > &rhs) |
| void | scaleBy (const double factor) |
| calls RangeBase::scale() for each dimension | |
| void | minSpanIfSingular (const double min_span) |
If any dimension is a single point, e.g. min==max, then extend this dimension by min_span / 2 on either side. | |
| bool | pushIntoUnsafe (const RangeManager< RangeBasesOther... > &rhs) |
| void | pushInto (const RangeManager< RangeBasesOther... > &sandbox) |
| bool | clampToUnsafe (const RangeManager< RangeBasesOther... > &rhs) |
| void | clampTo (const RangeManager< RangeBasesOther... > &rhs) |
| const RangeBase & | getRangeForDim (MSDim dim) const |
obtain a range dimension at runtime using dim | |
| RangeBase & | getRangeForDim (MSDim dim) |
obtain a range dimension at runtime using dim | |
| HasRangeType | hasRange () const |
| is any/some/all dimension in this range populated? | |
| bool | containsAll (const RangeManager< RangeBasesOther... > &rhs) const |
| void | clearRanges () |
| Resets all ranges. | |
| ThisRangeType & | clear (const DIM_UNIT range) |
| void | printRange (std::ostream &out) const |
| print each dimension (base classes) to a stream | |
Public Member Functions inherited from DocumentIdentifier | |
| DocumentIdentifier () | |
| Default constructor. | |
| DocumentIdentifier (const DocumentIdentifier &)=default | |
| Copy constructor. | |
| DocumentIdentifier (DocumentIdentifier &&)=default | |
| Move constructor. | |
| virtual | ~DocumentIdentifier () |
| Destructor. | |
| DocumentIdentifier & | operator= (const DocumentIdentifier &)=default |
| Assignment operator. | |
| DocumentIdentifier & | operator= (DocumentIdentifier &&) &=default |
| Move assignment operator. | |
| bool | operator== (const DocumentIdentifier &rhs) const |
| Equality operator. | |
| void | setIdentifier (const std::string &id) |
| set document identifier (e.g. an LSID) | |
| const std::string & | getIdentifier () const |
| retrieve document identifier (e.g. an LSID) | |
| void | swap (DocumentIdentifier &from) |
exchange content with from | |
| void | setLoadedFilePath (const std::string &file_name) |
| set the file_name_ according to absolute path of the file loaded from preferably done whilst loading | |
| const std::string & | getLoadedFilePath () const |
| get the file_name_ which is the absolute path to the file loaded from | |
| void | setLoadedFileType (const std::string &file_name) |
| set the file_type according to the type of the file loaded from (see FileHandler::Type) preferably done whilst loading | |
| const FileTypes::Type & | getLoadedFileType () const |
| get the file_type (e.g. featureXML, consensusXML, mzData, mzXML, mzML, ...) of the file loaded from | |
Public Member Functions inherited from ExposedVector< ConsensusFeature > | |
| ExposedVector ()=default | |
| ExposedVector (const size_t n) | |
| ExposedVector (const size_t n, const ConsensusFeature &val) | |
| ExposedVector (Iter begin, Iter end) | |
| ExposedVector (const ExposedVector &rhs)=default | |
| Copy C'tor. | |
| ExposedVector (ExposedVector &&rhs) noexcept=default | |
| Move C'tor. | |
| ExposedVector & | operator= (const ExposedVector &rhs)=default |
| Assignment. | |
| ExposedVector & | operator= (ExposedVector &&rhs) noexcept=default |
| Move Assignment. | |
| iterator | begin () noexcept |
| const_iterator | begin () const noexcept |
| iterator | end () noexcept |
| const_iterator | end () const noexcept |
| const_iterator | cbegin () const noexcept |
| const_iterator | cend () const noexcept |
| size_t | size () const noexcept |
| void | resize (const size_t new_size) |
| void | reserve (const size_t new_size) |
| bool | empty () const noexcept |
| ConsensusFeature & | operator[] (size_t i) noexcept |
| const ConsensusFeature & | operator[] (size_t i) const noexcept |
| ConsensusFeature & | at (size_t i) |
| const ConsensusFeature & | at (size_t i) const |
| ConsensusFeature & | back () noexcept |
| const ConsensusFeature & | back () const noexcept |
| void | push_back (const ConsensusFeature &f) |
| void | push_back (ConsensusFeature &&f) |
| decltype(auto) | emplace_back (Args &&... args) |
| void | pop_back () noexcept |
| iterator | erase (const_iterator where) noexcept |
| iterator | erase (const_iterator from, const_iterator to) noexcept |
| iterator | insert (const_iterator where, T from, T to) |
| iterator | insert (const_iterator pos, const ConsensusFeature &value) |
| Insert single element. | |
| iterator | insert (const_iterator pos, ConsensusFeature &&value) |
| Insert single element (move) | |
| iterator | insert (const_iterator pos, size_type count, const ConsensusFeature &value) |
| Insert n copies of value. | |
| iterator | insert (const_iterator pos, std::initializer_list< ConsensusFeature > init) |
| Insert from initializer list. | |
| void | clear () noexcept |
| Clear all elements. | |
| reverse_iterator | rbegin () noexcept |
| Get reverse iterator to beginning. | |
| const_reverse_iterator | rbegin () const noexcept |
| Get const reverse iterator to beginning. | |
| reverse_iterator | rend () noexcept |
| Get reverse iterator to end. | |
| const_reverse_iterator | rend () const noexcept |
| Get const reverse iterator to end. | |
| const_reverse_iterator | crbegin () const noexcept |
| Get const reverse iterator to beginning. | |
| const_reverse_iterator | crend () const noexcept |
| Get const reverse iterator to end. | |
| void | swap (ExposedVector &other) noexcept |
| Swap contents with another ExposedVector. | |
| void | assign (InputIt first, InputIt last) |
| Assign values from iterators. | |
| void | assign (size_type count, const ConsensusFeature &value) |
| Assign n copies of value. | |
| void | assign (std::initializer_list< ConsensusFeature > init) |
| Assign from initializer list. | |
| ConsensusFeature & | front () noexcept |
| Get first element. | |
| const ConsensusFeature & | front () const noexcept |
| Get first element (const) | |
| size_type | max_size () const noexcept |
| Get maximum possible size. | |
| size_type | capacity () const noexcept |
| Get current capacity. | |
| void | shrink_to_fit () |
| Shrink capacity to fit size. | |
| iterator | emplace (const_iterator pos, Args &&... args) |
| Emplace element at position. | |
| const VecMember & | getData () const |
| read-only access to the underlying data | |
| VecMember & | getData () |
| read access to the underlying data | |
| bool | operator== (const ExposedVector &other) const |
| Equality comparison. | |
| bool | operator!= (const ExposedVector &other) const |
| Inequality comparison. | |
| bool | operator< (const ExposedVector &other) const |
| bool | operator<= (const ExposedVector &other) const |
| bool | operator> (const ExposedVector &other) const |
| bool | operator>= (const ExposedVector &other) const |
Public Member Functions inherited from UniqueIdInterface | |
| UniqueIdInterface () | |
| Default constructor - the unique id will be invalid | |
| UniqueIdInterface (const UniqueIdInterface &rhs)=default | |
| Copy constructor - copies the unique id. | |
| UniqueIdInterface (UniqueIdInterface &&rhs)=default | |
| Move constructor. | |
| UniqueIdInterface & | operator= (UniqueIdInterface const &rhs)=default |
| Assignment operator - copies the unique id. | |
| UniqueIdInterface & | operator= (UniqueIdInterface &&) &=default |
| Move Assignment operator - copies the unique id. | |
| virtual | ~UniqueIdInterface ()=default |
| Destructor. | |
| bool | operator== (UniqueIdInterface const &rhs) const |
| Equality comparison operator - the unique ids must be equal (!) | |
| UInt64 | getUniqueId () const |
| Non-mutable access to unique id - returns the unique id. | |
| Size | clearUniqueId () |
| Clear the unique id. The new unique id will be invalid. Returns 1 if the unique id was changed, 0 otherwise. | |
| void | swap (UniqueIdInterface &from) |
| Size | hasValidUniqueId () const |
| Returns whether the unique id is valid. Returns 1 if the unique id is valid, 0 otherwise. | |
| Size | hasInvalidUniqueId () const |
| Returns whether the unique id is invalid. Returns 1 if the unique id is invalid, 0 otherwise. | |
| Size | setUniqueId () |
| Assigns a new, valid unique id. Always returns 1. | |
| Size | ensureUniqueId () |
| Assigns a valid unique id, but only if the present one is invalid. Returns 1 if the unique id was changed, 0 otherwise. | |
| void | setUniqueId (UInt64 rhs) |
| Assigns the given unique id. | |
| void | setUniqueId (const std::string &rhs) |
| Mutable access to unique id. | |
Public Member Functions inherited from UniqueIdIndexer< ConsensusMap > | |
| Size | uniqueIdToIndex (UInt64 unique_id) const |
| Returns the index of the feature with the given unique id, or Size(-1) if none exists in this random access container. | |
| void | updateUniqueIdToIndex () const |
| Updates the hash map from unique id to index. | |
| Size | resolveUniqueIdConflicts () |
| Assign new UID's to doubly occurring UID's. | |
| void | swap (UniqueIdIndexer &rhs) |
| Swap. | |
Public Member Functions inherited from MapUtilities< ConsensusMap > | |
| void | applyFunctionOnPeptideHits (T &&f, bool include_unassigned=true) |
| applies a function on all PeptideHits or only assigned ones | |
| void | applyFunctionOnPeptideHits (T &&f, bool include_unassigned=true) const |
| applies a const function on all PeptideHits or only assigned ones | |
| void | applyFunctionOnPeptideIDs (T &&f, bool include_unassigned=true) |
| applies a function on all PeptideIDs or only assigned ones | |
| void | applyFunctionOnPeptideIDs (T &&f, bool include_unassigned=true) const |
| applies a const function on all PeptideIDs or only assigned ones | |
Protected Attributes | |
| ColumnHeaders | column_description_ |
| Map from index to file description. | |
| std::string | experiment_type_ = "label-free" |
| type of experiment (label-free, labeled_MS1, labeled_MS2) | |
| std::vector< ProteinIdentification > | protein_identifications_ |
| protein identifications | |
| PeptideIdentificationList | unassigned_peptide_identifications_ |
| unassigned peptide identifications (without feature) | |
| std::vector< DataProcessing > | data_processing_ |
| applied data processing | |
| IdentificationData | id_data_ |
| general identification results (peptides/proteins, RNA, compounds) | |
Protected Attributes inherited from MetaInfoInterface | |
| MetaInfo * | meta_ = nullptr |
| Pointer to the MetaInfo object. | |
Protected Attributes inherited from DocumentIdentifier | |
| std::string | id_ |
| the ID (e.g. LSID) | |
| std::string | file_path_ |
| the path to the loaded file | |
| FileTypes::Type | file_type_ |
| the type of the loaded file | |
Protected Attributes inherited from ExposedVector< ConsensusFeature > | |
| VecMember | data_ |
| the container which holds all the data | |
Protected Attributes inherited from UniqueIdInterface | |
| UInt64 | unique_id_ |
| the unique id | |
Protected Attributes inherited from UniqueIdIndexer< ConsensusMap > | |
| UniqueIdMap | uniqueid_to_index_ |
| hash map from unique id to index of features | |
Type definitions | |
| typedef ConsensusFeature | FeatureType |
| typedef std::map< UInt64, ColumnHeader > | ColumnHeaders |
| typedef RangeManagerContainer< RangeRT, RangeMZ, RangeIntensity > | RangeManagerContainerType |
| typedef RangeManager< RangeRT, RangeMZ, RangeIntensity > | RangeManagerType |
| typedef iterator | Iterator |
| typedef const_iterator | ConstIterator |
| typedef reverse_iterator | ReverseIterator |
| typedef const_reverse_iterator | ConstReverseIterator |
| ConsensusMap () | |
| Default constructor. | |
| ConsensusMap (const ConsensusMap &source) | |
| Copy constructor. | |
| ConsensusMap (ConsensusMap &&source) | |
| Move constructor. | |
| ~ConsensusMap () override | |
| Destructor. | |
| ConsensusMap (size_type n) | |
| Creates a ConsensusMap with n elements. | |
| ConsensusMap & | operator= (const ConsensusMap &source) |
| Assignment operator. | |
| ConsensusMap & | operator= (ConsensusMap &&source)=default |
| MoveAssignment operator. | |
| ConsensusMap & | appendRows (const ConsensusMap &rhs) |
| Add consensus map entries as new rows. | |
| ConsensusMap & | appendColumns (const ConsensusMap &rhs) |
| Add consensus map entries as new columns. | |
| void | clear (bool clear_meta_data=true) |
| Clears all data and meta data. | |
| const ColumnHeaders & | getColumnHeaders () const |
| Non-mutable access to the file descriptions. | |
| ColumnHeaders & | getColumnHeaders () |
| Mutable access to the file descriptions. | |
| void | setColumnHeaders (const ColumnHeaders &column_description) |
| Mutable access to the file descriptions. | |
| const std::string & | getExperimentType () const |
| Non-mutable access to the experiment type. | |
| void | setExperimentType (const std::string &experiment_type) |
| Mutable access to the experiment type. | |
Additional Inherited Members | |
Static Public Member Functions inherited from MetaInfoInterface | |
| static MetaInfoRegistry & | metaRegistry () |
| Returns a reference to the MetaInfoRegistry. | |
Static Public Member Functions inherited from UniqueIdInterface | |
| static bool | isValid (UInt64 unique_id) |
| Returns true if the unique_id is valid, false otherwise. | |
Protected Member Functions inherited from MetaInfoInterface | |
| void | createIfNotExists_ () |
| Creates the MetaInfo object if it does not exist. | |
Protected Member Functions inherited from RangeManager< RangeBases... > | |
| void | for_each_base_ (Visitor &&visitor) |
| use fold expression to iterate over all RangeBases of RangeManager and apply a lambda (Visitor) for each one | |
| void | for_each_base_ (Visitor &&visitor) const |
| .. and a const version | |
Protected Member Functions inherited from UniqueIdIndexer< ConsensusMap > | |
| const auto & | getBase_ () const |
| A little helper to get access to the base (!) class RandomAccessContainer. | |
| auto & | getBase_ () |
| A little helper to get access to the base (!) class RandomAccessContainer. | |
Static Protected Member Functions inherited from RangeManager< RangeBases... > | |
| static void | static_for_each_base_ (Visitor &&visitor) |
| use fold expression to iterate over all RangeBases of RangeManager and apply a lambda (Visitor) for each one (for static members) | |
A container for consensus elements.
A ConsensusMap is a container holding 2-dimensional consensus elements (ConsensusFeature) which in turn represent analytes that have been quantified across multiple LC-MS/MS experiments. Each analyte in a ConsensusFeature is linked to its original LC-MS/MS run, the links are maintained by the ConsensusMap class. The map is implemented as a vector of elements of type ConsensusFeature.
To be consistent, all maps who are referenced by ConsensusFeature objects (through a unique id) need to be registered in this class.
| typedef std::map<UInt64, ColumnHeader> ColumnHeaders |
| typedef const_iterator ConstIterator |
| typedef ConsensusFeature FeatureType |
| typedef RangeManager<RangeRT, RangeMZ, RangeIntensity> RangeManagerType |
| typedef reverse_iterator ReverseIterator |
|
strong |
| ConsensusMap | ( | ) |
Default constructor.
| ConsensusMap | ( | const ConsensusMap & | source | ) |
Copy constructor.
| ConsensusMap | ( | ConsensusMap && | source | ) |
Move constructor.
|
override |
Destructor.
|
explicit |
Creates a ConsensusMap with n elements.
| ConsensusMap & appendColumns | ( | const ConsensusMap & | rhs | ) |
Add consensus map entries as new columns.
The number of columns (maximum map index) is the sum of both maps.
| [in] | rhs | The consensus map to be merged. |
| ConsensusMap & appendRows | ( | const ConsensusMap & | rhs | ) |
Add consensus map entries as new rows.
Consensus elements are merged into one container, simply by appending.
The number of columns (maximum map index) stays the same.
| [in] | rhs | The consensus map to be merged. |
|
inline |
The "const" variant.
Applies a member function of Type to the container itself and all consensus features. The returned values are accumulated.
Example: The following will print the number of features with invalid unique ids (plus 1 if the container has an invalid UID as well):
See e.g. UniqueIdInterface for what else can be done this way.
| void clear | ( | bool | clear_meta_data = true | ) |
Clears all data and meta data.
| [in] | clear_meta_data | If true, all meta data is cleared in addition to the data. |
Referenced by MS1LabeledFAIMS::annotate(), and MS1LabeledFAIMS::group().
| ProteinIdentification * findProteinIdentification | ( | const std::string & | identifier | ) |
finds a protein identification by its identifier (returns nullptr if not found)
| const ProteinIdentification * findProteinIdentification | ( | const std::string & | identifier | ) | const |
finds a protein identification by its identifier (returns nullptr if not found)
| ColumnHeaders & getColumnHeaders | ( | ) |
Mutable access to the file descriptions.
| const ColumnHeaders & getColumnHeaders | ( | ) | const |
Non-mutable access to the file descriptions.
Referenced by MS1LabeledFAIMS::append_(), and MS1LabeledRatioQuantifier::run().
| std::vector< DataProcessing > & getDataProcessing | ( | ) |
returns a mutable reference to the description of the applied data processing
| const std::vector< DataProcessing > & getDataProcessing | ( | ) | const |
returns a const reference to the description of the applied data processing
| const std::string & getExperimentType | ( | ) | const |
Non-mutable access to the experiment type.
Referenced by MS1LabeledRatioQuantifier::run().
| IdentificationData & getIdentificationData | ( | ) |
Mutable access to the contained identification data.
| const IdentificationData & getIdentificationData | ( | ) | const |
Immutable access to the contained identification data.
| void getPrimaryMSRunPath | ( | StringList & | toFill | ) | const |
returns the MS run path (stored in ColumnHeaders)
| std::vector< ProteinIdentification > & getProteinIdentifications | ( | ) |
mutable access to the protein identifications
| const std::vector< ProteinIdentification > & getProteinIdentifications | ( | ) | const |
non-mutable access to the protein identifications
Referenced by FeatureGroupingAlgorithm::postprocess_().
| std::set< IdentificationData::ObservationMatchRef > getUnassignedIDMatches | ( | ) | const |
Return observation matches (e.g. PSMs) from the identification data that are not assigned to any feature in the map.
Only top-level features are considered, i.e. no subordinates.
| PeptideIdentificationList & getUnassignedPeptideIdentifications | ( | ) |
mutable access to the unassigned peptide identifications
| const PeptideIdentificationList & getUnassignedPeptideIdentifications | ( | ) | const |
non-mutable access to the unassigned peptide identifications
Referenced by MS1LabeledFAIMS::append_(), IDScoreSwitcherAlgorithm::determineScoreNameOrientationAndType(), FeatureGroupingAlgorithm::postprocess_(), and MS1LabeledRatioQuantifier::run().
| bool isMapConsistent | ( | Logger::LogStream * | stream = nullptr | ) | const |
checks if the given maps are unique and all FeatureHandles actually refer to a registered map
To avoid inconsistencies in map IDs and make sure the maps are unique in terms of name+label
If you want some verbose output, provide a stream.
| bool operator!= | ( | const ConsensusMap & | rhs | ) | const |
Equality operator.
|
default |
MoveAssignment operator.
| ConsensusMap & operator= | ( | const ConsensusMap & | source | ) |
Assignment operator.
| bool operator== | ( | const ConsensusMap & | rhs | ) | const |
Equality operator.
| void setColumnHeaders | ( | const ColumnHeaders & | column_description | ) |
Mutable access to the file descriptions.
| void setDataProcessing | ( | const std::vector< DataProcessing > & | processing_method | ) |
sets the description of the applied data processing
| void setExperimentType | ( | const std::string & | experiment_type | ) |
Mutable access to the experiment type.
| void setPrimaryMSRunPath | ( | const StringList & | s | ) |
set the file paths to the primary MS run (stored in ColumnHeaders)
| void setPrimaryMSRunPath | ( | const StringList & | s, |
| MSExperiment & | e | ||
| ) |
set the file path to the primary MS run using the mzML annotated in the MSExperiment e. If it doesn't exist, fallback to s.
| [in] | s | Fallback if e does not have a primary MS runpath |
| [in,out] | e | Use primary MS runpath from this mzML file |
| void setProteinIdentifications | ( | const std::vector< ProteinIdentification > & | protein_identifications | ) |
sets the protein identifications
| void setProteinIdentifications | ( | std::vector< ProteinIdentification > && | protein_identifications | ) |
sets the protein identifications by moving
| void setUnassignedPeptideIdentifications | ( | const PeptideIdentificationList & | unassigned_peptide_identifications | ) |
sets the unassigned peptide identifications
Referenced by MS1LabeledFAIMS::annotate().
| void sortByIntensity | ( | bool | reverse = false | ) |
Sorts the peaks according to ascending intensity.
| void sortByMaps | ( | ) |
Sorts with respect to the sets of maps covered by the consensus features (lexicographically).
Referenced by FeatureGroupingAlgorithm::postprocess_().
| void sortByMZ | ( | ) |
Sorts the peaks to m/z position.
| void sortByPosition | ( | ) |
Lexicographically sorts the peaks by their position (First RT then m/z).
Referenced by MS1LabeledFAIMS::annotate().
| void sortByQuality | ( | bool | reverse = false | ) |
Sorts the peaks according to ascending quality.
Referenced by FeatureGroupingAlgorithm::postprocess_().
| void sortByRT | ( | ) |
Sorts the peaks to RT position.
| void sortBySize | ( | ) |
Sorts with respect to the size (number of elements)
Referenced by FeatureGroupingAlgorithm::postprocess_().
| void sortPeptideIdentificationsByMapIndex | ( | ) |
Sorts PeptideIdentifications of consensus features with respect to their map index.
| std::vector< FeatureMap > split | ( | SplitMeta | mode = SplitMeta::DISCARD | ) | const |
splits ConsensusMap into its original FeatureMaps
If the ConsensusMap originated from some number of FeatureMaps, those are reconstructed with the information provided by the map index. If the ConsensusMap originated from the IsobaricAnalyzer, only Features are separated. All PeptideIdentifications (assigned and unassigned) are added to the first FeatureMap.
MetaValues of ConsensusFeatures can be copied to all FeatureMaps, just to the first or they can be ignored.
The result holds one FeatureMap per column header (see getColumnHeaders()), ordered by map index: the k-th FeatureMap corresponds to the k-th column header in key order. Map indices do not have to be contiguous, e.g. for the column headers {0, 3} the second FeatureMap (position 1) holds the features of map index 3. For the usual contiguous map indices 0..n-1 the position equals the map index.
| [in] | mode | Decide what to do with the MetaValues annotated at the ConsensusFeatures. |
| Exception::ElementNotFound | if a FeatureHandle or the 'map_index' meta value of a PeptideIdentification refers to a map index which is not a column header of this ConsensusMap (see isMapConsistent()). Also thrown if there is no feature (or no column) with map index 0 although the data was processed by the IsobaricAnalyzer or mode is SplitMeta::COPY_FIRST. |
| Exception::MissingInformation | if the data was not processed by the IsobaricAnalyzer and a PeptideIdentification has no 'map_index' meta value |
| void swap | ( | ConsensusMap & | from | ) |
Swaps the content of this map with the content of from.
|
overridevirtual |
implement this function to reflect the underlying data of the derived class (e.g. an MSSpectrum) Usually, call clearRanges() internally and then populate the dimensions.
Implements RangeManagerContainer< RangeRT, RangeMZ, RangeIntensity >.
Referenced by MS1LabeledFAIMS::annotate(), and MS1LabeledFAIMS::group().
|
protected |
Map from index to file description.
|
protected |
applied data processing
|
protected |
type of experiment (label-free, labeled_MS1, labeled_MS2)
|
protected |
general identification results (peptides/proteins, RNA, compounds)
|
protected |
protein identifications
|
protected |
unassigned peptide identifications (without feature)