| OpenMS 2.5.0

Public Slots | Public Member Functions | Private Member Functions | Private Attributes | List of all members
TOPPViewIdentificationViewBehavior Class Reference

Behavior of TOPPView in identification mode. More...

`#include <OpenMS/VISUAL/TOPPViewIdentificationViewBehavior.h>`

Inheritance diagram for TOPPViewIdentificationViewBehavior:

## Public Slots

virtual void | showSpectrumAs1D (int spectrum_index, int peptide_id_index, int peptide_hit_index)
| Behavior for showSpectrumAs1D. More...
virtual void | showSpectrumAs1D (int index)
| Show spectrum without selecting an identification. More...
virtual void | activate1DSpectrum (int spectrum_index, int peptide_id_index, int peptide_hit_index)
| Behavior for activate1DSpectrum. More...
virtual void | activate1DSpectrum (int index)
| select spectrum without selecting an identification More...
virtual void | deactivate1DSpectrum (int index)
| Behavior for deactivate1DSpectrum. More...
virtual void | activateBehavior ()
| Slot for behavior activation. More...
virtual void | deactivateBehavior ()
| Slot for behavior deactivation. More...
void | setVisibleArea1D (double l, double h)

## Public Member Functions

| TOPPViewIdentificationViewBehavior (TOPPViewBase *parent)
| Construct the behaviour with its parent. More...

## Private Types

Type definitions
typedef LayerData::FeatureMapType | FeatureMapType
typedef LayerData::FeatureMapSharedPtrType | FeatureMapSharedPtrType
typedef LayerData::ConsensusMapType | ConsensusMapType
typedef LayerData::ConsensusMapSharedPtrType | ConsensusMapSharedPtrType
typedef LayerData::ExperimentType | ExperimentType
typedef LayerData::ExperimentSharedPtrType | ExperimentSharedPtrType
typedef ExperimentType::SpectrumType | SpectrumType
| Peak spectrum type. More...

## Private Member Functions

void | addPrecursorLabels1D_ (const std::vector< Precursor > &pcs)
| Adds labels for the provided precursors to the 1D spectrum. More...
void | removeTemporaryAnnotations_ (Size spectrum_index)
| Removes the precursor labels for from the specified 1D spectrum. More...
void | addTheoreticalSpectrumLayer_ (const PeptideHit &ph)
| Adds a theoretical spectrum as set from the preferences dialog for the peptide hit. More...
void | addPeakAnnotationsFromID_ (const PeptideHit &hit)
| Add peak annotatios from id data structure. More...
void | removeTheoreticalSpectrumLayer_ ()
| removes all layer with theoretical spectrum generated in identification view More...
void | removeGraphicalPeakAnnotations_ (int spectrum_index)
| remove all graphical peak annotations More...
void | addPeakAnnotations_ (const std::vector< PeptideIdentification > &ph)
| Adds annotation (compound name, adducts, ppm error) to a peak in 1D spectra. More...
String | n_times (Size n, String input)
| Helper function for text formatting. More...
void | extractCoverageStrings (std::vector< PeptideHit::PeakAnnotation > frag_annotations, String &alpha_string, String &beta_string, Size alpha_size, Size beta_size)
| Helper function that turns fragment annotations into coverage Strings for visualization with the sequence. More...
template<typename SeqType >
String | generateSequenceDiagram_ (const SeqType &seq, const std::vector< PeptideHit::PeakAnnotation > &annotations, const StringList &top_ions, const StringList &bottom_ions)
| Generates HTML for showing the sequence with annotations of matched fragments. More...
void | generateSequenceRow_ (const AASequence &seq, std::vector< String > &row)
| Helper function for generateSequenceDiagram_() - overload for peptides. More...
void | generateSequenceRow_ (const NASequence &seq, std::vector< String > &row)
| Helper function for generateSequenceDiagram_() - overload for oligonucleotides. More...
String | collapseStringVector (std::vector< String > strings)
| Helper function, that collapses a vector of Strings into one String. More...

## Private Attributes

TOPPViewBase * | tv_
std::vector< Annotation1DItem * > | temporary_annotations_

## Detailed Description

Behavior of TOPPView in identification mode.

## Member Typedef Documentation

## ◆ ConsensusMapSharedPtrType

typedef LayerData::ConsensusMapSharedPtrType ConsensusMapSharedPtrType

private

## ◆ ConsensusMapType

typedef LayerData::ConsensusMapType ConsensusMapType

private

## ◆ ExperimentSharedPtrType

typedef LayerData::ExperimentSharedPtrType ExperimentSharedPtrType

private

## ◆ ExperimentType

typedef LayerData::ExperimentType ExperimentType

private

## ◆ FeatureMapSharedPtrType

typedef LayerData::FeatureMapSharedPtrType FeatureMapSharedPtrType

private

## ◆ FeatureMapType

typedef LayerData::FeatureMapType FeatureMapType

private

## ◆ SpectrumType

typedef ExperimentType::SpectrumType SpectrumType

private

Peak spectrum type.

## Constructor & Destructor Documentation

## ◆ TOPPViewIdentificationViewBehavior()

TOPPViewIdentificationViewBehavior | ( | TOPPViewBase * | parent | ) |

Construct the behaviour with its parent.

## Member Function Documentation

## ◆ activate1DSpectrum [1/2]

virtual void activate1DSpectrum | ( | int | spectrum_index,
|  | int | peptide_id_index,
|  | int | peptide_hit_index
| ) |  |

virtual slot

Behavior for activate1DSpectrum.

## ◆ activate1DSpectrum [2/2]

virtual void activate1DSpectrum | ( | int | index | ) |

virtual slot

select spectrum without selecting an identification

## ◆ activateBehavior

virtual void activateBehavior | ( |  | ) |

virtual slot

Slot for behavior activation.

Referenced by TOPPViewBase::viewChanged(), and TOPPViewBase::viewTabwidgetDoubleClicked().

## ◆ addPeakAnnotations_()

void addPeakAnnotations_ | ( | const std::vector< PeptideIdentification > & | ph | ) |

private

Adds annotation (compound name, adducts, ppm error) to a peak in 1D spectra.

## ◆ addPeakAnnotationsFromID_()

void addPeakAnnotationsFromID_ | ( | const PeptideHit & | hit | ) |

private

Add peak annotatios from id data structure.

## ◆ addPrecursorLabels1D_()

void addPrecursorLabels1D_ | ( | const std::vector< Precursor > & | pcs | ) |

private

Adds labels for the provided precursors to the 1D spectrum.

## ◆ addTheoreticalSpectrumLayer_()

void addTheoreticalSpectrumLayer_ | ( | const PeptideHit & | ph | ) |

private

Adds a theoretical spectrum as set from the preferences dialog for the peptide hit.

## ◆ collapseStringVector()

String collapseStringVector | ( | std::vector< String > | strings | ) |

private

Helper function, that collapses a vector of Strings into one String.

## ◆ deactivate1DSpectrum

virtual void deactivate1DSpectrum | ( | int | index | ) |

virtual slot

Behavior for deactivate1DSpectrum.

## ◆ deactivateBehavior

virtual void deactivateBehavior | ( |  | ) |

virtual slot

Slot for behavior deactivation.

Referenced by TOPPViewBase::viewChanged().

## ◆ extractCoverageStrings()

void extractCoverageStrings | ( | std::vector< PeptideHit::PeakAnnotation > | frag_annotations,
|  | String & | alpha_string,
|  | String & | beta_string,
|  | Size | alpha_size,
|  | Size | beta_size
| ) |  |

private

Helper function that turns fragment annotations into coverage Strings for visualization with the sequence.

## ◆ generateSequenceDiagram_()

String generateSequenceDiagram_ | ( | const SeqType & | seq,
|  | const std::vector< PeptideHit::PeakAnnotation > & | annotations,
|  | const StringList & | top_ions,
|  | const StringList & | bottom_ions
| ) |  |

private

Generates HTML for showing the sequence with annotations of matched fragments.

## ◆ generateSequenceRow_() [1/2]

void generateSequenceRow_ | ( | const AASequence & | seq,
|  | std::vector< String > & | row
| ) |  |

private

Helper function for generateSequenceDiagram_() - overload for peptides.

## ◆ generateSequenceRow_() [2/2]

void generateSequenceRow_ | ( | const NASequence & | seq,
|  | std::vector< String > & | row
| ) |  |

private

Helper function for generateSequenceDiagram_() - overload for oligonucleotides.

## ◆ n_times()

String n_times | ( | Size | n,
|  | String | input
| ) |  |

private

Helper function for text formatting.

## ◆ removeGraphicalPeakAnnotations_()

void removeGraphicalPeakAnnotations_ | ( | int | spectrum_index | ) |

private

remove all graphical peak annotations

## ◆ removeTemporaryAnnotations_()

void removeTemporaryAnnotations_ | ( | Size | spectrum_index | ) |

private

Removes the precursor labels for from the specified 1D spectrum.

## ◆ removeTheoreticalSpectrumLayer_()

void removeTheoreticalSpectrumLayer_ | ( |  | ) |

private

removes all layer with theoretical spectrum generated in identification view

## ◆ setVisibleArea1D

void setVisibleArea1D | ( | double | l,
|  | double | h
| ) |  |

slot

## ◆ showSpectrumAs1D [1/2]

virtual void showSpectrumAs1D | ( | int | spectrum_index,
|  | int | peptide_id_index,
|  | int | peptide_hit_index
| ) |  |

virtual slot

Behavior for showSpectrumAs1D.

Referenced by TOPPViewBase::showSpectrumAs1D().

## ◆ showSpectrumAs1D [2/2]

virtual void showSpectrumAs1D | ( | int | index | ) |

virtual slot

Show spectrum without selecting an identification.

## Member Data Documentation

## ◆ temporary_annotations_

std::vector<Annotation1DItem*> temporary_annotations_

private

Used to check which annotation handles have been added automatically by the identification view. Ownership of the AnnotationItems has the Annotation1DContainer

## ◆ tv_

TOPPViewBase* tv_

private