Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
LayerData Class Reference

Class that stores the data for one layer. More...

#include <OpenMS/VISUAL/LayerData.h>

Public Member Functions

 LayerData ()
 Default constructor. More...
 
const ExperimentType::SpectrumTypegetCurrentSpectrum () const
 Returns a const reference to the current spectrum (1d view) 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 ExperimentSharedPtrTypegetPeakData () const
 Returns a const reference to the current peak data. More...
 
ExperimentSharedPtrTypegetPeakData ()
 Returns a mutable reference to the current peak data. More...
 
const ExperimentSharedPtrTypegetChromatogramData () const
 Returns a const reference to the current chromatogram data. More...
 
ExperimentSharedPtrTypegetChromatogramData ()
 Returns a mutable reference to the current chromatogram data. More...
 
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...
 
ExperimentType::SpectrumTypegetCurrentSpectrum ()
 Returns a mutable reference to the current spectrum (1d view) More...
 
Size getCurrentSpectrumIndex () const
 Get the index of the current spectrum. More...
 
void setCurrentSpectrumIndex (Size index)
 Set the index of the current spectrum. More...
 
bool chromatogram_flag_set () const
 Check whether the current layer is a chromatogram. More...
 
void set_chromatogram_flag ()
 
void remove_chromatogram_flag ()
 
void synchronizePeakAnnotations ()
 
void removePeakAnnotationsFromPeptideHit (const std::vector< Annotation1DItem *> &selected_annotations)
 remove peak annotations in the given list from the currently active PeptideHit More...
 

Public Attributes

bool visible
 if this layer is visible More...
 
bool flipped
 if this layer is flipped (1d mirror view) More...
 
DataType type
 data type (peak or feature data) More...
 
String name
 layer name More...
 
String filename
 file name of the file the data comes from (if available) More...
 
std::vector< PeptideIdentificationpeptides
 peptide identifications 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
 Annotations of all spectra of the experiment (1D view) More...
 
bool modifiable
 Flag that indicates if the layer data can be modified (so far used for features only) More...
 
bool modified
 Flag that indicates that the layer data was modified since loading it. More...
 
LabelType label
 Label type. More...
 
int peptide_id_index
 Selected peptide id and hit index (-1 if none is selected) More...
 
int peptide_hit_index
 

Private Member Functions

void updatePeptideHitAnnotations_ (PeptideHit &hit)
 updates the PeakAnnotations in the current PeptideHit with manually changed annotations More...
 

Private Attributes

FeatureMapSharedPtrType features
 feature data More...
 
ConsensusMapSharedPtrType consensus
 consensus feature data More...
 
ExperimentSharedPtrType peaks
 peak data More...
 
ExperimentSharedPtrType chromatograms
 chromatogram data More...
 
Size current_spectrum_
 Index of the current spectrum. More...
 

Type definitions

enum  DataType {
  DT_PEAK, DT_FEATURE, DT_CONSENSUS, DT_CHROMATOGRAM,
  DT_IDENT, DT_UNKNOWN
}
 Dataset types. More...
 
enum  Flags {
  F_HULL, F_HULLS, F_UNASSIGNED, P_PRECURSORS,
  P_PROJECTIONS, C_ELEMENTS, I_PEPTIDEMZ, 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...
 
std::bitset< SIZE_OF_FLAGSflags
 Actual state of each flag. More...
 
static const std::string NamesOfLabelType [SIZE_OF_LABEL_TYPE]
 Label names. More...
 

Detailed Description

Class that stores the data for one layer.

Member Typedef Documentation

◆ ConsensusMapSharedPtrType

typedef boost::shared_ptr<ConsensusMap> ConsensusMapSharedPtrType

SharedPtr on consensus features.

◆ ConsensusMapType

consensus features

◆ ExperimentSharedPtrType

typedef boost::shared_ptr<ExperimentType> ExperimentSharedPtrType

SharedPtr on MSExperiment.

◆ ExperimentType

Main data type (experiment)

◆ FeatureMapSharedPtrType

typedef boost::shared_ptr<FeatureMap > FeatureMapSharedPtrType

SharedPtr on feature map.

◆ FeatureMapType

Features.

Member Enumeration Documentation

◆ DataType

enum DataType

Dataset types.

Enumerator
DT_PEAK 

Spectrum profile or centroided data.

DT_FEATURE 

Feature data.

DT_CONSENSUS 

Consensus feature data.

DT_CHROMATOGRAM 

Chromatogram data.

DT_IDENT 

Peptide identification data.

DT_UNKNOWN 

Undefined data type indicating an error.

◆ Flags

enum Flags

Flags that determine which information is shown.

Enumerator
F_HULL 

Features: Overall convex hull.

F_HULLS 

Features: Convex hulls of single mass traces.

F_UNASSIGNED 

Features: Unassigned peptide hits.

P_PRECURSORS 

Peaks: Mark precursor peaks of MS/MS scans.

P_PROJECTIONS 

Peaks: Show projections.

C_ELEMENTS 

Consensus features: Show elements.

I_PEPTIDEMZ 

Identifications: m/z source.

SIZE_OF_FLAGS 

◆ LabelType

enum LabelType

Label used in visualization.

Enumerator
L_NONE 

No label is displayed.

L_INDEX 

The element number is used.

L_META_LABEL 

The 'label' meta information is used.

L_ID 

The best peptide hit of the first identification run is used.

L_ID_ALL 

All peptide hits of the first identification run are used.

SIZE_OF_LABEL_TYPE 

Constructor & Destructor Documentation

◆ LayerData()

LayerData ( )
inline

Default constructor.

References LayerData::annotations_1d, and LayerData::getCurrentSpectrum().

Member Function Documentation

◆ chromatogram_flag_set()

bool chromatogram_flag_set ( ) const
inline

Check whether the current layer is a chromatogram.

References LayerData::getPeakData().

Referenced by LayerData::remove_chromatogram_flag(), and TOPPViewBase::runTOPPTool_().

◆ getAnnotations() [1/2]

const Annotations1DContainer& getAnnotations ( Size  spectrum_index) const
inline

Returns a const reference to the annotations of the current spectrum (1d view)

References LayerData::annotations_1d.

◆ getAnnotations() [2/2]

Annotations1DContainer& getAnnotations ( Size  spectrum_index)
inline

Returns a mutable reference to the annotations of the current spectrum (1d view)

References LayerData::annotations_1d.

◆ getChromatogramData() [1/2]

const ExperimentSharedPtrType& getChromatogramData ( ) const
inline

Returns a const reference to the current chromatogram data.

References LayerData::chromatograms.

◆ getChromatogramData() [2/2]

ExperimentSharedPtrType& getChromatogramData ( )
inline

Returns a mutable reference to the current chromatogram data.

References LayerData::chromatograms.

◆ getConsensusMap() [1/2]

const ConsensusMapSharedPtrType& getConsensusMap ( ) const
inline

Returns a const reference to the consensus feature data.

References LayerData::consensus.

Referenced by TOPPViewBase::annotateWithID(), TOPPViewBase::copyLayer(), TOPPViewBase::fileChanged_(), and TOPPViewBase::runTOPPTool_().

◆ getConsensusMap() [2/2]

ConsensusMapSharedPtrType& getConsensusMap ( )
inline

Returns current consensus map (mutable)

References LayerData::consensus.

◆ getCurrentAnnotations() [1/2]

const Annotations1DContainer& getCurrentAnnotations ( ) const
inline

Returns a const reference to the annotations of the current spectrum (1d view)

References LayerData::annotations_1d, and LayerData::current_spectrum_.

◆ getCurrentAnnotations() [2/2]

Annotations1DContainer& getCurrentAnnotations ( )
inline

Returns a mutable reference to the annotations of the current spectrum (1d view)

References LayerData::annotations_1d, and LayerData::current_spectrum_.

◆ getCurrentSpectrum() [1/2]

const ExperimentType::SpectrumType& getCurrentSpectrum ( ) const

Returns a const reference to the current spectrum (1d view)

Referenced by LayerData::LayerData().

◆ getCurrentSpectrum() [2/2]

ExperimentType::SpectrumType& getCurrentSpectrum ( )
inline

Returns a mutable reference to the current spectrum (1d view)

References LayerData::current_spectrum_, and LayerData::peaks.

◆ getCurrentSpectrumIndex()

Size getCurrentSpectrumIndex ( ) const
inline

Get the index of the current spectrum.

References LayerData::current_spectrum_.

Referenced by TOPPViewBase::runTOPPTool_().

◆ getFeatureMap() [1/2]

const FeatureMapSharedPtrType& getFeatureMap ( ) const
inline

Returns a const reference to the current feature data.

References LayerData::features.

Referenced by TOPPViewBase::annotateWithID(), TOPPViewBase::copyLayer(), TOPPViewBase::fileChanged_(), and TOPPViewBase::runTOPPTool_().

◆ getFeatureMap() [2/2]

FeatureMapSharedPtrType& getFeatureMap ( )
inline

Returns a const reference to the current feature data.

References LayerData::features.

◆ getPeakData() [1/2]

const ExperimentSharedPtrType& getPeakData ( ) const
inline

◆ getPeakData() [2/2]

ExperimentSharedPtrType& getPeakData ( )
inline

Returns a mutable reference to the current peak data.

References LayerData::peaks.

◆ remove_chromatogram_flag()

void remove_chromatogram_flag ( )
inline

◆ removePeakAnnotationsFromPeptideHit()

void removePeakAnnotationsFromPeptideHit ( const std::vector< Annotation1DItem *> &  selected_annotations)

remove peak annotations in the given list from the currently active PeptideHit

Referenced by LayerData::remove_chromatogram_flag().

◆ set_chromatogram_flag()

void set_chromatogram_flag ( )
inline

◆ setCurrentSpectrumIndex()

void setCurrentSpectrumIndex ( Size  index)
inline

Set the index of the current spectrum.

References LayerData::current_spectrum_.

◆ synchronizePeakAnnotations()

void synchronizePeakAnnotations ( )

updates the PeakAnnotations in the current PeptideHit with manually changed annotations if no PeptideIdentification or PeptideHit for the spectrum exist, it is generated

Referenced by LayerData::remove_chromatogram_flag().

◆ updatePeptideHitAnnotations_()

void updatePeptideHitAnnotations_ ( PeptideHit hit)
private

updates the PeakAnnotations in the current PeptideHit with manually changed annotations

Member Data Documentation

◆ annotations_1d

std::vector<Annotations1DContainer> annotations_1d

Annotations of all spectra of the experiment (1D view)

Referenced by LayerData::getAnnotations(), LayerData::getCurrentAnnotations(), and LayerData::LayerData().

◆ chromatograms

ExperimentSharedPtrType chromatograms
private

chromatogram data

Referenced by LayerData::getChromatogramData().

◆ consensus

ConsensusMapSharedPtrType consensus
private

consensus feature data

Referenced by LayerData::getConsensusMap().

◆ current_spectrum_

Size current_spectrum_
private

◆ features

FeatureMapSharedPtrType features
private

feature data

Referenced by LayerData::getFeatureMap().

◆ filename

String filename

◆ filters

DataFilters filters

◆ flags

std::bitset<SIZE_OF_FLAGS> flags

Actual state of each flag.

◆ flipped

bool flipped

if this layer is flipped (1d mirror view)

Referenced by TOPPViewBase::updateLayerBar().

◆ gradient

MultiGradient gradient

Gradient for 2D and 3D views.

◆ label

LabelType label

Label type.

Referenced by TOPPViewBase::updateToolBar().

◆ modifiable

bool modifiable

Flag that indicates if the layer data can be modified (so far used for features only)

◆ modified

bool modified

Flag that indicates that the layer data was modified since loading it.

Referenced by TOPPViewBase::updateLayerBar().

◆ name

String name

◆ NamesOfLabelType

const std::string NamesOfLabelType[SIZE_OF_LABEL_TYPE]
static

◆ param

Param param

Layer parameters.

Referenced by TOPPViewBase::loadFiles(), and TOPPViewBase::updateLayerBar().

◆ peaks

ExperimentSharedPtrType peaks
private

◆ peptide_hit_index

int peptide_hit_index

◆ peptide_id_index

int peptide_id_index

Selected peptide id and hit index (-1 if none is selected)

◆ peptides

std::vector<PeptideIdentification> peptides

peptide identifications

Referenced by TOPPViewBase::copyLayer().

◆ type

DataType type

◆ visible

bool visible

OpenMS / TOPP release 2.3.0 Documentation generated on Tue Jan 9 2018 18:22:10 using doxygen 1.8.13