|
OpenMS
2.6.0
|
Go to the documentation of this file.
49 #include <OpenMS/OpenMSConfig.h>
56 class PeptideIdentification;
58 class ProteinIdentification;
81 private std::vector<ConsensusFeature>,
91 typedef std::vector<ConsensusFeature>
privvec;
94 using privvec::value_type;
95 using privvec::iterator;
96 using privvec::const_iterator;
97 using privvec::size_type;
98 using privvec::pointer;
99 using privvec::reference;
100 using privvec::const_reference;
101 using privvec::difference_type;
104 using privvec::begin;
108 using privvec::resize;
109 using privvec::empty;
110 using privvec::reserve;
111 using privvec::operator[];
114 using privvec::push_back;
115 using privvec::emplace_back;
116 using privvec::erase;
149 return static_cast<unsigned int>(
getMetaValue(
"channel_id")) + 1;
153 if (experiment_type !=
"label-free")
157 OPENMS_LOG_WARN <<
"No channel id annotated in labelled consensusXML. Assuming only a single channel was used." << std::endl;
166 typedef std::vector<ConsensusFeature>
Base;
170 typedef std::vector<ConsensusFeature>::iterator
Iterator;
220 OPENMS_DLLAPI
void clear(
bool clear_meta_data =
true);
303 OPENMS_DLLAPI
void setDataProcessing(
const std::vector<DataProcessing>& processing_method);
334 template <
typename Type>
337 Size assignments = 0;
338 assignments += ((*this).*member_function)();
339 for (
Iterator iter = this->begin(); iter != this->end(); ++iter)
341 assignments += ((*iter).*member_function)();
347 template <
typename Type>
350 Size assignments = 0;
351 assignments += ((*this).*member_function)();
352 for (
ConstIterator iter = this->begin(); iter != this->end(); ++iter)
354 assignments += ((*iter).*member_function)();
ConsensusMap & operator=(const ConsensusMap &source)
Assignment operator.
void sortByQuality(bool reverse=false)
Sorts the peaks according to ascending quality.
Description of the columns in a consensus map.
Definition: ConsensusMap.h:126
Size applyMemberFunction(Size(Type::*member_function)())
Applies a member function of Type to the container itself and all consensus features....
Definition: ConsensusMap.h:335
String filename
File name of the mzML file.
Definition: ConsensusMap.h:136
unsigned getLabelAsUInt(const String &experiment_type) const
Definition: ConsensusMap.h:145
std::vector< ProteinIdentification > protein_identifications_
protein identifications
Definition: ConsensusMap.h:397
OPENMS_UINT64_TYPE UInt64
Unsigned integer type (64bit)
Definition: Types.h:77
void sortBySize()
Sorts with respect to the size (number of elements)
UInt64 unique_id
Unique id of the file.
Definition: ConsensusMap.h:143
void sortByPosition()
Lexicographically sorts the peaks by their position (First RT then m/z).
void updateRanges() override
Updates minimum and maximum position/intensity.
SplitMeta
Definition: ConsensusMap.h:118
std::vector< FeatureMap > split(SplitMeta mode=SplitMeta::DISCARD) const
splits ConsensusMap into its original FeatureMaps
A more convenient string class.
Definition: String.h:59
In-Memory representation of a mass spectrometry experiment.
Definition: MSExperiment.h:77
A base class defining a common interface for all classes having a unique id.
Definition: UniqueIdInterface.h:51
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
const String & getExperimentType() const
Non-mutable access to the experiment type.
void getPrimaryMSRunPath(StringList &toFill) const
returns the MS run path (stored in ColumnHeaders)
void sortByMaps()
Sorts with respect to the sets of maps covered by the consensus features (lexicographically).
#define OPENMS_LOG_WARN
Macro if a warning, a piece of information which should be read by the user, should be logged.
Definition: LogStream.h:460
void sortByIntensity(bool reverse=false)
Sorts the peaks according to ascending intensity.
void sortPeptideIdentificationsByMapIndex()
Sorts PeptideIdentifications of consensus features with respect to their map index.
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
Handles the management of a position and intensity range.
Definition: RangeManager.h:47
bool operator!=(const ConsensusMap &rhs) const
Equality operator.
Size size
Number of elements (features, peaks, ...). This is e.g. used to check for correct element indices whe...
Definition: ConsensusMap.h:141
Size applyMemberFunction(Size(Type::*member_function)() const) const
The "const" variant.
Definition: ConsensusMap.h:348
ConsensusMap & appendColumns(const ConsensusMap &rhs)
Add consensus map entries as new columns.
void swap(ConsensusMap &from)
Swaps the content of this map with the content of from.
std::vector< PeptideIdentification > unassigned_peptide_identifications_
unassigned peptide identifications (without feature)
Definition: ConsensusMap.h:400
A base class for random access containers for classes derived from UniqueIdInterface that adds functi...
Definition: UniqueIdIndexer.h:63
Manage source document information.
Definition: DocumentIdentifier.h:55
const std::vector< ProteinIdentification > & getProteinIdentifications() const
non-mutable access to the protein identifications
void setColumnHeaders(const ColumnHeaders &column_description)
Mutable access to the file descriptions.
std::vector< ConsensusFeature > privvec
Definition: ConsensusMap.h:91
std::vector< ConsensusFeature >::const_iterator ConstIterator
Non-mutable iterator.
Definition: ConsensusMap.h:172
ConsensusMap & appendRows(const ConsensusMap &rhs)
Add consensus map entries as new rows.
const std::vector< PeptideIdentification > & getUnassignedPeptideIdentifications() const
non-mutable access to the unassigned peptide identifications
String label
Label e.g. 'heavy' and 'light' for ICAT, or 'sample1' and 'sample2' for label-free quantitation.
Definition: ConsensusMap.h:138
void setProteinIdentifications(const std::vector< ProteinIdentification > &protein_identifications)
sets the protein identifications
std::ostream & operator<<(std::ostream &os, const AccurateMassSearchResult &amsr)
Log Stream Class.
Definition: LogStream.h:311
A container for consensus elements.
Definition: ConsensusMap.h:80
std::vector< String > StringList
Vector of String.
Definition: ListUtils.h:70
copy all meta values to all feature maps
void sortByRT()
Sorts the peaks to RT position.
~ConsensusMap() override
Destructor.
const ColumnHeaders & getColumnHeaders() const
Non-mutable access to the file descriptions.
ConsensusMap()
Default constructor.
const std::vector< DataProcessing > & getDataProcessing() const
returns a const reference to the description of the applied data processing
void clear(bool clear_meta_data=true)
Clears all data and meta data.
std::vector< ConsensusFeature >::iterator Iterator
Mutable iterator.
Definition: ConsensusMap.h:170
void setDataProcessing(const std::vector< DataProcessing > &processing_method)
sets the description of the applied data processing
copy all meta values to first feature map
void sortByMZ()
Sorts the peaks to m/z position.
std::vector< ConsensusFeature >::reverse_iterator ReverseIterator
Mutable reverse iterator.
Definition: ConsensusMap.h:174
std::vector< ConsensusFeature >::const_reverse_iterator ConstReverseIterator
Non-mutable reverse iterator.
Definition: ConsensusMap.h:176
Utilities for Feature and ConsensusMap.
Definition: MapUtilities.h:49
do not copy any meta values
RangeManager< 2 > RangeManagerType
Definition: ConsensusMap.h:167
String experiment_type_
type of experiment (label-free, labeled_MS1, labeled_MS2)
Definition: ConsensusMap.h:394
std::vector< ConsensusFeature > Base
Definition: ConsensusMap.h:166
bool isMapConsistent(Logger::LogStream *stream=nullptr) const
checks if the given maps are unique and all FeatureHandles actually refer to a registered map
bool operator==(const ConsensusMap &rhs) const
Equality operator.
std::vector< DataProcessing > data_processing_
applied data processing
Definition: ConsensusMap.h:403
void setExperimentType(const 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)
ColumnHeaders column_description_
Map from index to file description.
Definition: ConsensusMap.h:391
std::map< UInt64, ColumnHeader > ColumnHeaders
Definition: ConsensusMap.h:168
void setUnassignedPeptideIdentifications(const std::vector< PeptideIdentification > &unassigned_peptide_identifications)
sets the unassigned peptide identifications