21 class Annotation1DItem;
44 std::unique_ptr<LayerData1DBase>
to1DLayer()
const override;
56 peak_map_->updateRanges();
71 std::unique_ptr<LayerStatistics>
getStats()
const override;
73 bool annotate(
const std::vector<PeptideIdentification>& identifications,
const std::vector<ProteinIdentification>& protein_identifications)
override;
77 if ((*peak_map_)[spectrum_idx].size() > 0)
79 return (*peak_map_)[spectrum_idx];
81 if (!on_disc_peaks_->empty())
84 local_spec = on_disc_peaks_->getSpectrum(spectrum_idx);
87 return (*peak_map_)[spectrum_idx];
132 return on_disc_peaks_;
140 return this->getPeakData()->size() > 0 && this->getPeakData()->metaValueExists(
"is_ion_mobility") && this->getPeakData()->getMetaValue(
"is_ion_mobility").toBool();
145 peak_map_->setMetaValue(
"is_ion_mobility",
"true");
151 return this->getPeakData()->size() > 0 && this->getPeakData()->metaValueExists(
"is_dia_data") && this->getPeakData()->getMetaValue(
"is_dia_data").toBool();
157 peak_map_->setMetaValue(
"is_dia_data",
"true");
170 return this->getPeakData()->size() > 0 && this->getPeakData()->metaValueExists(
"is_chromatogram") && this->getPeakData()->getMetaValue(
"is_chromatogram").toBool();
176 peak_map_->setMetaValue(
"is_chromatogram",
"true");
182 if (this->chromatogram_flag_set())
184 peak_map_->removeMetaValue(
"is_chromatogram");
DataFilter array providing some convenience functions.
Definition: DataFilters.h:27
Class that stores the data for one layer.
Definition: LayerDataBase.h:169
Class that stores the data for one layer of type PeakMap.
Definition: LayerDataPeak.h:29
void remove_chromatogram_flag()
remove the chromatogram flag
Definition: LayerDataPeak.h:180
LayerDataPeak()
Default constructor.
std::unique_ptr< LayerStatistics > getStats() const override
Compute layer statistics (via visitor)
std::unique_ptr< LayerStoreData > storeFullData() const override
Returns a visitor which contains the the full data of the layer and can write the data to disk in the...
bool isDIAData() const
Check whether the current layer contains DIA (SWATH-MS) data.
Definition: LayerDataPeak.h:149
void set_chromatogram_flag()
set the chromatogram flag
Definition: LayerDataPeak.h:174
void setOnDiscPeakData(ODExperimentSharedPtrType p)
Set the current on-disc data.
Definition: LayerDataPeak.h:124
const ConstExperimentSharedPtrType getPeakData() const
Returns a const reference to the current in-memory peak data.
bool isIonMobilityData() const
Check whether the current layer should be represented as ion mobility.
Definition: LayerDataPeak.h:138
PeakIndex findHighestDataPoint(const RangeAllType &area) const override
Find the datapoint with the highest intensity within the given range and return a proxy to that datap...
bool annotate(const std::vector< PeptideIdentification > &identifications, const std::vector< ProteinIdentification > &protein_identifications) override
const ExperimentSharedPtrType & getPeakDataMuteable()
Returns a mutable reference to the current in-memory peak data.
Definition: LayerDataPeak.h:110
bool chromatogram_flag_set() const
Check whether the current layer is a chromatogram.
Definition: LayerDataPeak.h:168
std::unique_ptr< LayerData1DBase > to1DLayer() const override
Create a shallow copy (i.e. shared experimental data using shared_ptr) of the current layer,...
void setPeakData(ExperimentSharedPtrType p)
Set the current in-memory peak data.
Definition: LayerDataPeak.h:118
const ODExperimentSharedPtrType & getOnDiscPeakData() const
Returns a mutable reference to the on-disc data.
Definition: LayerDataPeak.h:130
void labelAsIonMobilityData() const
Definition: LayerDataPeak.h:143
PointXYType peakIndexToXY(const PeakIndex &peak, const DimMapper< 2 > &mapper) const override
Convert a PeakIndex to a XY coordinate (via mapper).
const ExperimentType::SpectrumType & getSpectrum(Size spectrum_idx) const
Definition: LayerDataPeak.h:75
ProjectionData getProjection(const DIM_UNIT unit_x, const DIM_UNIT unit_y, const RangeAllType &area) const override
RangeAllType getRange() const override
Definition: LayerDataPeak.h:60
LayerDataPeak(const LayerDataPeak &ld)=default
Copy-ctor.
std::unique_ptr< LayerStoreData > storeVisibleData(const RangeAllType &visible_range, const DataFilters &layer_filters) const override
Returns a visitor which contains the current visible data and can write the data to disk.
LayerDataPeak & operator=(const LayerDataPeak &ld)=delete
no assignment operator (should not be needed)
std::unique_ptr< Painter2DBase > getPainter2D() const override
Obtain a painter which can draw the layer on a 2D canvas.
void updateRanges() override
Update ranges of the underlying data.
Definition: LayerDataPeak.h:54
String getDataArrayDescription(const PeakIndex &peak_index) override
Get name and value of all data-arrays corresponding to the given datapoint.
void labelAsDIAData()
Label the current layer as DIA (SWATH-MS) data.
Definition: LayerDataPeak.h:155
In-Memory representation of a mass spectrometry run.
Definition: MSExperiment.h:46
The representation of a 1D spectrum.
Definition: MSSpectrum.h:44
OpenMS::Peak1D PeakType
Peak type.
Definition: MSSpectrum.h:86
Representation of a mass spectrometry experiment on disk.
Definition: OnDiscMSExperiment.h:41
A 1-dimensional raw data point or peak.
Definition: Peak1D.h:28
auto & assign(const RangeManager< RangeBasesOther... > &rhs)
Definition: RangeManager.h:586
A more convenient string class.
Definition: String.h:34
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:101
MSSpectrum SpectrumType
Definition: MzDataHandler.h:34
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:22
DIM_UNIT
Definition: CommonEnums.h:20
Result of computing a projection on X and Y axis in a 2D Canvas; see LayerDataBase::getProjection()
Definition: LayerDataBase.h:51
boost::shared_ptr< ExperimentType > ExperimentSharedPtrType
SharedPtr on MSExperiment.
Definition: LayerDataBase.h:126
boost::shared_ptr< OnDiscMSExperiment > ODExperimentSharedPtrType
SharedPtr on On-Disc MSExperiment.
Definition: LayerDataBase.h:131
boost::shared_ptr< const ExperimentType > ConstExperimentSharedPtrType
Definition: LayerDataBase.h:128
Index of a peak or feature.
Definition: PeakIndex.h:25