Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
MetaDataBrowser.h
Go to the documentation of this file.
1 // --------------------------------------------------------------------------
2 // OpenMS -- Open-Source Mass Spectrometry
3 // --------------------------------------------------------------------------
4 // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
5 // ETH Zurich, and Freie Universitaet Berlin 2002-2017.
6 //
7 // This software is released under a three-clause BSD license:
8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above copyright
11 // notice, this list of conditions and the following disclaimer in the
12 // documentation and/or other materials provided with the distribution.
13 // * Neither the name of any author or any participating institution
14 // may be used to endorse or promote products derived from this software
15 // without specific prior written permission.
16 // For a full list of authors, refer to the file AUTHORS.
17 // --------------------------------------------------------------------------
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 // ARE DISCLAIMED. IN NO EVENT SHALL ANY OF THE AUTHORS OR THE CONTRIBUTING
22 // INSTITUTIONS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
25 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
27 // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
28 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 //
30 // --------------------------------------------------------------------------
31 // $Maintainer: Timo Sachsenberg $
32 // $Authors: Marc Sturm $
33 // --------------------------------------------------------------------------
34 
35 #ifndef OPENMS_VISUAL_METADATABROWSER_H
36 #define OPENMS_VISUAL_METADATABROWSER_H
37 
38 // OpenMS_GUI config
39 #include <OpenMS/VISUAL/OpenMS_GUIConfig.h>
40 
45 
46 //QT
47 #include <QtGui/QDialog>
48 #include <QtGui/QTreeWidget>
49 class QTreeWidgetItem;
50 class QPushButton;
51 class QStackedWidget;
52 class QHBoxLayout;
53 class QVBoxLayout;
54 class QGridLayout;
55 
56 namespace OpenMS
57 {
58  class BaseVisualizerGUI;
59  class Acquisition;
60  class AcquisitionInfo;
61  class ContactPerson;
62  class Digestion;
63  class ExperimentalSettings;
64  class Gradient;
65  class HPLC;
66  class PeptideIdentification;
67  class Instrument;
68  class IonDetector;
69  class IonSource;
70  class MassAnalyzer;
71  class MetaInfo;
72  class MetaInfoDescription;
73  class MetaInfoInterface;
74  class MetaInfoRegistry;
75  class Modification;
76  class PeptideHit;
77  class Precursor;
78  class DataProcessing;
79  class ProteinHit;
80  class ProteinIdentification;
81  class Sample;
82  class SampleTreatment;
83  class Software;
84  class SourceFile;
85  class SpectrumSettings;
86  class Tagging;
87  class DocumentIdentifier;
88  class Product;
89 
105  class OPENMS_GUI_DLLAPI MetaDataBrowser :
106  public QDialog
107  {
108  Q_OBJECT
109 
110 public:
111 
113  MetaDataBrowser(bool editable = FALSE, QWidget * parent = 0, bool modal = FALSE);
114 
116  void add(PeakMap & exp)
117  {
118  add(static_cast<ExperimentalSettings &>(exp));
119  treeview_->expandItem(treeview_->findItems(QString::number(0), Qt::MatchExactly, 1).first());
120  }
121 
123  void add(MSSpectrum & spectrum)
124  {
125  //spectrum settings
126  add(static_cast<SpectrumSettings &>(spectrum));
127 
128  //MetaInfoDescriptions
129  for (Size i = 0; i < spectrum.getFloatDataArrays().size(); ++i)
130  {
131  add(spectrum.getFloatDataArrays()[i]);
132  }
133  for (Size i = 0; i < spectrum.getIntegerDataArrays().size(); ++i)
134  {
135  add(spectrum.getIntegerDataArrays()[i]);
136  }
137  for (Size i = 0; i < spectrum.getStringDataArrays().size(); ++i)
138  {
139  add(spectrum.getStringDataArrays()[i]);
140  }
141 
142  add(static_cast<MetaInfoInterface &>(spectrum));
143 
144  treeview_->expandItem(treeview_->findItems(QString::number(0), Qt::MatchExactly, 1).first());
145  }
146 
148  void add(FeatureMap& map)
149  {
150  //identifier
151  add(static_cast<DocumentIdentifier &>(map));
152 
153  //protein ids
154  for (Size i = 0; i < map.getProteinIdentifications().size(); ++i)
155  {
156  add(map.getProteinIdentifications()[i]);
157  }
158 
159  //unassigned peptide ids
160  for (Size i = 0; i < map.getUnassignedPeptideIdentifications().size(); ++i)
161  {
163  }
164 
165  treeview_->expandItem(treeview_->findItems(QString::number(0), Qt::MatchExactly, 1).first());
166  }
167 
169  void add(Feature & feature);
171  void add(ConsensusFeature & feature);
172 
174  void add(ConsensusMap & map);
175 
181  template <class MetaDataType>
182  void add(MetaDataType & meta_data_object)
183  {
184  visualize_(meta_data_object);
185  treeview_->expandItem(treeview_->findItems(QString::number(0), Qt::MatchExactly, 1).first());
186  }
187 
189  bool isEditable();
190 
194 
195 public slots:
196 
198  void setStatus(std::string status);
199 
200 protected slots:
201 
203  void showDetails_();
204 
206  void saveAll_();
207 
208 protected:
209 
211 
212  void visualize_(ExperimentalSettings & meta, QTreeWidgetItem * parent = 0);
213  void visualize_(SpectrumSettings & meta, QTreeWidgetItem * parent = 0);
214  void visualize_(MetaInfoInterface & meta, QTreeWidgetItem * parent = 0);
215  void visualize_(Sample & meta, QTreeWidgetItem * parent = 0);
216  void visualize_(HPLC & meta, QTreeWidgetItem * parent = 0);
217  void visualize_(Digestion & meta, QTreeWidgetItem * parent = 0);
218  void visualize_(Modification & meta, QTreeWidgetItem * parent = 0);
219  void visualize_(Tagging & meta, QTreeWidgetItem * parent = 0);
220  void visualize_(Gradient & meta, QTreeWidgetItem * parent = 0);
221  void visualize_(Software & meta, QTreeWidgetItem * parent = 0);
222  void visualize_(ScanWindow & meta, QTreeWidgetItem * parent = 0);
223  void visualize_(SourceFile & meta, QTreeWidgetItem * parent = 0);
224  void visualize_(ContactPerson & meta, QTreeWidgetItem * parent = 0);
225  void visualize_(Instrument & meta, QTreeWidgetItem * parent = 0);
226  void visualize_(IonSource & meta, QTreeWidgetItem * parent = 0);
227  void visualize_(IonDetector & meta, QTreeWidgetItem * parent = 0);
228  void visualize_(MassAnalyzer & meta, QTreeWidgetItem * parent = 0);
229  void visualize_(DataProcessingPtr & meta, QTreeWidgetItem * parent = 0);
230  void visualize_(ProteinIdentification & meta, QTreeWidgetItem * parent = 0);
231  void visualize_(ProteinHit & meta, QTreeWidgetItem * parent = 0);
232  void visualize_(PeptideHit & meta, QTreeWidgetItem * parent = 0);
233  void visualize_(Acquisition & meta, QTreeWidgetItem * parent = 0);
234  void visualize_(AcquisitionInfo & meta, QTreeWidgetItem * parent = 0);
235  void visualize_(MetaInfoDescription & meta, QTreeWidgetItem * parent = 0);
236  void visualize_(Precursor & meta, QTreeWidgetItem * parent = 0);
237  void visualize_(Product & meta, QTreeWidgetItem * parent = 0);
238  void visualize_(InstrumentSettings & meta, QTreeWidgetItem * parent = 0);
239  void visualize_(PeptideIdentification & meta, QTreeWidgetItem * parent = 0);
240  void visualize_(DocumentIdentifier & meta, QTreeWidgetItem * parent = 0);
242 
244  template <typename ContainerType>
245  void visualizeAll_(ContainerType & container, QTreeWidgetItem * parent)
246  {
247  for (typename ContainerType::iterator it = container.begin(); it != container.end(); ++it)
248  {
249  visualize_(*it, parent);
250  }
251  }
252 
254  void connectVisualizer_(BaseVisualizerGUI * ptr);
255 
257  void filterHits_(double threshold, bool higher_better, int tree_item_id);
259  void showAllHits_(int tree_item_id);
260 
262  std::string status_list_;
263 
265  bool editable_;
266 
268  QStackedWidget * ws_;
270  QPushButton * saveallbutton_;
272  QPushButton * closebutton_;
274  QPushButton * cancelbutton_;
276  QPushButton * undobutton_;
277 
280  };
281 }
282 #endif
Representation of a protein identification run.
Definition: ProteinIdentification.h:62
void add(MSSpectrum &spectrum)
Adds a peak spectrum.
Definition: MetaDataBrowser.h:123
Description of a MS instrument.
Definition: Instrument.h:64
Description of the settings a MS Instrument was run with.
Definition: InstrumentSettings.h:48
Precursor meta information.
Definition: Precursor.h:58
Product meta information.
Definition: Product.h:49
void add(PeakMap &exp)
Adds a peak map.
Definition: MetaDataBrowser.h:116
Description of the combination of raw data to a single spectrum.
Definition: AcquisitionInfo.h:53
std::string status_list_
A list of setting errors due to invalid formats.
Definition: MetaDataBrowser.h:262
bool editable_
Indicates the mode.
Definition: MetaDataBrowser.h:265
Contact person information.
Definition: ContactPerson.h:50
A container for features.
Definition: FeatureMap.h:94
Representation of a HPLC experiment.
Definition: HPLC.h:51
A container for consensus elements.
Definition: ConsensusMap.h:72
void visualizeAll_(ContainerType &container, QTreeWidgetItem *parent)
Visualizes all elements of a container.
Definition: MetaDataBrowser.h:245
Representation of 1D spectrum settings.
Definition: SpectrumSettings.h:64
Description of a file location, used to store the origin of (meta) data.
Definition: SourceFile.h:47
void add(MetaDataType &meta_data_object)
A generic function to add data.
Definition: MetaDataBrowser.h:182
A base class for all visualizer classes.
Definition: BaseVisualizerGUI.h:65
Description of the software used for processing.
Definition: Software.h:49
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
const std::vector< PeptideIdentification > & getUnassignedPeptideIdentifications() const
non-mutable access to the unassigned peptide identifications
void add(FeatureMap &map)
Adds a feature map.
Definition: MetaDataBrowser.h:148
Description of the meta data arrays of MSSpectrum.
Definition: MetaInfoDescription.h:49
const FloatDataArrays & getFloatDataArrays() const
Returns a const reference to the float meta data arrays.
A meta data visualization widget.
Definition: MetaDataBrowser.h:105
Class that displays all meta information for ProteinIdentification objects.
Definition: ProteinIdentificationVisualizer.h:55
QStackedWidget * ws_
A widgetstack that keeps track of all widgets.
Definition: MetaDataBrowser.h:268
The representation of a 1D spectrum.
Definition: MSSpectrum.h:67
boost::shared_ptr< DataProcessing > DataProcessingPtr
Definition: DataProcessing.h:127
Representation of a HPLC gradient.
Definition: Gradient.h:53
Representation of a peptide hit.
Definition: PeptideHit.h:55
Scan window description.
Definition: ScanWindow.h:47
Meta information about the sample.
Definition: Sample.h:60
Meta information about digestion of a sample.
Definition: Digestion.h:50
Description of a ion detector (part of a MS Instrument)
Definition: IonDetector.h:47
Information about one raw data spectrum that was combined with several other raw data spectra...
Definition: Acquisition.h:50
Class that displays all meta information for PeptideIdentification objects.
Definition: PeptideIdentificationVisualizer.h:55
An LC-MS feature.
Definition: Feature.h:70
QPushButton * undobutton_
Undo Button.
Definition: MetaDataBrowser.h:276
Interface for classes that can store arbitrary meta information (Type-Name-Value tuples).
Definition: MetaInfoInterface.h:56
Representation of a protein hit.
Definition: ProteinHit.h:54
In-Memory representation of a mass spectrometry experiment.
Definition: MSExperiment.h:82
Meta information about tagging of a sample e.g. ICAT labeling.
Definition: Tagging.h:50
Meta information about chemical modification of a sample.
Definition: Modification.h:52
QPushButton * closebutton_
Close Button.
Definition: MetaDataBrowser.h:272
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:128
QPushButton * cancelbutton_
Cancel Button.
Definition: MetaDataBrowser.h:274
const std::vector< ProteinIdentification > & getProteinIdentifications() const
non-mutable access to the protein identifications
const StringDataArrays & getStringDataArrays() const
Returns a const reference to the string meta data arrays.
Description of a mass analyzer (part of a MS Instrument)
Definition: MassAnalyzer.h:48
Description of an ion source (part of a MS Instrument)
Definition: IonSource.h:47
QTreeWidget * treeview_
The tree.
Definition: MetaDataBrowser.h:279
Description of the experimental settings.
Definition: ExperimentalSettings.h:59
QPushButton * saveallbutton_
Save button.
Definition: MetaDataBrowser.h:270
Manage source document information.
Definition: DocumentIdentifier.h:56
A 2-dimensional consensus feature.
Definition: ConsensusFeature.h:65
Represents the peptide hits for a spectrum.
Definition: PeptideIdentification.h:63
const IntegerDataArrays & getIntegerDataArrays() const
Returns a const reference to the integer meta data arrays.

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