OpenMS
ConsensusMap Class Reference

A container for consensus elements. More...

#include <OpenMS/KERNEL/ConsensusMap.h>

Inheritance diagram for ConsensusMap:
[legend]
Collaboration diagram for ConsensusMap:
[legend]

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 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, SizeUniqueIdMap
 

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. More...
 
void sortByRT ()
 Sorts the peaks to RT position. More...
 
void sortByMZ ()
 Sorts the peaks to m/z position. More...
 
void sortByPosition ()
 Lexicographically sorts the peaks by their position (First RT then m/z). More...
 
void sortByQuality (bool reverse=false)
 Sorts the peaks according to ascending quality. More...
 
void sortBySize ()
 Sorts with respect to the size (number of elements) More...
 
void sortByMaps ()
 Sorts with respect to the sets of maps covered by the consensus features (lexicographically). More...
 
void sortPeptideIdentificationsByMapIndex ()
 Sorts PeptideIdentifications of consensus features with respect to their map index. More...
 
void updateRanges () override
 
void swap (ConsensusMap &from)
 Swaps the content of this map with the content of from. More...
 
const std::vector< ProteinIdentification > & getProteinIdentifications () const
 non-mutable access to the protein identifications More...
 
std::vector< ProteinIdentification > & getProteinIdentifications ()
 mutable access to the protein identifications More...
 
void setProteinIdentifications (const std::vector< ProteinIdentification > &protein_identifications)
 sets the protein identifications More...
 
void setProteinIdentifications (std::vector< ProteinIdentification > &&protein_identifications)
 sets the protein identifications by moving More...
 
const std::vector< PeptideIdentification > & getUnassignedPeptideIdentifications () const
 non-mutable access to the unassigned peptide identifications More...
 
std::vector< PeptideIdentification > & getUnassignedPeptideIdentifications ()
 mutable access to the unassigned peptide identifications More...
 
void setUnassignedPeptideIdentifications (const std::vector< PeptideIdentification > &unassigned_peptide_identifications)
 sets the unassigned peptide identifications More...
 
const std::vector< DataProcessing > & getDataProcessing () const
 returns a const reference to the description of the applied data processing More...
 
std::vector< DataProcessing > & getDataProcessing ()
 returns a mutable reference to the description of the applied data processing More...
 
void setDataProcessing (const std::vector< DataProcessing > &processing_method)
 sets the description of the applied data processing More...
 
void setPrimaryMSRunPath (const StringList &s)
 set the file paths to the primary MS run (stored in ColumnHeaders) More...
 
void setPrimaryMSRunPath (const StringList &s, MSExperiment &e)
 
void getPrimaryMSRunPath (StringList &toFill) const
 returns the MS run path (stored in ColumnHeaders) More...
 
bool operator== (const ConsensusMap &rhs) const
 Equality operator. More...
 
bool operator!= (const ConsensusMap &rhs) const
 Equality operator. More...
 
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. More...
 
template<typename Type >
Size applyMemberFunction (Size(Type::*member_function)() const) const
 The "const" variant. More...
 
bool isMapConsistent (Logger::LogStream *stream=nullptr) const
 checks if the given maps are unique and all FeatureHandles actually refer to a registered map More...
 
std::vector< FeatureMapsplit (SplitMeta mode=SplitMeta::DISCARD) const
 splits ConsensusMap into its original FeatureMaps More...
 
Functions for dealing with identifications in new format
std::set< IdentificationData::ObservationMatchRefgetUnassignedIDMatches () const
 Return observation matches (e.g. PSMs) from the identification data that are not assigned to any feature in the map. More...
 
const IdentificationDatagetIdentificationData () const
 Immutable access to the contained identification data. More...
 
IdentificationDatagetIdentificationData ()
 Mutable access to the contained identification data. More...
 
- Public Member Functions inherited from MetaInfoInterface
 MetaInfoInterface ()
 Constructor. More...
 
 MetaInfoInterface (const MetaInfoInterface &rhs)
 Copy constructor. More...
 
 MetaInfoInterface (MetaInfoInterface &&) noexcept
 Move constructor. More...
 
 ~MetaInfoInterface ()
 Destructor. More...
 
MetaInfoInterfaceoperator= (const MetaInfoInterface &rhs)
 Assignment operator. More...
 
MetaInfoInterfaceoperator= (MetaInfoInterface &&) noexcept
 Move assignment operator. More...
 
void swap (MetaInfoInterface &rhs)
 Swap contents. More...
 
bool operator== (const MetaInfoInterface &rhs) const
 Equality operator. More...
 
bool operator!= (const MetaInfoInterface &rhs) const
 Equality operator. More...
 
const DataValuegetMetaValue (const String &name) const
 Returns the value corresponding to a string, or DataValue::EMPTY if not found. More...
 
DataValue getMetaValue (const 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. More...
 
const DataValuegetMetaValue (UInt index) const
 Returns the value corresponding to the index, or DataValue::EMPTY if not found. More...
 
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. More...
 
bool metaValueExists (const String &name) const
 Returns whether an entry with the given name exists. More...
 
bool metaValueExists (UInt index) const
 Returns whether an entry with the given index exists. More...
 
void setMetaValue (const String &name, const DataValue &value)
 Sets the DataValue corresponding to a name. More...
 
void setMetaValue (UInt index, const DataValue &value)
 Sets the DataValue corresponding to an index. More...
 
void removeMetaValue (const String &name)
 Removes the DataValue corresponding to name if it exists. More...
 
void removeMetaValue (UInt index)
 Removes the DataValue corresponding to index if it exists. More...
 
void addMetaValues (const MetaInfoInterface &from)
 function to copy all meta values from one object to this one More...
 
void getKeys (std::vector< String > &keys) const
 Fills the given vector with a list of all keys for which a value is set. More...
 
void getKeys (std::vector< UInt > &keys) const
 Fills the given vector with a list of all keys for which a value is set. More...
 
bool isMetaEmpty () const
 Returns if the MetaInfo is empty. More...
 
void clearMetaInfo ()
 Removes all meta values. More...
 
- Public Member Functions inherited from RangeManagerContainer< RangeRT, RangeMZ, RangeIntensity >
virtual ~RangeManagerContainer ()=default
 D'tor. More...
 
const ThisRangeTypegetRange () const
 get range of current data (call updateRanges() before to ensure the range is accurate) More...
 
ThisRangeTypegetRange ()
 get mutable range, provided for efficiency reasons (avoid updateRanges(), if only minor changes were made) More...
 
- 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 More...
 
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. More...
 
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 RangeBasegetRangeForDim (MSDim dim) const
 obtain a range dimension at runtime using dim More...
 
RangeBasegetRangeForDim (MSDim dim)
 obtain a range dimension at runtime using dim More...
 
HasRangeType hasRange () const
 is any/some/all dimension in this range populated? More...
 
bool containsAll (const RangeManager< RangeBasesOther... > &rhs) const
 
void clearRanges ()
 Resets all ranges. More...
 
ThisRangeTypeclear (const DIM_UNIT range)
 
void printRange (std::ostream &out) const
 print each dimension (base classes) to a stream More...
 
- Public Member Functions inherited from DocumentIdentifier
 DocumentIdentifier ()
 Default constructor. More...
 
 DocumentIdentifier (const DocumentIdentifier &)=default
 Copy constructor. More...
 
 DocumentIdentifier (DocumentIdentifier &&)=default
 Move constructor. More...
 
virtual ~DocumentIdentifier ()
 Destructor. More...
 
DocumentIdentifieroperator= (const DocumentIdentifier &)=default
 Assignment operator. More...
 
DocumentIdentifieroperator= (DocumentIdentifier &&) &=default
 Move assignment operator. More...
 
bool operator== (const DocumentIdentifier &rhs) const
 Equality operator. More...
 
void setIdentifier (const String &id)
 set document identifier (e.g. an LSID) More...
 
const StringgetIdentifier () const
 retrieve document identifier (e.g. an LSID) More...
 
void swap (DocumentIdentifier &from)
 exchange content with from More...
 
void setLoadedFilePath (const String &file_name)
 set the file_name_ according to absolute path of the file loaded from preferably done whilst loading More...
 
const StringgetLoadedFilePath () const
 get the file_name_ which is the absolute path to the file loaded from More...
 
void setLoadedFileType (const String &file_name)
 set the file_type according to the type of the file loaded from (see FileHandler::Type) preferably done whilst loading More...
 
const FileTypes::TypegetLoadedFileType () const
 get the file_type (e.g. featureXML, consensusXML, mzData, mzXML, mzML, ...) of the file loaded from More...
 
- 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. More...
 
 ExposedVector (ExposedVector &&rhs) noexcept=default
 Move C'tor. More...
 
ExposedVectoroperator= (const ExposedVector &rhs)=default
 Assignment. More...
 
ExposedVectoroperator= (ExposedVector &&rhs) noexcept=default
 Move Assignment. More...
 
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
 
ConsensusFeatureoperator[] (size_t i) noexcept
 
const ConsensusFeatureoperator[] (size_t i) const noexcept
 
ConsensusFeatureat (size_t i)
 
const ConsensusFeatureat (size_t i) const
 
ConsensusFeatureback () noexcept
 
const ConsensusFeatureback () 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)
 
const VecMembergetData () const
 read-only access to the underlying data More...
 
VecMembergetData ()
 read access to the underlying data More...
 
- Public Member Functions inherited from UniqueIdInterface
 UniqueIdInterface ()
 Default constructor - the unique id will be invalid More...
 
 UniqueIdInterface (const UniqueIdInterface &rhs)=default
 Copy constructor - copies the unique id. More...
 
 UniqueIdInterface (UniqueIdInterface &&rhs)=default
 Move constructor. More...
 
UniqueIdInterfaceoperator= (UniqueIdInterface const &rhs)=default
 Assignment operator - copies the unique id. More...
 
UniqueIdInterfaceoperator= (UniqueIdInterface &&) &=default
 Move Assignment operator - copies the unique id. More...
 
virtual ~UniqueIdInterface ()=default
 Destructor. More...
 
bool operator== (UniqueIdInterface const &rhs) const
 Equality comparison operator - the unique ids must be equal (!) More...
 
UInt64 getUniqueId () const
 Non-mutable access to unique id - returns the unique id. More...
 
Size clearUniqueId ()
 Clear the unique id. The new unique id will be invalid. Returns 1 if the unique id was changed, 0 otherwise. More...
 
void swap (UniqueIdInterface &from)
 
Size hasValidUniqueId () const
 Returns whether the unique id is valid. Returns 1 if the unique id is valid, 0 otherwise. More...
 
Size hasInvalidUniqueId () const
 Returns whether the unique id is invalid. Returns 1 if the unique id is invalid, 0 otherwise. More...
 
Size setUniqueId ()
 Assigns a new, valid unique id. Always returns 1. More...
 
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. More...
 
void setUniqueId (UInt64 rhs)
 Assigns the given unique id. More...
 
void setUniqueId (const String &rhs)
 Mutable access to unique id. More...
 
- 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. More...
 
void updateUniqueIdToIndex () const
 Updates the hash map from unique id to index. More...
 
Size resolveUniqueIdConflicts ()
 Assign new UID's to doubly occurring UID's. More...
 
void swap (UniqueIdIndexer &rhs)
 Swap. More...
 
- 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 More...
 
void applyFunctionOnPeptideHits (T &&f, bool include_unassigned=true) const
 applies a const function on all PeptideHits or only assigned ones More...
 
void applyFunctionOnPeptideIDs (T &&f, bool include_unassigned=true)
 applies a function on all PeptideIDs or only assigned ones More...
 
void applyFunctionOnPeptideIDs (T &&f, bool include_unassigned=true) const
 applies a const function on all PeptideIDs or only assigned ones More...
 

Protected Attributes

ColumnHeaders column_description_
 Map from index to file description. More...
 
String experiment_type_ = "label-free"
 type of experiment (label-free, labeled_MS1, labeled_MS2) More...
 
std::vector< ProteinIdentificationprotein_identifications_
 protein identifications More...
 
std::vector< PeptideIdentificationunassigned_peptide_identifications_
 unassigned peptide identifications (without feature) More...
 
std::vector< DataProcessingdata_processing_
 applied data processing More...
 
IdentificationData id_data_
 general identification results (peptides/proteins, RNA, compounds) More...
 
- Protected Attributes inherited from MetaInfoInterface
MetaInfometa_
 Pointer to the MetaInfo object (0 by default) More...
 
- Protected Attributes inherited from DocumentIdentifier
String id_
 the ID (e.g. LSID) More...
 
String file_path_
 the path to the loaded file More...
 
FileTypes::Type file_type_
 the type of the loaded file More...
 
- Protected Attributes inherited from ExposedVector< ConsensusFeature >
VecMember data_
 the container which holds all the data More...
 
- Protected Attributes inherited from UniqueIdInterface
UInt64 unique_id_
 the unique id More...
 
- Protected Attributes inherited from UniqueIdIndexer< ConsensusMap >
UniqueIdMap uniqueid_to_index_
 hash map from unique id to index of features More...
 

Type definitions

typedef ConsensusFeature FeatureType
 
typedef std::map< UInt64, ColumnHeaderColumnHeaders
 
typedef RangeManagerContainer< RangeRT, RangeMZ, RangeIntensityRangeManagerContainerType
 
typedef RangeManager< RangeRT, RangeMZ, RangeIntensityRangeManagerType
 
typedef iterator Iterator
 
typedef const_iterator ConstIterator
 
typedef reverse_iterator ReverseIterator
 
typedef const_reverse_iterator ConstReverseIterator
 
 ConsensusMap ()
 Default constructor. More...
 
 ConsensusMap (const ConsensusMap &source)
 Copy constructor. More...
 
 ConsensusMap (ConsensusMap &&source)
 Move constructor. More...
 
 ~ConsensusMap () override
 Destructor. More...
 
 ConsensusMap (size_type n)
 Creates a ConsensusMap with n elements. More...
 
ConsensusMapoperator= (const ConsensusMap &source)
 Assignment operator. More...
 
ConsensusMapoperator= (ConsensusMap &&source)=default
 MoveAssignment operator. More...
 
ConsensusMapappendRows (const ConsensusMap &rhs)
 Add consensus map entries as new rows. More...
 
ConsensusMapappendColumns (const ConsensusMap &rhs)
 Add consensus map entries as new columns. More...
 
void clear (bool clear_meta_data=true)
 Clears all data and meta data. More...
 
const ColumnHeadersgetColumnHeaders () const
 Non-mutable access to the file descriptions. More...
 
ColumnHeadersgetColumnHeaders ()
 Mutable access to the file descriptions. More...
 
void setColumnHeaders (const ColumnHeaders &column_description)
 Mutable access to the file descriptions. More...
 
const StringgetExperimentType () const
 Non-mutable access to the experiment type. More...
 
void setExperimentType (const String &experiment_type)
 Mutable access to the experiment type. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from MetaInfoInterface
static MetaInfoRegistrymetaRegistry ()
 Returns a reference to the MetaInfoRegistry. More...
 
- Static Public Member Functions inherited from UniqueIdInterface
static bool isValid (UInt64 unique_id)
 Returns true if the unique_id is valid, false otherwise. More...
 
- Protected Member Functions inherited from MetaInfoInterface
void createIfNotExists_ ()
 Creates the MetaInfo object if it does not exist. More...
 
- 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 More...
 
void for_each_base_ (Visitor &&visitor) const
 .. and a const version More...
 
- Protected Member Functions inherited from UniqueIdIndexer< ConsensusMap >
const auto & getBase_ () const
 A little helper to get access to the base (!) class RandomAccessContainer. More...
 
auto & getBase_ ()
 A little helper to get access to the base (!) class RandomAccessContainer. More...
 
- 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) More...
 

Detailed Description

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.

Member Typedef Documentation

◆ ColumnHeaders

typedef std::map<UInt64, ColumnHeader> ColumnHeaders

◆ ConstIterator

◆ ConstReverseIterator

◆ FeatureType

◆ Iterator

typedef iterator Iterator

◆ RangeManagerContainerType

◆ RangeManagerType

◆ ReverseIterator

Member Enumeration Documentation

◆ SplitMeta

enum SplitMeta
strong
Enumerator
DISCARD 

do not copy any meta values

COPY_ALL 

copy all meta values to all feature maps

COPY_FIRST 

copy all meta values to first feature map

Constructor & Destructor Documentation

◆ ConsensusMap() [1/4]

Default constructor.

◆ ConsensusMap() [2/4]

ConsensusMap ( const ConsensusMap source)

Copy constructor.

◆ ConsensusMap() [3/4]

ConsensusMap ( ConsensusMap &&  source)

Move constructor.

◆ ~ConsensusMap()

~ConsensusMap ( )
override

Destructor.

◆ ConsensusMap() [4/4]

ConsensusMap ( size_type  n)
explicit

Creates a ConsensusMap with n elements.

Member Function Documentation

◆ appendColumns()

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.

Parameters
rhsThe consensus map to be merged.

◆ appendRows()

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.

Parameters
rhsThe consensus map to be merged.

◆ applyMemberFunction() [1/2]

Size applyMemberFunction ( Size(Type::*)() const  member_function) const
inline

The "const" variant.

◆ applyMemberFunction() [2/2]

Size applyMemberFunction ( Size(Type::*)()  member_function)
inline

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):

(...)
std::cout << cm.applyMemberFunction(&UniqueIdInterface::hasInvalidUniqueId) << std::endl;
ConsensusMap()
Default constructor.
Size hasInvalidUniqueId() const
Returns whether the unique id is invalid. Returns 1 if the unique id is invalid, 0 otherwise.
Definition: UniqueIdInterface.h:112

See e.g. UniqueIdInterface for what else can be done this way.

◆ clear()

void clear ( bool  clear_meta_data = true)

Clears all data and meta data.

Parameters
clear_meta_dataIf true, all meta data is cleared in addition to the data.

◆ getColumnHeaders() [1/2]

ColumnHeaders& getColumnHeaders ( )

Mutable access to the file descriptions.

◆ getColumnHeaders() [2/2]

const ColumnHeaders& getColumnHeaders ( ) const

Non-mutable access to the file descriptions.

◆ getDataProcessing() [1/2]

std::vector<DataProcessing>& getDataProcessing ( )

returns a mutable reference to the description of the applied data processing

◆ getDataProcessing() [2/2]

const std::vector<DataProcessing>& getDataProcessing ( ) const

returns a const reference to the description of the applied data processing

◆ getExperimentType()

const String& getExperimentType ( ) const

Non-mutable access to the experiment type.

◆ getIdentificationData() [1/2]

IdentificationData& getIdentificationData ( )

Mutable access to the contained identification data.

◆ getIdentificationData() [2/2]

const IdentificationData& getIdentificationData ( ) const

Immutable access to the contained identification data.

◆ getPrimaryMSRunPath()

void getPrimaryMSRunPath ( StringList toFill) const

returns the MS run path (stored in ColumnHeaders)

◆ getProteinIdentifications() [1/2]

std::vector<ProteinIdentification>& getProteinIdentifications ( )

mutable access to the protein identifications

◆ getProteinIdentifications() [2/2]

const std::vector<ProteinIdentification>& getProteinIdentifications ( ) const

non-mutable access to the protein identifications

Referenced by FeatureGroupingAlgorithm::postprocess_().

◆ getUnassignedIDMatches()

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.

See also
BaseFeature::getIDMatches()

◆ getUnassignedPeptideIdentifications() [1/2]

std::vector<PeptideIdentification>& getUnassignedPeptideIdentifications ( )

mutable access to the unassigned peptide identifications

◆ getUnassignedPeptideIdentifications() [2/2]

const std::vector<PeptideIdentification>& getUnassignedPeptideIdentifications ( ) const

non-mutable access to the unassigned peptide identifications

Referenced by FeatureGroupingAlgorithm::postprocess_().

◆ isMapConsistent()

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.

@hint: alternative to this method we could check the features while they are added to the map directly, but

  • currently we can't because the interface is not designed for this (derived from std::vector, no encapsulation)
  • we should restrict the user to first fill the list of maps, before any datapoints can be inserted

◆ operator!=()

bool operator!= ( const ConsensusMap rhs) const

Equality operator.

◆ operator=() [1/2]

ConsensusMap& operator= ( ConsensusMap &&  source)
default

MoveAssignment operator.

◆ operator=() [2/2]

ConsensusMap& operator= ( const ConsensusMap source)

Assignment operator.

◆ operator==()

bool operator== ( const ConsensusMap rhs) const

Equality operator.

◆ setColumnHeaders()

void setColumnHeaders ( const ColumnHeaders column_description)

Mutable access to the file descriptions.

◆ setDataProcessing()

void setDataProcessing ( const std::vector< DataProcessing > &  processing_method)

sets the description of the applied data processing

◆ setExperimentType()

void setExperimentType ( const String experiment_type)

Mutable access to the experiment type.

◆ setPrimaryMSRunPath() [1/2]

void setPrimaryMSRunPath ( const StringList s)

set the file paths to the primary MS run (stored in ColumnHeaders)

◆ setPrimaryMSRunPath() [2/2]

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.

Parameters
sFallback if e does not have a primary MS runpath
eUse primary MS runpath from this mzML file

◆ setProteinIdentifications() [1/2]

void setProteinIdentifications ( const std::vector< ProteinIdentification > &  protein_identifications)

sets the protein identifications

◆ setProteinIdentifications() [2/2]

void setProteinIdentifications ( std::vector< ProteinIdentification > &&  protein_identifications)

sets the protein identifications by moving

◆ setUnassignedPeptideIdentifications()

void setUnassignedPeptideIdentifications ( const std::vector< PeptideIdentification > &  unassigned_peptide_identifications)

sets the unassigned peptide identifications

◆ sortByIntensity()

void sortByIntensity ( bool  reverse = false)

Sorts the peaks according to ascending intensity.

◆ sortByMaps()

void sortByMaps ( )

Sorts with respect to the sets of maps covered by the consensus features (lexicographically).

Referenced by FeatureGroupingAlgorithm::postprocess_().

◆ sortByMZ()

void sortByMZ ( )

Sorts the peaks to m/z position.

◆ sortByPosition()

void sortByPosition ( )

Lexicographically sorts the peaks by their position (First RT then m/z).

◆ sortByQuality()

void sortByQuality ( bool  reverse = false)

Sorts the peaks according to ascending quality.

Referenced by FeatureGroupingAlgorithm::postprocess_().

◆ sortByRT()

void sortByRT ( )

Sorts the peaks to RT position.

◆ sortBySize()

void sortBySize ( )

Sorts with respect to the size (number of elements)

Referenced by FeatureGroupingAlgorithm::postprocess_().

◆ sortPeptideIdentificationsByMapIndex()

void sortPeptideIdentificationsByMapIndex ( )

Sorts PeptideIdentifications of consensus features with respect to their map index.

◆ split()

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.

Parameters
modeDecide what to do with the MetaValues annotated at the ConsensusFeatures.
Returns
FeatureMaps

◆ swap()

void swap ( ConsensusMap from)

Swaps the content of this map with the content of from.

◆ updateRanges()

void updateRanges ( )
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 >.

Member Data Documentation

◆ column_description_

ColumnHeaders column_description_
protected

Map from index to file description.

◆ data_processing_

std::vector<DataProcessing> data_processing_
protected

applied data processing

◆ experiment_type_

String experiment_type_ = "label-free"
protected

type of experiment (label-free, labeled_MS1, labeled_MS2)

◆ id_data_

IdentificationData id_data_
protected

general identification results (peptides/proteins, RNA, compounds)

◆ protein_identifications_

std::vector<ProteinIdentification> protein_identifications_
protected

protein identifications

◆ unassigned_peptide_identifications_

std::vector<PeptideIdentification> unassigned_peptide_identifications_
protected

unassigned peptide identifications (without feature)