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;
123 ColumnHeader(
const ColumnHeader&);
137 if (metaValueExists(
"channel_id"))
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);
213 OPENMS_DLLAPI
const ColumnHeaders& getColumnHeaders()
const;
216 OPENMS_DLLAPI ColumnHeaders& getColumnHeaders();
219 OPENMS_DLLAPI
void setColumnHeaders(
const ColumnHeaders& column_description);
222 OPENMS_DLLAPI
const String& getExperimentType()
const;
225 OPENMS_DLLAPI
void setExperimentType(
const String& experiment_type);
234 OPENMS_DLLAPI
void sortByIntensity(
bool reverse =
false);
238 OPENMS_DLLAPI
void sortByRT();
241 OPENMS_DLLAPI
void sortByMZ();
244 OPENMS_DLLAPI
void sortByPosition();
247 OPENMS_DLLAPI
void sortByQuality(
bool reverse =
false);
250 OPENMS_DLLAPI
void sortBySize();
253 OPENMS_DLLAPI
void sortByMaps();
256 OPENMS_DLLAPI
void sortPeptideIdentificationsByMapIndex();
260 OPENMS_DLLAPI
void updateRanges()
override;
266 OPENMS_DLLAPI
const std::vector<ProteinIdentification>& getProteinIdentifications()
const;
269 OPENMS_DLLAPI std::vector<ProteinIdentification>& getProteinIdentifications();
272 OPENMS_DLLAPI
void setProteinIdentifications(
const std::vector<ProteinIdentification>& protein_identifications);
275 OPENMS_DLLAPI
void setProteinIdentifications(std::vector<ProteinIdentification>&& protein_identifications);
278 OPENMS_DLLAPI
const std::vector<PeptideIdentification>& getUnassignedPeptideIdentifications()
const;
281 OPENMS_DLLAPI std::vector<PeptideIdentification>& getUnassignedPeptideIdentifications();
284 OPENMS_DLLAPI
void setUnassignedPeptideIdentifications(
const std::vector<PeptideIdentification>& unassigned_peptide_identifications);
287 OPENMS_DLLAPI
const std::vector<DataProcessing>& getDataProcessing()
const;
290 OPENMS_DLLAPI std::vector<DataProcessing>& getDataProcessing();
293 OPENMS_DLLAPI
void setDataProcessing(
const std::vector<DataProcessing>& processing_method);
296 OPENMS_DLLAPI
void setPrimaryMSRunPath(
const StringList& s);
303 OPENMS_DLLAPI
void getPrimaryMSRunPath(
StringList& toFill)
const;
306 OPENMS_DLLAPI
void applyFunctionOnPeptideHits(std::function<
void(
PeptideHit&)>& f,
bool include_unassigned =
true);
309 OPENMS_DLLAPI
void applyFunctionOnPeptideIDs(std::function<
void(
PeptideIdentification&)>& f,
bool include_unassigned =
true);
312 OPENMS_DLLAPI
void applyFunctionOnPeptideHits(std::function<
void(
const PeptideHit&)>&,
bool include_unassigned =
true)
const;
315 OPENMS_DLLAPI
void applyFunctionOnPeptideIDs(std::function<
void(
const PeptideIdentification&)>& f,
bool include_unassigned =
true)
const;
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)();
394 OPENMS_DLLAPI
void applyFunctionOnPeptideIDs_(
const std::vector<PeptideIdentification>& idvec, std::function<
void(
const PeptideIdentification&)>& f)
const;
396 OPENMS_DLLAPI
void applyFunctionOnPeptideHits_(
const std::vector<PeptideIdentification>& idvec, std::function<
void(
const PeptideHit&)>& f)
const;
398 OPENMS_DLLAPI
void applyFunctionOnPeptideIDs_(std::vector<PeptideIdentification>& idvec, std::function<
void(
PeptideIdentification&)>& f);
400 OPENMS_DLLAPI
void applyFunctionOnPeptideHits_(std::vector<PeptideIdentification>& idvec, std::function<
void(
PeptideHit&)>& f);
bool operator==(_Iterator< _Val, _Ref, _Ptr > const &, _Iterator< _Val, _Ref, _Ptr > const &)
Definition: KDTree.h:806
OPENMS_UINT64_TYPE UInt64
Unsigned integer type (64bit)
Definition: Types.h:77
std::vector< ProteinIdentification > protein_identifications_
protein identifications
Definition: ConsensusMap.h:384
std::vector< ConsensusFeature >::const_reverse_iterator ConstReverseIterator
Non-mutable reverse iterator.
Definition: ConsensusMap.h:166
std::vector< PeptideIdentification > unassigned_peptide_identifications_
unassigned peptide identifications (without feature)
Definition: ConsensusMap.h:387
String filename
File name of the mzML file.
Definition: ConsensusMap.h:126
ColumnHeaders column_description_
Map from index to file description.
Definition: ConsensusMap.h:378
String label
Label e.g. 'heavy' and 'light' for ICAT, or 'sample1' and 'sample2' for label-free quantitation...
Definition: ConsensusMap.h:128
Description of the columns in a consensus map.
Definition: ConsensusMap.h:116
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.
Definition: ConsensusMap.h:337
In-Memory representation of a mass spectrometry experiment.
Definition: MSExperiment.h:77
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
std::vector< ConsensusFeature >::iterator Iterator
Mutable iterator.
Definition: ConsensusMap.h:160
Handles the management of a position and intensity range.
Definition: RangeManager.h:47
std::vector< ConsensusFeature > privvec
Definition: ConsensusMap.h:89
bool operator!=(_Iterator< _Val, _Ref, _Ptr > const &, _Iterator< _Val, _Ref, _Ptr > const &)
Definition: KDTree.h:824
Size applyMemberFunction(Size(Type::*member_function)() const) const
The "const" variant.
Definition: ConsensusMap.h:350
Manage source document information.
Definition: DocumentIdentifier.h:55
std::vector< ConsensusFeature >::reverse_iterator ReverseIterator
Mutable reverse iterator.
Definition: ConsensusMap.h:164
Represents the peptide hits for a spectrum.
Definition: PeptideIdentification.h:62
std::vector< ConsensusFeature >::const_iterator ConstIterator
Non-mutable iterator.
Definition: ConsensusMap.h:162
std::vector< ConsensusFeature > Base
Definition: ConsensusMap.h:156
std::vector< String > StringList
Vector of String.
Definition: ListUtils.h:70
#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
A base class defining a common interface for all classes having a unique id.
Definition: UniqueIdInterface.h:51
RangeManager< 2 > RangeManagerType
Definition: ConsensusMap.h:157
Log Stream Class.
Definition: LogStream.h:311
std::vector< DataProcessing > data_processing_
applied data processing
Definition: ConsensusMap.h:390
Interface for classes that can store arbitrary meta information (Type-Name-Value tuples).
Definition: MetaInfoInterface.h:60
Representation of a peptide hit.
Definition: PeptideHit.h:54
UInt64 unique_id
Unique id of the file.
Definition: ConsensusMap.h:133
A more convenient string class.
Definition: String.h:58
A container for consensus elements.
Definition: ConsensusMap.h:79
A base class for random access containers for classes derived from UniqueIdInterface that adds functi...
Definition: UniqueIdIndexer.h:63
std::map< UInt64, ColumnHeader > ColumnHeaders
Definition: ConsensusMap.h:158
unsigned getLabelAsUInt(const String &experiment_type) const
Definition: ConsensusMap.h:135
Size size
Number of elements (features, peaks, ...). This is e.g. used to check for correct element indices whe...
Definition: ConsensusMap.h:131
std::ostream & operator<<(std::ostream &os, const AccurateMassSearchResult &amsr)
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46