OpenMS  2.8.0
Public Member Functions | List of all members
LayerDataPeak Class Reference

Class that stores the data for one layer of type PeakMap. More...

#include <OpenMS/VISUAL/LayerDataPeak.h>

Inheritance diagram for LayerDataPeak:
[legend]
Collaboration diagram for LayerDataPeak:
[legend]

Public Member Functions

 LayerDataPeak ()
 Default constructor. More...
 
 LayerDataPeak (const LayerDataPeak &ld)=delete
 no Copy-ctor (should not be needed) More...
 
LayerDataPeakoperator= (const LayerDataPeak &ld)=delete
 no assignment operator (should not be needed) More...
 
 LayerDataPeak (LayerDataPeak &&ld)=default
 move Ctor More...
 
LayerDataPeakoperator= (LayerDataPeak &&ld)=default
 move assignment More...
 
std::unique_ptr< Painter1DBasegetPainter1D () const override
 
void updateRanges () override
 Update ranges of the underlying data. More...
 
RangeAllType getRange () const override
 
std::unique_ptr< LayerStatisticsgetStats () const override
 compute layer statistics (via visitor) More...
 
- Public Member Functions inherited from LayerDataBase
 LayerDataBase ()=delete
 Default constructor. More...
 
 LayerDataBase (const DataType type)
 C'tor for child classes. More...
 
 LayerDataBase (const LayerDataBase &ld)=delete
 no Copy-ctor (should not be needed) More...
 
LayerDataBaseoperator= (const LayerDataBase &ld)=delete
 no assignment operator (should not be needed) More...
 
 LayerDataBase (LayerDataBase &&ld)=default
 move C'tor More...
 
LayerDataBaseoperator= (LayerDataBase &&ld)=default
 move assignment More...
 
virtual ~LayerDataBase ()=default
 D'tor. More...
 
const FeatureMapSharedPtrTypegetFeatureMap () const
 Returns a const reference to the current feature data. More...
 
FeatureMapSharedPtrTypegetFeatureMap ()
 Returns a const reference to the current feature data. More...
 
const ConsensusMapSharedPtrTypegetConsensusMap () const
 Returns a const reference to the consensus feature data. More...
 
ConsensusMapSharedPtrTypegetConsensusMap ()
 Returns current consensus map (mutable) More...
 
const ConstExperimentSharedPtrType getPeakData () const
 Returns a const reference to the current in-memory peak data. More...
 
const ExperimentSharedPtrTypegetPeakDataMuteable ()
 Returns a mutable reference to the current in-memory peak data. More...
 
void setPeakData (ExperimentSharedPtrType p)
 Set the current in-memory peak data. More...
 
void setOnDiscPeakData (ODExperimentSharedPtrType p)
 Set the current on-disc data. More...
 
const ODExperimentSharedPtrTypegetOnDiscPeakData () const
 Returns a mutable reference to the on-disc data. More...
 
const ExperimentSharedPtrTypegetChromatogramData () const
 Returns a mutable reference to the current chromatogram data. More...
 
ExperimentSharedPtrTypegetChromatogramData ()
 Returns a mutable reference to the current chromatogram data. More...
 
OSWDataSharedPtrTypegetChromatogramAnnotation ()
 
const OSWDataSharedPtrTypegetChromatogramAnnotation () const
 
void setChromatogramAnnotation (OSWData &&data)
 add annotation from an OSW sqlite file. More...
 
bool annotate (const std::vector< PeptideIdentification > &identifications, const std::vector< ProteinIdentification > &protein_identifications)
 
const Annotations1DContainergetCurrentAnnotations () const
 Returns a const reference to the annotations of the current spectrum (1D view) More...
 
Annotations1DContainergetCurrentAnnotations ()
 Returns a mutable reference to the annotations of the current spectrum (1D view) More...
 
const Annotations1DContainergetAnnotations (Size spectrum_index) const
 Returns a const reference to the annotations of the current spectrum (1D view) More...
 
Annotations1DContainergetAnnotations (Size spectrum_index)
 Returns a mutable reference to the annotations of the current spectrum (1D view) More...
 
const ExperimentType::SpectrumTypegetCurrentSpectrum () const
 Returns a const reference to the current spectrum (1D view) More...
 
void sortCurrentSpectrumByPosition ()
 
const ExperimentType::SpectrumType getSpectrum (Size spectrum_idx) const
 Returns a const-copy of the required spectrum which is guaranteed to be populated with raw data. More...
 
Size getCurrentSpectrumIndex () const
 Get the index of the current spectrum (1D view) More...
 
void setCurrentSpectrumIndex (Size index)
 Set the index of the current spectrum (1D view) More...
 
ExperimentSharedPtrType getFullChromData ()
 
bool isIonMobilityData () const
 Check whether the current layer should be represented as ion mobility. More...
 
void labelAsIonMobilityData () const
 
bool isDIAData () const
 Check whether the current layer contains DIA (SWATH-MS) data. More...
 
void labelAsDIAData ()
 Label the current layer as DIA (SWATH-MS) data. More...
 
bool chromatogram_flag_set () const
 Check whether the current layer is a chromatogram. More...
 
void set_chromatogram_flag ()
 set the chromatogram flag More...
 
void remove_chromatogram_flag ()
 remove the chromatogram flag More...
 
float getMinIntensity () const
 Returns the minimum intensity of the internal data, depending on type. More...
 
float getMaxIntensity () const
 Returns the maximum intensity of the internal data, depending on type. More...
 
void synchronizePeakAnnotations ()
 
void removePeakAnnotationsFromPeptideHit (const std::vector< Annotation1DItem * > &selected_annotations)
 remove peak annotations in the given list from the currently active PeptideHit More...
 
const StringgetName () const
 
void setName (const String &new_name)
 
String getDecoratedName () const
 get name augmented with attributes, e.g. [flipped], or '*' if modified More...
 

Additional Inherited Members

- Public Types inherited from LayerDataBase
enum  DataType {
  DT_PEAK , DT_CHROMATOGRAM , DT_FEATURE , DT_CONSENSUS ,
  DT_IDENT , DT_UNKNOWN
}
 
enum  Flags {
  F_HULL , F_HULLS , F_UNASSIGNED , P_PRECURSORS ,
  P_PROJECTIONS , C_ELEMENTS , I_PEPTIDEMZ , I_LABELS ,
  SIZE_OF_FLAGS
}
 Flags that determine which information is shown. More...
 
enum  LabelType {
  L_NONE , L_INDEX , L_META_LABEL , L_ID ,
  L_ID_ALL , SIZE_OF_LABEL_TYPE
}
 Label used in visualization. More...
 
typedef FeatureMap FeatureMapType
 Features. More...
 
typedef boost::shared_ptr< FeatureMapFeatureMapSharedPtrType
 SharedPtr on feature map. More...
 
typedef ConsensusMap ConsensusMapType
 consensus features More...
 
typedef boost::shared_ptr< ConsensusMapConsensusMapSharedPtrType
 SharedPtr on consensus features. More...
 
typedef PeakMap ExperimentType
 Main data type (experiment) More...
 
typedef boost::shared_ptr< ExperimentTypeExperimentSharedPtrType
 SharedPtr on MSExperiment. More...
 
typedef boost::shared_ptr< const ExperimentTypeConstExperimentSharedPtrType
 
typedef boost::shared_ptr< OnDiscMSExperimentODExperimentSharedPtrType
 SharedPtr on On-Disc MSExperiment. More...
 
typedef boost::shared_ptr< OSWDataOSWDataSharedPtrType
 SharedPtr on OSWData. More...
 
using RangeAllType = RangeManager< RangeRT, RangeMZ, RangeIntensity, RangeMobility >
 
- Public Attributes inherited from LayerDataBase
std::bitset< SIZE_OF_FLAGSflags
 Actual state of each flag. More...
 
bool visible = true
 if this layer is visible More...
 
bool flipped = false
 if this layer is flipped (1d mirror view) More...
 
DataType type = DT_UNKNOWN
 data type (peak or feature data) More...
 
String filename
 file name of the file the data comes from (if available) More...
 
Param param
 Layer parameters. More...
 
MultiGradient gradient
 Gradient for 2D and 3D views. More...
 
DataFilters filters
 Filters to apply before painting. More...
 
std::vector< Annotations1DContainerannotations_1d = std::vector<Annotations1DContainer>(1)
 Annotations of all spectra of the experiment (1D view) More...
 
std::vector< QColor > peak_colors_1d
 Peak colors of the currently shown spectrum. More...
 
bool modifiable = false
 Flag that indicates if the layer data can be modified (so far used for features only) More...
 
bool modified = false
 Flag that indicates that the layer data was modified since loading it. More...
 
LabelType label = L_NONE
 Label type. More...
 
int peptide_id_index = -1
 Selected peptide id and hit index (-1 if none is selected) More...
 
int peptide_hit_index = -1
 
- Static Public Attributes inherited from LayerDataBase
static const std::string NamesOfLabelType [SIZE_OF_LABEL_TYPE]
 Label names. More...
 
- Protected Member Functions inherited from LayerDataBase
void updateCache_ ()
 Update current cached spectrum for easy retrieval. More...
 
void updatePeptideHitAnnotations_ (PeptideHit &hit)
 updates the PeakAnnotations in the current PeptideHit with manually changed annotations More...
 
- Protected Attributes inherited from LayerDataBase
FeatureMapSharedPtrType features_ = FeatureMapSharedPtrType(new FeatureMapType())
 feature data More...
 
ConsensusMapSharedPtrType consensus_map_ = ConsensusMapSharedPtrType(new ConsensusMapType())
 consensus feature data More...
 
ExperimentSharedPtrType peak_map_ = ExperimentSharedPtrType(new ExperimentType())
 peak data More...
 
ODExperimentSharedPtrType on_disc_peaks = ODExperimentSharedPtrType(new OnDiscMSExperiment())
 on disc peak data More...
 
ExperimentSharedPtrType chromatogram_map_ = ExperimentSharedPtrType(new ExperimentType())
 chromatogram data More...
 
OSWDataSharedPtrType chrom_annotation_
 Chromatogram annotation data. More...
 
Size current_spectrum_idx_ = 0
 Index of the current spectrum. More...
 
ExperimentType::SpectrumType cached_spectrum_
 Current cached spectrum. More...
 

Detailed Description

Class that stores the data for one layer of type PeakMap.

Constructor & Destructor Documentation

◆ LayerDataPeak() [1/3]

Default constructor.

◆ LayerDataPeak() [2/3]

LayerDataPeak ( const LayerDataPeak ld)
delete

no Copy-ctor (should not be needed)

◆ LayerDataPeak() [3/3]

LayerDataPeak ( LayerDataPeak &&  ld)
default

move Ctor

Member Function Documentation

◆ getPainter1D()

std::unique_ptr<Painter1DBase> getPainter1D ( ) const
overridevirtual

Implements LayerDataBase.

◆ getRange()

RangeAllType getRange ( ) const
inlineoverridevirtual

Returns the data range in all known dimensions. If a layer does not support the dimension (or the layer is empty) the dimension will be empty

Implements LayerDataBase.

References RangeManager< RangeBases >::assign().

◆ getStats()

std::unique_ptr<LayerStatistics> getStats ( ) const
overridevirtual

compute layer statistics (via visitor)

Implements LayerDataBase.

◆ operator=() [1/2]

LayerDataPeak& operator= ( const LayerDataPeak ld)
delete

no assignment operator (should not be needed)

◆ operator=() [2/2]

LayerDataPeak& operator= ( LayerDataPeak &&  ld)
default

move assignment

◆ updateRanges()

void updateRanges ( )
inlineoverridevirtual

Update ranges of the underlying data.

Implements LayerDataBase.