OpenMS  2.8.0
Public Slots | Public Member Functions | Private Member Functions | Private Attributes | List of all members
TVIdentificationViewController Class Reference

Behavior of TOPPView in identification mode. More...

#include <OpenMS/VISUAL/TVIdentificationViewController.h>

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

Public Slots

virtual void showSpectrumAsNew1D (int spectrum_index, int peptide_id_index, int peptide_hit_index)
 Behavior for showSpectrumAsNew1D. More...
 
virtual void showSpectrumAsNew1D (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...
 
void activateBehavior () override
 Slot for behavior activation. More...
 
void deactivateBehavior () override
 Slot for behavior deactivation. More...
 
void setVisibleArea1D (double l, double h)
 
- Public Slots inherited from TVControllerBase
virtual void activateBehavior ()
 Slot for behavior activation. The default behaviour does nothing. Override in child class if desired. More...
 
virtual void deactivateBehavior ()
 Slot for behavior deactivation. The default behaviour does nothing. Override in child class if desired. More...
 

Public Member Functions

 TVIdentificationViewController (TOPPViewBase *parent, SpectraIDViewTab *spec_id_view_)
 Construct the behaviour with its parent. More...
 
- Public Member Functions inherited from TVControllerBase
 TVControllerBase ()=delete
 
 ~TVControllerBase () override=default
 

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

SpectraIDViewTabspec_id_view_
 
std::vector< Annotation1DItem * > temporary_annotations_
 

Additional Inherited Members

- Public Types inherited from TVControllerBase
typedef LayerDataBase::FeatureMapType FeatureMapType
 Feature map type. More...
 
typedef LayerDataBase::FeatureMapSharedPtrType FeatureMapSharedPtrType
 Feature map managed type. More...
 
typedef LayerDataBase::ConsensusMapType ConsensusMapType
 Consensus feature map type. More...
 
typedef LayerDataBase::ConsensusMapSharedPtrType ConsensusMapSharedPtrType
 Consensus map managed type. More...
 
typedef LayerDataBase::ExperimentType ExperimentType
 Peak map type. More...
 
typedef LayerDataBase::ExperimentSharedPtrType ExperimentSharedPtrType
 Main managed data type (experiment) More...
 
typedef ExperimentType::SpectrumType SpectrumType
 Peak spectrum type. More...
 
- Protected Member Functions inherited from TVControllerBase
 TVControllerBase (TOPPViewBase *parent)
 Construct the behaviour. More...
 
- Protected Attributes inherited from TVControllerBase
TOPPViewBasetv_
 

Detailed Description

Behavior of TOPPView in identification mode.

Constructor & Destructor Documentation

◆ TVIdentificationViewController()

TVIdentificationViewController ( TOPPViewBase parent,
SpectraIDViewTab spec_id_view_ 
)

Construct the behaviour with its parent.

Member Function Documentation

◆ activate1DSpectrum [1/2]

virtual void activate1DSpectrum ( int  index)
virtualslot

select spectrum without selecting an identification

◆ activate1DSpectrum [2/2]

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

Behavior for activate1DSpectrum.

◆ activateBehavior

void activateBehavior ( )
overrideslot

Slot for behavior activation.

◆ 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)
virtualslot

Behavior for deactivate1DSpectrum.

◆ deactivateBehavior

void deactivateBehavior ( )
overrideslot

Slot for behavior deactivation.

◆ 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

◆ showSpectrumAsNew1D [1/2]

virtual void showSpectrumAsNew1D ( int  index)
virtualslot

Show spectrum without selecting an identification.

◆ showSpectrumAsNew1D [2/2]

virtual void showSpectrumAsNew1D ( int  spectrum_index,
int  peptide_id_index,
int  peptide_hit_index 
)
virtualslot

Behavior for showSpectrumAsNew1D.

Member Data Documentation

◆ spec_id_view_

SpectraIDViewTab* spec_id_view_
private

◆ 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