 |
OpenMS
2.6.0
|
Go to the documentation of this file.
38 #include <OpenMS/VISUAL/OpenMS_GUIConfig.h>
53 #include <boost/shared_ptr.hpp>
135 static const std::string NamesOfLabelType[SIZE_OF_LABEL_TYPE];
179 peptide_id_index(-1),
180 peptide_hit_index(-1),
186 current_spectrum_(0),
189 annotations_1d.resize(1);
236 const ConstExperimentSharedPtrType getPeakData()
const;
267 return on_disc_peaks;
273 return chromatograms;
279 return chromatograms;
285 bool annotate(
const std::vector<PeptideIdentification>& identifications,
286 const std::vector<ProteinIdentification>& protein_identifications);
292 return annotations_1d[current_spectrum_];
298 return annotations_1d[current_spectrum_];
304 return annotations_1d[spectrum_index];
310 return annotations_1d[spectrum_index];
322 cached_spectrum_.sortByPosition();
328 if (spectrum_idx == current_spectrum_)
return cached_spectrum_;
330 if ((*peaks)[spectrum_idx].size() > 0)
332 return (*peaks)[spectrum_idx];
334 else if (!on_disc_peaks->empty())
336 return on_disc_peaks->getSpectrum(spectrum_idx);
338 return (*peaks)[spectrum_idx];
344 return current_spectrum_;
350 current_spectrum_ = index;
357 return this->getPeakData()->size() > 0 &&
358 this->getPeakData()->metaValueExists(
"is_ion_mobility") &&
359 this->getPeakData()->getMetaValue(
"is_ion_mobility").toBool();
364 peaks->setMetaValue(
"is_ion_mobility",
"true");
370 return this->getPeakData()->size() > 0 &&
371 this->getPeakData()->metaValueExists(
"is_dia_data") &&
372 this->getPeakData()->getMetaValue(
"is_dia_data").toBool();
378 peaks->setMetaValue(
"is_dia_data",
"true");
391 return this->getPeakData()->size() > 0 &&
392 this->getPeakData()->metaValueExists(
"is_chromatogram") &&
393 this->getPeakData()->getMetaValue(
"is_chromatogram").toBool();
399 peaks->setMetaValue(
"is_chromatogram",
"true");
405 if (this->chromatogram_flag_set())
407 peaks->removeMetaValue(
"is_chromatogram");
420 float getMinIntensity()
const;
423 float getMaxIntensity()
const;
427 void synchronizePeakAnnotations();
430 void removePeakAnnotationsFromPeptideHit(
const std::vector<Annotation1DItem*>& selected_annotations);
490 String getDecoratedName()
const;
497 void updatePeptideHitAnnotations_(
PeptideHit& hit);
556 "Select peptide identification data")
562 virtual bool annotateWorker_(LayerData& layer,
const String& filename, LogWindow& log)
const;
573 "Select AccurateMassSearch's featureXML file")
579 virtual bool annotateWorker_(LayerData& layer,
const String& filename, LogWindow& log)
const;
583 OPENMS_GUI_DLLAPI std::ostream&
operator<<(std::ostream & os,
const LayerData & rhs);
LayerAnnotatorAMS()
Definition: LayerData.h:571
A gradient of multiple colors and arbitrary distances between colors.
Definition: MultiGradient.h:67
OpenMS identification format (.idXML)
Definition: FileTypes.h:65
std::vector< PeptideIdentification > peptides
peptide identifications
Definition: LayerData.h:459
ODExperimentSharedPtrType on_disc_peaks
on disc peak data
Definition: LayerData.h:509
boost::shared_ptr< ExperimentType > ExperimentSharedPtrType
SharedPtr on MSExperiment.
Definition: LayerData.h:153
void setName(const String &new_name)
Definition: LayerData.h:450
const String & getName() const
Definition: LayerData.h:446
virtual bool annotateWorker_(LayerData &layer, const String &filename, LogWindow &log) const =0
A log window (QTextEdit) with convenience functions.
Definition: LogWindow.h:53
bool modified
Flag that indicates that the layer data was modified since loading it.
Definition: LayerData.h:480
The 'label' meta information is used.
Definition: LayerData.h:128
FeatureMapSharedPtrType features
feature data
Definition: LayerData.h:500
boost::shared_ptr< FeatureMap > FeatureMapSharedPtrType
SharedPtr on feature map.
Definition: LayerData.h:141
Consensus feature data.
Definition: LayerData.h:101
boost::shared_ptr< ConsensusMap > ConsensusMapSharedPtrType
SharedPtr on consensus features.
Definition: LayerData.h:147
Peaks: Show projections.
Definition: LayerData.h:113
virtual bool annotateWorker_(LayerData &layer, const String &filename, LogWindow &log) const
Definition: LayerData.h:567
const FileTypes::FileTypeList supported_types_
Definition: LayerData.h:544
void sortCurrentSpectrumByPosition()
Definition: LayerData.h:320
const Annotations1DContainer & getCurrentAnnotations() const
Returns a const reference to the annotations of the current spectrum (1D view)
Definition: LayerData.h:290
LayerAnnotatorPeptideID()
Definition: LayerData.h:554
boost::shared_ptr< const ExperimentType > ConstExperimentSharedPtrType
Definition: LayerData.h:155
No label is displayed.
Definition: LayerData.h:126
const ODExperimentSharedPtrType & getOnDiscPeakData() const
Returns a mutable reference to the on-disc data.
Definition: LayerData.h:265
A more convenient string class.
Definition: String.h:59
In-Memory representation of a mass spectrometry experiment.
Definition: MSExperiment.h:77
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
A base class to annotate layers of specific types with (identification) data.
Definition: LayerData.h:522
const FeatureMapSharedPtrType & getFeatureMap() const
Returns a const reference to the current feature data.
Definition: LayerData.h:204
virtual bool annotateWorker_(LayerData &layer, const String &filename, LogWindow &log) const
Annotations1DContainer & getAnnotations(Size spectrum_index)
Returns a mutable reference to the annotations of the current spectrum (1D view)
Definition: LayerData.h:308
DataFilters filters
Filters to apply before painting.
Definition: LayerData.h:468
Size current_spectrum_
Index of the current spectrum.
Definition: LayerData.h:515
bool annotate(LayerData &layer, LogWindow &log, const String ¤t_path) const
std::vector< QColor > peak_colors_1d
Peak colors of the currently shown spectrum.
Definition: LayerData.h:474
ConsensusMap ConsensusMapType
consensus features
Definition: LayerData.h:144
mzIdentML (HUPO PSI AnalysisXML followup format) (.mzid)
Definition: FileTypes.h:76
bool flipped
if this layer is flipped (1d mirror view)
Definition: LayerData.h:436
const ExperimentSharedPtrType & getChromatogramData() const
Returns a mutable reference to the current chromatogram data.
Definition: LayerData.h:271
Flags
Flags that determine which information is shown.
Definition: LayerData.h:107
Identifications: Show labels (not sequences)
Definition: LayerData.h:116
void setOnDiscPeakData(ODExperimentSharedPtrType p)
Set the current on-disc data.
Definition: LayerData.h:259
LayerData()
Default constructor.
Definition: LayerData.h:163
Feature data.
Definition: LayerData.h:100
MultiGradient gradient
Gradient for 2D and 3D views.
Definition: LayerData.h:465
The element number is used.
Definition: LayerData.h:127
void set_chromatogram_flag()
set the chromatogram flag
Definition: LayerData.h:397
LayerAnnotatorBase(const FileTypes::FileTypeList &supported_types, const String &file_dialog_text)
C'tor with params.
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
Spectrum profile or centroided data.
Definition: LayerData.h:98
Features: Unassigned peptide hits.
Definition: LayerData.h:111
OpenMS feature file (.featureXML)
Definition: FileTypes.h:64
Peptide identification data.
Definition: LayerData.h:102
String filename
file name of the file the data comes from (if available)
Definition: LayerData.h:456
void remove_chromatogram_flag()
remove the chromatogram flag
Definition: LayerData.h:403
Class that stores the data for one layer.
Definition: LayerData.h:89
ConsensusMapSharedPtrType & getConsensusMap()
Returns current consensus map (mutable)
Definition: LayerData.h:222
Representation of a mass spectrometry experiment on disk.
Definition: OnDiscMSExperiment.h:68
const ConsensusMapSharedPtrType & getConsensusMap() const
Returns a const reference to the consensus feature data.
Definition: LayerData.h:216
ExperimentSharedPtrType & getChromatogramData()
Returns a mutable reference to the current chromatogram data.
Definition: LayerData.h:277
Identifications: m/z source.
Definition: LayerData.h:115
MSSpectrum SpectrumType
Definition: MzDataHandler.h:60
const ExperimentSharedPtrType & getPeakDataMuteable()
Returns a mutable reference to the current in-memory peak data.
Definition: LayerData.h:247
FeatureMap FeatureMapType
Features.
Definition: LayerData.h:138
ExperimentSharedPtrType peaks
peak data
Definition: LayerData.h:506
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.
Definition: LayerData.h:326
Consensus features: Show elements.
Definition: LayerData.h:114
ExperimentType::SpectrumType cached_spectrum_
Current cached spectrum.
Definition: LayerData.h:518
Size getCurrentSpectrumIndex() const
Get the index of the current spectrum (1D view)
Definition: LayerData.h:342
bool visible
if this layer is visible
Definition: LayerData.h:433
bool chromatogram_flag_set() const
Check whether the current layer is a chromatogram.
Definition: LayerData.h:389
std::ostream & operator<<(std::ostream &os, const AccurateMassSearchResult &amsr)
bool modifiable
Flag that indicates if the layer data can be modified (so far used for features only)
Definition: LayerData.h:477
A container for consensus elements.
Definition: ConsensusMap.h:80
std::vector< Annotations1DContainer > annotations_1d
Annotations of all spectra of the experiment (1D view)
Definition: LayerData.h:471
String name_
layer name
Definition: LayerData.h:443
int peptide_id_index
Selected peptide id and hit index (-1 if none is selected)
Definition: LayerData.h:486
The best peptide hit of the first identification run is used.
Definition: LayerData.h:129
PeakMap ExperimentType
Main data type (experiment)
Definition: LayerData.h:150
Param param
Layer parameters.
Definition: LayerData.h:462
Features: Convex hulls of single mass traces.
Definition: LayerData.h:110
const FileTypes::FileTypeList supported_types({ FileTypes::MZML, FileTypes::MZXML, FileTypes::MZDATA, FileTypes::SQMASS, FileTypes::FEATUREXML, FileTypes::CONSENSUSXML, FileTypes::IDXML, FileTypes::DTA, FileTypes::DTA2D, FileTypes::BZ2, FileTypes::GZ })
supported types which can be opened with File–>Open
A container for features.
Definition: FeatureMap.h:97
DataFilter array providing some convenience functions.
Definition: DataFilters.h:50
bool isIonMobilityData() const
Check whether the current layer should be represented as ion mobility.
Definition: LayerData.h:355
FeatureMapSharedPtrType & getFeatureMap()
Returns a const reference to the current feature data.
Definition: LayerData.h:210
void labelAsDIAData()
Label the current layer as DIA (SWATH-MS) data.
Definition: LayerData.h:376
All peptide hits of the first identification run are used.
Definition: LayerData.h:130
std::bitset< SIZE_OF_FLAGS > flags
Actual state of each flag.
Definition: LayerData.h:121
ExperimentSharedPtrType chromatograms
chromatogram data
Definition: LayerData.h:512
int peptide_hit_index
Definition: LayerData.h:487
Definition: LayerData.h:550
void labelAsIonMobilityData() const
Definition: LayerData.h:362
LabelType label
Label type.
Definition: LayerData.h:483
DataType
Definition: LayerData.h:96
Management and storage of parameters / INI files.
Definition: Param.h:73
void setCurrentSpectrumIndex(Size index)
Set the index of the current spectrum (1D view)
Definition: LayerData.h:348
void setPeakData(ExperimentSharedPtrType p)
Set the current in-memory peak data.
Definition: LayerData.h:252
Centralizes the file types recognized by FileHandler.
Definition: FileTypes.h:52
ConsensusMapSharedPtrType consensus
consensus feature data
Definition: LayerData.h:503
DataType type
data type (peak or feature data)
Definition: LayerData.h:439
LabelType
Label used in visualization.
Definition: LayerData.h:124
The representation of a 1D spectrum.
Definition: MSSpectrum.h:67
const Annotations1DContainer & getAnnotations(Size spectrum_index) const
Returns a const reference to the annotations of the current spectrum (1D view)
Definition: LayerData.h:302
Features: Overall convex hull.
Definition: LayerData.h:109
boost::shared_ptr< OnDiscMSExperiment > ODExperimentSharedPtrType
SharedPtr on On-Disc MSExperiment.
Definition: LayerData.h:158
const String file_dialog_text_
Definition: LayerData.h:545
Annotations1DContainer & getCurrentAnnotations()
Returns a mutable reference to the annotations of the current spectrum (1D view)
Definition: LayerData.h:296
holds a vector of known file types, e.g. as a way to specify supported input formats
Definition: FileTypes.h:133
Peaks: Mark precursor peaks of MS/MS scans.
Definition: LayerData.h:112
Container for annotations to content of Spectrum1DCanvas.
Definition: Annotations1DContainer.h:53
bool isDIAData() const
Check whether the current layer contains DIA (SWATH-MS) data.
Definition: LayerData.h:368
Chromatogram data.
Definition: LayerData.h:99
Representation of a peptide hit.
Definition: PeptideHit.h:55