A container for features. More...
#include <OpenMS/KERNEL/FeatureMap.h>
Public Types | |
Type definitions | |
| typedef FeatureT | FeatureType |
| typedef RangeManager< 2 > | RangeManagerType |
| typedef std::vector< FeatureType > | Base |
| typedef Base::iterator | Iterator |
| typedef Base::const_iterator | ConstIterator |
| typedef Base::reverse_iterator | ReverseIterator |
| typedef Base::const_reverse_iterator | ConstReverseIterator |
| typedef FeatureType & | Reference |
| typedef const FeatureType & | ConstReference |
Public Member Functions | |
| FeatureMap & | operator= (const FeatureMap &rhs) |
| Assignment operator. | |
| bool | operator== (const FeatureMap &rhs) const |
| Equality operator. | |
| bool | operator!= (const FeatureMap &rhs) const |
| Equality operator. | |
| FeatureMap | operator+ (const FeatureMap &rhs) const |
| Joins two feature maps. | |
| FeatureMap & | operator+= (const FeatureMap &rhs) |
| Add one feature map to another. | |
| void | updateRanges () |
| void | swap (FeatureMap &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 | |
| const std::vector < PeptideIdentification > & | getUnassignedPeptideIdentifications () const |
| non-mutable access to the unassigned peptide identifications | |
| std::vector < PeptideIdentification > & | getUnassignedPeptideIdentifications () |
| mutable access to the unassigned peptide identifications | |
| void | setUnassignedPeptideIdentifications (const std::vector< PeptideIdentification > &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 | clear (bool clear_meta_data=true) |
| Clears all data and meta data. | |
| template<typename Type > | |
| Size | applyMemberFunction (Size(Type::*member_function)()) |
| Applies a member function of Type to the container itself and all features (including subordinates). The returned values are accumulated. | |
| template<typename Type > | |
| Size | applyMemberFunction (Size(Type::*member_function)() const) const |
| The "const" variant. | |
Constructors and Destructor | |
| FeatureMap () | |
| Default constructor. | |
| FeatureMap (const FeatureMap &source) | |
| Copy constructor. | |
| virtual | ~FeatureMap () |
| Destructor. | |
Sorting. | |
| void | sortByIntensity (bool reverse=false) |
| Sorts the peaks according to ascending intensity. | |
| void | sortByPosition () |
| Sort features by position. Lexicographical comparison (first RT then m/z) is done. | |
| void | sortByRT () |
| Sort features by RT position. | |
| void | sortByMZ () |
| Sort features by m/z position. | |
| void | sortByOverallQuality (bool reverse=false) |
| Sort features by ascending overall quality. | |
Protected Attributes | |
| std::vector < ProteinIdentification > | protein_identifications_ |
| protein identifications | |
| std::vector < PeptideIdentification > | unassigned_peptide_identifications_ |
| peptide identifications not matched to a specific feature | |
| std::vector< DataProcessing > | data_processing_ |
| applied data processing | |
A container for features.
A map is a container holding 2-dimensional features, which in turn represent chemical entities (peptides, proteins, etc.) found in a 2-dimensional experiment.
Maps are implemented as vectors of features and have basically the same interface as an STL vector has (model of Random Access Container and Back Insertion Sequence).
Feature maps are typically created from peak data of 2D runs through the FeatureFinder.
| typedef std::vector<FeatureType> Base |
| typedef Base::const_iterator ConstIterator |
| typedef const FeatureType& ConstReference |
| typedef Base::const_reverse_iterator ConstReverseIterator |
| typedef FeatureT FeatureType |
| typedef Base::iterator Iterator |
| typedef RangeManager<2> RangeManagerType |
| typedef FeatureType& Reference |
| typedef Base::reverse_iterator ReverseIterator |
| FeatureMap | ( | ) | [inline] |
Default constructor.
| FeatureMap | ( | const FeatureMap< FeatureT > & | source | ) | [inline] |
Copy constructor.
| virtual ~FeatureMap | ( | ) | [inline, virtual] |
Destructor.
Applies a member function of Type to the container itself and all features (including subordinates). 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):
FeatureMap<> fm;
(...)
std::cout << fm.applyMemberFunction(&UniqueIdInterface::hasInvalidUniqueId) << std::endl;
See e.g. UniqueIdInterface for what else can be done this way.
The "const" variant.
| void clear | ( | bool | clear_meta_data = true |
) | [inline] |
Clears all data and meta data.
| clear_meta_data | If true, all meta data is cleared in addition to the data. |
Referenced by FeatureMap< Feature >::clear(), ConsensusMap::convert(), and FeatureFinder::run().
| const std::vector<DataProcessing>& getDataProcessing | ( | ) | const [inline] |
returns a const reference to the description of the applied data processing
Referenced by TOPPBase::addDataProcessing_(), and IDMapper::annotate().
| std::vector<DataProcessing>& getDataProcessing | ( | ) | [inline] |
returns a mutable reference to the description of the applied data processing
| const std::vector<ProteinIdentification>& getProteinIdentifications | ( | ) | const [inline] |
non-mutable access to the protein identifications
Referenced by MetaDataBrowser::add(), IDMapper::annotate(), ConsensusMap::convert(), and MRMFeatureFinderScoring::pickExperiment().
| std::vector<ProteinIdentification>& getProteinIdentifications | ( | ) | [inline] |
mutable access to the protein identifications
| const std::vector<PeptideIdentification>& getUnassignedPeptideIdentifications | ( | ) | const [inline] |
non-mutable access to the unassigned peptide identifications
Referenced by MetaDataBrowser::add(), IDMapper::annotate(), and ConsensusMap::convert().
| std::vector<PeptideIdentification>& getUnassignedPeptideIdentifications | ( | ) | [inline] |
mutable access to the unassigned peptide identifications
| bool operator!= | ( | const FeatureMap< FeatureT > & | rhs | ) | const [inline] |
Equality operator.
| FeatureMap operator+ | ( | const FeatureMap< FeatureT > & | rhs | ) | const [inline] |
Joins two feature maps.
Features are merged into one container (see operator+= for details).
| FeatureMap& operator+= | ( | const FeatureMap< FeatureT > & | rhs | ) | [inline] |
Add one feature map to another.
Features are merged into one container, simply by appending. UnassignedPeptides and ProteinIdentifications are appended. Information on DocumentIdentifier, UniqueIdInterface (of container only) are reset to default.
For conflicting UID's, new UID's will be assigned.
| rhs | The feature to add to this one. |
| FeatureMap& operator= | ( | const FeatureMap< FeatureT > & | rhs | ) | [inline] |
Assignment operator.
Referenced by FeatureMap< Feature >::clear(), FeatureMap< Feature >::operator+=(), and FeatureMap< Feature >::operator=().
| bool operator== | ( | const FeatureMap< FeatureT > & | rhs | ) | const [inline] |
Equality operator.
Referenced by FeatureMap< Feature >::operator!=(), and FeatureMap< Feature >::operator==().
| void setDataProcessing | ( | const std::vector< DataProcessing > & | processing_method | ) | [inline] |
sets the description of the applied data processing
| void setProteinIdentifications | ( | const std::vector< ProteinIdentification > & | protein_identifications | ) | [inline] |
sets the protein identifications
Referenced by ConsensusMap::convert().
| void setUnassignedPeptideIdentifications | ( | const std::vector< PeptideIdentification > & | unassigned_peptide_identifications | ) | [inline] |
sets the unassigned peptide identifications
Referenced by ConsensusMap::convert().
| void sortByIntensity | ( | bool | reverse = false |
) | [inline] |
Sorts the peaks according to ascending intensity.
Referenced by FeatureFinderAlgorithmPicked< PeakType, FeatureType >::run().
| void sortByMZ | ( | ) | [inline] |
Sort features by m/z position.
Referenced by FeatureFinderAlgorithmPicked< PeakType, FeatureType >::run().
| void sortByOverallQuality | ( | bool | reverse = false |
) | [inline] |
Sort features by ascending overall quality.
| void sortByPosition | ( | ) | [inline] |
Sort features by position. Lexicographical comparison (first RT then m/z) is done.
| void sortByRT | ( | ) | [inline] |
Sort features by RT position.
| void swap | ( | FeatureMap< FeatureT > & | from | ) | [inline] |
Swaps the content of this map with the content of from.
Referenced by FeatureMap< Feature >::swap().
| void updateRanges | ( | ) | [inline] |
std::vector<DataProcessing> data_processing_ [protected] |
applied data processing
Referenced by FeatureMap< Feature >::clear(), FeatureMap< Feature >::getDataProcessing(), FeatureMap< Feature >::operator+=(), FeatureMap< Feature >::operator=(), FeatureMap< Feature >::operator==(), FeatureMap< Feature >::setDataProcessing(), and FeatureMap< Feature >::swap().
std::vector<ProteinIdentification> protein_identifications_ [protected] |
protein identifications
Referenced by FeatureMap< Feature >::clear(), FeatureMap< Feature >::getProteinIdentifications(), FeatureMap< Feature >::operator+=(), FeatureMap< Feature >::operator=(), FeatureMap< Feature >::operator==(), FeatureMap< Feature >::setProteinIdentifications(), and FeatureMap< Feature >::swap().
std::vector<PeptideIdentification> unassigned_peptide_identifications_ [protected] |
peptide identifications not matched to a specific feature
Referenced by FeatureMap< Feature >::clear(), FeatureMap< Feature >::getUnassignedPeptideIdentifications(), FeatureMap< Feature >::operator+=(), FeatureMap< Feature >::operator=(), FeatureMap< Feature >::operator==(), FeatureMap< Feature >::setUnassignedPeptideIdentifications(), and FeatureMap< Feature >::swap().
| OpenMS / TOPP release 1.10.0 | Documentation generated on Thu Mar 7 2013 09:42:55 using doxygen 1.7.1 |