|
OpenMS
2.6.0
|
Go to the documentation of this file.
68 private std::vector<Peak1D>,
75 struct OPENMS_DLLAPI
RTLess :
public std::binary_function<MSSpectrum, MSSpectrum, bool>
85 Chunk(
Size start,
Size end,
bool sorted) : start(start), end(end), is_sorted(sorted) {}
91 void add(
bool is_sorted)
93 chunks_.emplace_back((chunks_.empty() ? 0 : chunks_.back().end), spec_.size(), is_sorted);
125 typedef typename ContainerType::iterator
Iterator;
137 using ContainerType::operator[];
138 using ContainerType::begin;
139 using ContainerType::rbegin;
140 using ContainerType::end;
141 using ContainerType::rend;
142 using ContainerType::resize;
143 using ContainerType::size;
144 using ContainerType::push_back;
145 using ContainerType::emplace_back;
146 using ContainerType::pop_back;
147 using ContainerType::empty;
148 using ContainerType::front;
149 using ContainerType::back;
150 using ContainerType::reserve;
151 using ContainerType::insert;
152 using ContainerType::erase;
153 using ContainerType::swap;
155 using typename ContainerType::iterator;
156 using typename ContainerType::const_iterator;
157 using typename ContainerType::size_type;
158 using typename ContainerType::value_type;
159 using typename ContainerType::reference;
160 using typename ContainerType::const_reference;
161 using typename ContainerType::pointer;
162 using typename ContainerType::difference_type;
200 void updateRanges()
override;
205 double getRT()
const;
208 void setRT(
double rt);
218 double getDriftTime()
const;
223 void setDriftTime(
double dt);
228 DriftTimeUnit getDriftTimeUnit()
const;
233 void setDriftTimeUnit(DriftTimeUnit dt);
240 UInt getMSLevel()
const;
243 void setMSLevel(
UInt ms_level);
246 const String& getName()
const;
249 void setName(
const String& name);
266 const FloatDataArrays& getFloatDataArrays()
const;
272 return float_data_arrays_;
276 void setFloatDataArrays(
const FloatDataArrays& fda);
279 const StringDataArrays& getStringDataArrays()
const;
282 StringDataArrays& getStringDataArrays();
285 void setStringDataArrays(
const StringDataArrays& sda);
288 const IntegerDataArrays& getIntegerDataArrays()
const;
291 IntegerDataArrays& getIntegerDataArrays();
294 void setIntegerDataArrays(
const IntegerDataArrays& ida);
304 void sortByIntensity(
bool reverse =
false);
311 void sortByPosition();
317 void sortByPositionPresorted(
const std::vector<Chunk>& chunks);
320 bool isSorted()
const;
336 Size findNearest(CoordinateType mz)
const;
349 Int findNearest(CoordinateType mz, CoordinateType tolerance)
const;
364 Int findNearest(CoordinateType mz, CoordinateType tolerance_left, CoordinateType tolerance_right)
const;
377 Int findHighestInWindow(CoordinateType mz, CoordinateType tolerance_left, CoordinateType tolerance_right)
const;
384 Iterator MZBegin(CoordinateType mz);
412 ConstIterator MZBegin(CoordinateType mz)
const;
419 ConstIterator MZBegin(ConstIterator begin, CoordinateType mz, ConstIterator end)
const;
426 ConstIterator MZEnd(CoordinateType mz)
const;
433 ConstIterator MZEnd(ConstIterator begin, CoordinateType mz, ConstIterator end)
const;
442 Iterator PosBegin(CoordinateType mz);
460 ConstIterator PosBegin(CoordinateType mz)
const;
469 ConstIterator PosBegin(ConstIterator begin, CoordinateType mz, ConstIterator end)
const;
496 ConstIterator PosEnd(CoordinateType mz)
const;
505 ConstIterator PosEnd(ConstIterator begin, CoordinateType mz, ConstIterator end)
const;
508 bool containsIMData()
const;
518 void clear(
bool clear_meta_data);
527 MSSpectrum& select(
const std::vector<Size>& indices);
545 ConstIterator getBasePeak()
const;
582 os <<
"-- MSSPECTRUM BEGIN --" << std::endl;
585 os << static_cast<const SpectrumSettings&>(spec);
590 os << *it << std::endl;
593 os <<
"-- MSSPECTRUM END --" << std::endl;
Peak2D PeakType
Definition: MassTrace.h:47
Integer data array class.
Definition: DataArrays.h:52
PeakType::CoordinateType CoordinateType
Coordinate (m/z) type.
Definition: MSSpectrum.h:109
~MSSpectrum() override
Destructor.
Definition: MSSpectrum.h:178
Base class for TOPP applications.
Definition: TOPPBase.h:144
void store(const String &filename, const ConsensusMap &consensus_map)
Stores a consensus map to file.
void store(const String &filename, const std::vector< ProteinIdentification > &protein_ids, const std::vector< PeptideIdentification > &peptide_ids, const String &document_id="")
Stores the data in an idXML file.
bool is_sorted
are the Peaks in [start, end) sorted yet?
Definition: MSSpectrum.h:84
Comparator for the retention time.
Definition: MSSpectrum.h:75
void simulate(SimTypes::MutableSimRandomNumberGeneratorPtr rnd_gen, SimTypes::SampleChannels &peptides)
General purpose function to simulate a mass spectrometry run.
This class serves for reading in and writing FASTA files.
Definition: FASTAFile.h:64
void store(const String &filename, const PeakMap &map) const
Stores a map in an MzML file.
Precursor::DriftTimeUnit DriftTimeUnit
Definition: MSSpectrum.h:164
Central class for simulation of mass spectrometry experiments.
Definition: MSSim.h:68
void setValue(const String &key, const DataValue &value, const String &description="", const StringList &tags=StringList())
Sets a value.
DriftTimeUnit drift_time_unit_
Drift time unit.
Definition: MSSpectrum.h:562
File adapter for MzML files.
Definition: MzMLFile.h:55
A more convenient string class.
Definition: String.h:59
const SimTypes::FeatureMapSim & getContaminants() const
Access the contaminants feature map of simulated features.
void setValidStrings(const String &key, const std::vector< String > &strings)
Sets the valid strings for the parameter key.
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
static bool contains(const std::vector< T > &container, const E &elem)
Checks whether the element elem is contained in the given container.
Definition: ListUtils.h:146
std::vector< SimProtein > SampleProteins
Container for FASTAEntry & abundance information.
Definition: SimTypes.h:90
ConsensusMap & getLabelingConsensus()
Access the labeling consensus map of simulated features.
OpenMS::DataArrays::IntegerDataArray IntegerDataArray
Integer data array vector type.
Definition: MSSpectrum.h:119
boost::shared_ptr< SimRandomNumberGenerator > MutableSimRandomNumberGeneratorPtr
Definition: SimTypes.h:174
std::vector< StringDataArray > StringDataArrays
Definition: MSSpectrum.h:117
Wrapper class for random number generators used by the simulation classes.
Definition: SimTypes.h:118
bool operator!=(const MSSpectrum &rhs) const
Equality operator.
Definition: MSSpectrum.h:194
std::vector< SampleProteins > SampleChannels
Container for multiple channels of SampleProteins.
Definition: SimTypes.h:93
String name_
Name.
Definition: MSSpectrum.h:568
Exception indicating that an invalid parameter was handed over to an algorithm.
Definition: Exception.h:347
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
Handles the management of a position and intensity range.
Definition: RangeManager.h:47
std::vector< Chunk > & getChunks()
Definition: MSSpectrum.h:95
IntegerDataArrays integer_data_arrays_
Integer data arrays.
Definition: MSSpectrum.h:577
SpectrumType
Spectrum peak type.
Definition: SpectrumSettings.h:70
StringDataArrays string_data_arrays_
String data arrays.
Definition: MSSpectrum.h:574
double getClockTime() const
const MSSpectrum & spec_
Definition: MSSpectrum.h:101
const SimTypes::MSSimExperiment & getPeakMap() const
Access the picked (centroided) experiment.
void start()
Start the stop watch.
Size start
inclusive
Definition: MSSpectrum.h:82
Used to remember what subsets in a spectrum are sorted already to allow faster sorting of the spectru...
Definition: MSSpectrum.h:81
SpectrumType getType() const
returns the spectrum type (centroided (PEAKS) or profile data (RAW))
std::vector< IntegerDataArray > IntegerDataArrays
Definition: MSSpectrum.h:120
void stop()
Stop the stop watch (can be resumed later). If the stop watch was not running an exception is thrown.
void setParameters(const Param ¶m)
Sets the parameters.
ConsensusMap & getChargeConsensus()
Access the charge consensus map of simulated features.
bool find(TFinder &finder, const Pattern< TNeedle, FuzzyAC > &me, PatternAuxData< TNeedle > &dh)
Definition: AhoCorasickAmbiguous.h:884
String data array class.
Definition: DataArrays.h:59
String & toUpper()
Converts the string to uppercase.
A 1-dimensional raw data point or peak.
Definition: Peak1D.h:54
std::ostream & operator<<(std::ostream &os, const AccurateMassSearchResult &amsr)
Stores Citations for individual TOPP tools.
Definition: TOPPBase.h:70
A container for consensus elements.
Definition: ConsensusMap.h:80
std::vector< String > StringList
Vector of String.
Definition: ListUtils.h:70
void store(const String &filename, const FeatureMap &feature_map)
stores the map feature_map in file with name filename.
unsigned int UInt
Unsigned integer type.
Definition: Types.h:94
This class is used to determine the current process' CPU (user and/or kernel) and wall time.
Definition: StopWatch.h:65
std::vector< FloatDataArray > FloatDataArrays
Definition: MSSpectrum.h:114
DriftTimeUnit
Drift time unit.
Definition: Precursor.h:84
FloatDataArrays & getFloatDataArrays()
Returns a mutable reference to the float meta data arrays.
Definition: MSSpectrum.h:270
int main(int argc, const char **argv)
Definition: INIFileEditor.cpp:73
Plain data object holding sequence and abundance information on a single protein.
Definition: SimTypes.h:73
Size end
not inclusive
Definition: MSSpectrum.h:83
const ColumnHeaders & getColumnHeaders() const
Non-mutable access to the file descriptions.
double retention_time_
Retention time.
Definition: MSSpectrum.h:556
void add(bool is_sorted)
Definition: MSSpectrum.h:91
double drift_time_
Drift time.
Definition: MSSpectrum.h:559
void setSectionDescription(const String &key, const String &description)
Sets a description for an existing section.
#define OPENMS_LOG_ERROR
Macro to be used if non-fatal error are reported (processing continues)
Definition: LogStream.h:455
bool operator==(const IDBoostGraph::ProteinGroup &lhs, const IDBoostGraph::ProteinGroup &rhs)
static void load(const String &filename, std::vector< FASTAEntry > &data)
loads a FASTA file given by 'filename' and stores the information in 'data'
This class provides Input/Output functionality for feature maps.
Definition: FeatureXMLFile.h:68
const SimTypes::FeatureMapSim & getSimulatedFeatures() const
Access the simulated features.
UInt ms_level_
MS level.
Definition: MSSpectrum.h:565
FloatDataArrays float_data_arrays_
Float data arrays.
Definition: MSSpectrum.h:571
Chunk(Size start, Size end, bool sorted)
Definition: MSSpectrum.h:85
Representation of 1D spectrum settings.
Definition: SpectrumSettings.h:63
Management and storage of parameters / INI files.
Definition: Param.h:73
std::vector< PeakType > ContainerType
Spectrum base type.
Definition: MSSpectrum.h:111
ContainerType::iterator Iterator
Mutable iterator.
Definition: MSSpectrum.h:126
OpenMS::DataArrays::StringDataArray StringDataArray
String data array vector type.
Definition: MSSpectrum.h:116
ContainerType::const_iterator ConstIterator
Non-mutable iterator.
Definition: MSSpectrum.h:128
ContainerType::reverse_iterator ReverseIterator
Mutable reverse iterator.
Definition: MSSpectrum.h:130
OpenMS::DataArrays::FloatDataArray FloatDataArray
Float data array vector type.
Definition: MSSpectrum.h:113
The representation of a 1D spectrum.
Definition: MSSpectrum.h:67
ContainerType::const_reverse_iterator ConstReverseIterator
Non-mutable reverse iterator.
Definition: MSSpectrum.h:132
Float data array class.
Definition: DataArrays.h:45
void insert(const String &prefix, const Param ¶m)
std::vector< Chunk > chunks_
Definition: MSSpectrum.h:100
UInt64 getUniqueId() const
Non-mutable access to unique id - returns the unique id.
Definition: UniqueIdInterface.h:105
void setLogType(LogType type) const
Sets the progress log that should be used. The default type is NONE!
Chunks(const MSSpectrum &s)
Definition: MSSpectrum.h:90
void getIdentifications(std::vector< ProteinIdentification > &proteins, std::vector< PeptideIdentification > &peptides) const
Access the simulated identifications (proteins and peptides)
This class provides Input functionality for ConsensusMaps and Output functionality for alignments and...
Definition: ConsensusXMLFile.h:62
Used to load and store idXML files.
Definition: IdXMLFile.h:63
const SimTypes::MSSimExperiment & getExperiment() const
Access the simulated experiment.
Definition: MSSpectrum.h:88