|
OpenMS
2.5.0
|
Go to the documentation of this file.
48 #include <OpenMS/OpenMSConfig.h>
55 class PeptideIdentification;
57 class ProteinIdentification;
80 private std::vector<ConsensusFeature>,
89 typedef std::vector<ConsensusFeature>
privvec;
92 using privvec::value_type;
93 using privvec::iterator;
94 using privvec::const_iterator;
95 using privvec::size_type;
96 using privvec::pointer;
97 using privvec::reference;
98 using privvec::const_reference;
99 using privvec::difference_type;
102 using privvec::begin;
106 using privvec::resize;
107 using privvec::empty;
108 using privvec::reserve;
109 using privvec::operator[];
113 using privvec::push_back;
139 return static_cast<unsigned int>(
getMetaValue(
"channel_id")) + 1;
143 if (experiment_type !=
"label-free")
147 OPENMS_LOG_WARN <<
"No channel id annotated in labelled consensusXML. Assuming only a single channel was used." << std::endl;
156 typedef std::vector<ConsensusFeature>
Base;
160 typedef std::vector<ConsensusFeature>::iterator
Iterator;
210 OPENMS_DLLAPI
void clear(
bool clear_meta_data =
true);
293 OPENMS_DLLAPI
void setDataProcessing(
const std::vector<DataProcessing>& processing_method);
336 template <
typename Type>
339 Size assignments = 0;
340 assignments += ((*this).*member_function)();
341 for (
Iterator iter = this->begin(); iter != this->end(); ++iter)
343 assignments += ((*iter).*member_function)();
349 template <
typename Type>
352 Size assignments = 0;
353 assignments += ((*this).*member_function)();
354 for (
ConstIterator iter = this->begin(); iter != this->end(); ++iter)
356 assignments += ((*iter).*member_function)();
const std::vector< PeptideIdentification > & getUnassignedPeptideIdentifications() const
non-mutable access to the unassigned peptide identifications
const std::vector< DataProcessing > & getDataProcessing() const
returns a const reference to the description of the applied data processing
void sortByQuality(bool reverse=false)
Sorts the peaks according to ascending quality.
ConsensusMap & appendColumns(const ConsensusMap &rhs)
Add consensus map entries as new columns.
void setColumnHeaders(const ColumnHeaders &column_description)
Mutable access to the file descriptions.
void clear(bool clear_meta_data=true)
Clears all data and meta data.
std::vector< DataProcessing > data_processing_
applied data processing
Definition: ConsensusMap.h:390
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
A base class for random access containers for classes derived from UniqueIdInterface that adds functi...
Definition: UniqueIdIndexer.h:63
Size size
Number of elements (features, peaks, ...). This is e.g. used to check for correct element indices whe...
Definition: ConsensusMap.h:131
void sortByMZ()
Sorts the peaks to m/z position.
void setPrimaryMSRunPath(const StringList &s)
set the file paths to the primary MS run (stored in ColumnHeaders)
void setProteinIdentifications(const std::vector< ProteinIdentification > &protein_identifications)
sets the protein identifications
std::vector< ConsensusFeature >::const_iterator ConstIterator
Non-mutable iterator.
Definition: ConsensusMap.h:162
void sortByIntensity(bool reverse=false)
Sorts the peaks according to ascending intensity.
Handles the management of a position and intensity range.
Definition: RangeManager.h:47
RangeManager< 2 > RangeManagerType
Definition: ConsensusMap.h:157
bool metaValueExists(const String &name) const
Returns whether an entry with the given name exists.
void sortBySize()
Sorts with respect to the size (number of elements)
void sortByRT()
Sorts the peaks to RT position.
const DataValue & getMetaValue(const String &name, const DataValue &default_value=DataValue::EMPTY) const
Returns the value corresponding to a string, or a default value (default: DataValue::EMPTY) if not fo...
std::vector< ConsensusFeature >::reverse_iterator ReverseIterator
Mutable reverse iterator.
Definition: ConsensusMap.h:164
void sortByPosition()
Lexicographically sorts the peaks by their position (First RT then m/z).
String filename
File name of the mzML file.
Definition: ConsensusMap.h:126
Log Stream Class.
Definition: LogStream.h:311
void applyFunctionOnPeptideIDs_(const std::vector< PeptideIdentification > &idvec, std::function< void(const PeptideIdentification &)> &f) const
void updateRanges() override
Updates minimum and maximum position/intensity.
std::vector< PeptideIdentification > unassigned_peptide_identifications_
unassigned peptide identifications (without feature)
Definition: ConsensusMap.h:387
std::vector< String > StringList
Vector of String.
Definition: ListUtils.h:70
const std::vector< ProteinIdentification > & getProteinIdentifications() const
non-mutable access to the protein identifications
Size applyMemberFunction(Size(Type::*member_function)())
Applies a member function of Type to the container itself and all consensus features....
Definition: ConsensusMap.h:337
std::vector< ConsensusFeature > privvec
Definition: ConsensusMap.h:89
Description of the columns in a consensus map.
Definition: ConsensusMap.h:116
~ConsensusMap() override
Destructor.
String label
Label e.g. 'heavy' and 'light' for ICAT, or 'sample1' and 'sample2' for label-free quantitation.
Definition: ConsensusMap.h:128
std::vector< ProteinIdentification > protein_identifications_
protein identifications
Definition: ConsensusMap.h:384
void sortPeptideIdentificationsByMapIndex()
Sorts PeptideIdentifications of consensus features with respect to their map index.
Size applyMemberFunction(Size(Type::*member_function)() const) const
The "const" variant.
Definition: ConsensusMap.h:350
Interface for classes that can store arbitrary meta information (Type-Name-Value tuples).
Definition: MetaInfoInterface.h:60
A base class defining a common interface for all classes having a unique id.
Definition: UniqueIdInterface.h:51
std::vector< ConsensusFeature >::const_reverse_iterator ConstReverseIterator
Non-mutable reverse iterator.
Definition: ConsensusMap.h:166
String experiment_type_
type of experiment (label-free, labeled_MS1, labeled_MS2)
Definition: ConsensusMap.h:381
std::vector< ConsensusFeature >::iterator Iterator
Mutable iterator.
Definition: ConsensusMap.h:160
const ColumnHeaders & getColumnHeaders() const
Non-mutable access to the file descriptions.
A container for consensus elements.
Definition: ConsensusMap.h:79
bool isMapConsistent(Logger::LogStream *stream=nullptr) const
checks if the given maps are unique and all FeatureHandles actually refer to a registered map
In-Memory representation of a mass spectrometry experiment.
Definition: MSExperiment.h:77
void sortByMaps()
Sorts with respect to the sets of maps covered by the consensus features (lexicographically).
std::ostream & operator<<(std::ostream &os, const AccurateMassSearchResult &amsr)
bool operator!=(const ConsensusMap &rhs) const
Equality operator.
std::vector< ConsensusFeature > Base
Definition: ConsensusMap.h:156
ConsensusMap & operator=(const ConsensusMap &source)
Assignment operator.
void swap(ConsensusMap &from)
Swaps the content of this map with the content of from.
Represents the peptide hits for a spectrum.
Definition: PeptideIdentification.h:62
void applyFunctionOnPeptideHits(std::function< void(PeptideHit &)> &f, bool include_unassigned=true)
applies a function on all PeptideHits or only assigned ones
void getPrimaryMSRunPath(StringList &toFill) const
returns the MS run path (stored in ColumnHeaders)
void setDataProcessing(const std::vector< DataProcessing > &processing_method)
sets the description of the applied data processing
void setUnassignedPeptideIdentifications(const std::vector< PeptideIdentification > &unassigned_peptide_identifications)
sets the unassigned peptide identifications
ConsensusMap()
Default constructor.
unsigned getLabelAsUInt(const String &experiment_type) const
Definition: ConsensusMap.h:135
bool operator==(const ConsensusMap &rhs) const
Equality operator.
A more convenient string class.
Definition: String.h:58
Representation of a peptide hit.
Definition: PeptideHit.h:54
void applyFunctionOnPeptideHits_(const std::vector< PeptideIdentification > &idvec, std::function< void(const PeptideHit &)> &f) const
ColumnHeaders column_description_
Map from index to file description.
Definition: ConsensusMap.h:378
UInt64 unique_id
Unique id of the file.
Definition: ConsensusMap.h:133
void setExperimentType(const String &experiment_type)
Mutable access to the experiment type.
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
#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
ConsensusMap & appendRows(const ConsensusMap &rhs)
Add consensus map entries as new rows.
std::map< UInt64, ColumnHeader > ColumnHeaders
Definition: ConsensusMap.h:158
void applyFunctionOnPeptideIDs(std::function< void(PeptideIdentification &)> &f, bool include_unassigned=true)
applies a function on all PeptideIDs or only assigned ones
const String & getExperimentType() const
Non-mutable access to the experiment type.
Manage source document information.
Definition: DocumentIdentifier.h:55
OPENMS_UINT64_TYPE UInt64
Unsigned integer type (64bit)
Definition: Types.h:77