 |
OpenMS
2.6.0
|
Go to the documentation of this file.
38 #include <OpenMS/VISUAL/OpenMS_GUIConfig.h>
56 #include <QtWidgets/QMainWindow>
57 #include <QtWidgets/QButtonGroup>
58 #include <QtWidgets/QActionGroup>
59 #include <QtCore/QStringList>
60 #include <QtCore/QProcess>
67 class QListWidgetItem;
69 class QTreeWidgetItem;
82 class MultiGradientSelector;
83 class SpectraSelectionTabs;
84 class Spectrum1DWidget;
85 class Spectrum2DWidget;
86 class Spectrum3DWidget;
129 friend class TestTOPPView;
171 void addDataFile(
const String& filename,
bool show_options,
bool add_to_recent,
String caption =
"",
UInt window_id = 0,
Size spectrum_id = 0);
191 std::vector<PeptideIdentification>& peptides,
197 bool as_new_window =
true,
198 const String& filename =
"",
199 const String& caption =
"",
201 Size spectrum_id = 0);
204 void loadFiles(
const StringList& list, QSplashScreen* splash_screen);
211 void loadPreferences(
String filename =
"");
214 void savePreferences();
220 const LayerData* getCurrentLayer()
const;
249 void updateCurrentPath();
251 void openFilesByDialog(
const String& initial_directory =
"");
253 void showGoToDialog();
255 void preferencesDialog();
257 void layerStatistics();
261 void layerActivated();
263 void layerZoomChanged();
267 void layerDeactivated();
272 void rerunTOPPTool();
275 void updateBarsAndMenus();
277 void updateToolBar();
279 void updateLayerBar();
281 void updateViewBar();
285 void updateFilterBar();
292 void showStatusMessage(std::string msg,
OpenMS::UInt time);
294 void showCursorStatus(
double mz,
double rt);
296 void showCursorStatusInvert(
double mz,
double rt);
298 void showTOPPDialog();
300 void annotateWithAMS();
302 void annotateWithID();
304 void showSpectrumGenerationDialog();
306 void showSpectrumAlignmentDialog();
308 void showCurrentPeaksAs2D();
310 void showCurrentPeaksAs3D();
312 void showCurrentPeaksAsIonMobility();
314 void showCurrentPeaksAsDIA();
318 void saveLayerVisible();
320 void toggleGridLines();
322 void toggleAxisLegends();
324 void toggleInterestingMZs();
326 void showPreferences();
328 void metadataFileDialog();
333 void setDrawMode1D(
int);
334 void setIntensityMode(
int);
335 void changeLayerFlag(
bool);
336 void changeLabel(QAction*);
337 void changeUnassigned(QAction*);
339 void toggleProjections();
344 void openFile(
const String& filename);
347 void layerFilterVisibilityChange(
bool);
350 void showSpectrumMetaData(
int spectrum_index);
354 void finishTOPPToolExecution(
int exitCode, QProcess::ExitStatus exitStatus);
356 void abortTOPPTool();
358 void showSpectrumBrowser();
363 void closeByTab(
int id);
366 void showWindow(
int id);
368 void copyLayer(
const QMimeData* data,
QWidget* source,
int id = -1);
372 void updateProcessLog();
375 void fileChanged_(
const String&);
378 void initializeDefaultParameters_();
383 QStringList chooseFilesDialog_(
const String& path_overwrite =
"");
406 bool watcher_msgbox_ =
false;
409 bool zoom_together_ =
false;
455 QLabel* message_label_;
465 void addRecentFile_(
const String& filename);
488 bool visible_area_only;
493 void checkPreferences_();
496 void closeEvent(QCloseEvent* event)
override;
503 void showTOPPDialog_(
bool visible);
QActionGroup * group_label_2d_
Definition: TOPPViewBase.h:435
bool mirrorModeActive()
Returns whether this widget is currently in mirror mode.
const char * tool_name
Definition: TOPPView.cpp:78
void openFile(const String &filename)
Definition: TOPPViewBase.cpp:962
void showStatusMessage(std::string msg, OpenMS::UInt time)
Shows a status message in the status bar.
Definition: TOPPViewBase.cpp:1008
LayerListView * layers_view_
Layer management widget.
Definition: TOPPViewBase.h:393
OpenMS identification format (.idXML)
Definition: FileTypes.h:65
void showWindow(int id)
Raises the window corresponding to the data of the tab with identifier id.
Definition: TOPPViewBase.cpp:977
void setVisibleArea(AreaType area)
Sets the visible area.
Shows intensities normalized by layer maximum: f(x)=x/max(x)*100.
Definition: SpectrumCanvas.h:185
Definition: EnhancedWorkspace.h:51
std::vector< PeptideIdentification > peptides
peptide identifications
Definition: LayerData.h:459
void removeAll(const String &prefix)
Remove all entries that start with prefix.
Param copy(const String &prefix, bool remove_prefix=false) const
Returns a new Param object containing all entries that start with prefix.
void resetZoom()
Definition: TOPPViewBase.cpp:1058
bool isDataDIA() const
Returns if the data is DIA / SWATH-MS data.
void setIntensityMode(int)
Definition: TOPPViewBase.cpp:1067
void resetZoom(bool repaint=true)
Zooms fully out and resets the zoom stack.
bool contains(const Type &type) const
check if type is contained in this array
EnhancedTabBar tab_bar_
Tab bar. The address of the corresponding window to a tab is stored as an int in tabData()
Definition: TOPPViewBase.h:446
boost::shared_ptr< ExperimentType > ExperimentSharedPtrType
SharedPtr on MSExperiment.
Definition: LayerData.h:153
#define CONNECTCAST(class, func, args)
Definition: GUIHelpers.h:51
bool containsIMData() const
do the names of internal metadata arrays contain any hint of ion mobility data, e....
void removeFile(const String &path)
removes a file from the watcher
Definition: FileWatcher.h:90
void setMetadataOnly(bool only)
sets whether or not to load only meta data
static const String CAPTION_3D_SUFFIX_
Suffix appended to caption of tabs when layer is shown in 3D.
Definition: TOPPViewBase.h:511
const String & getName() const
Definition: LayerData.h:446
void getVisibleFeatureData(FeatureMapType &map) const
Fills the handed over map with the visible features of the current layer.
void setYLabel(const QString &l)
Definition: Spectrum3DOpenGLCanvas.h:102
second tab
Definition: SpectraSelectionTabs.h:64
void store(const String &filename, const ConsensusMap &consensus_map)
Stores a consensus map to file.
void layerDataChanged()
emitted whenever a change to a layer happened, e.g. its name was changed, it was removed,...
void addRecentFile_(const String &filename)
adds a Filename to the recent files
Definition: TOPPViewBase.cpp:957
A log window (QTextEdit) with convenience functions.
Definition: LogWindow.h:53
QLabel * mz_label_
m/z label for messages in the status bar
Definition: TOPPViewBase.h:458
static const std::string NamesOfLabelType[SIZE_OF_LABEL_TYPE]
Label names.
Definition: LayerData.h:135
bool getParsingSuccess() const
Returns whether parsing was successful.
boost::shared_ptr< FeatureMap > FeatureMapSharedPtrType
SharedPtr on feature map.
Definition: LayerData.h:141
void toggleInterestingMZs()
Toggles drawing of interesting MZs.
Definition: TOPPViewBase.cpp:2403
String getSequence() const
Consensus feature data.
Definition: LayerData.h:101
boost::shared_ptr< ConsensusMap > ConsensusMapSharedPtrType
SharedPtr on consensus features.
Definition: LayerData.h:147
void runTOPPTool_()
Runs the TOPP tool according to the information in topp_.
Definition: TOPPViewBase.cpp:1676
void appendNewHeader(const LogState state, const String &heading, const String &body)
appends a new block with heading and a body
Int getMergeLayer() const
Returns the index of the selected merge layer. If the option is not selected -1 is returned.
Size getLayerCount() const
Returns the number of layers.
Definition: SpectrumCanvas.h:366
Definition: LayerData.h:567
void setLabel(LayerData::LabelType label)
Definition: SpectrumCanvas.h:326
QButtonGroup * intensity_button_group_
Definition: TOPPViewBase.h:420
TOPPViewMenu menu_
manages the menu items (active/inactive) and recent files etc
Definition: TOPPViewBase.h:450
static String basename(const String &file)
Returns the basename of the file (without the path).
Invalid value exception.
Definition: Exception.h:335
void show(TAB_INDEX which)
enable and show the which tab
void store(const String &filename, const PeakMap &map) const
Stores a map in an MzML file.
void setMZ(CoordinateType mz)
Mutable access to m/z.
Definition: Peak1D.h:121
void disableDimension(bool as_2d)
Disables view dimension section and sets the selected option.
int addTab(const String &text, int id)
Adds a new tab with the name text and the identifier id.
Logarithmic mode.
Definition: SpectrumCanvas.h:187
MzML file (.mzML)
Definition: FileTypes.h:71
LayerData::FeatureMapSharedPtrType FeatureMapSharedPtrType
Definition: TOPPViewBase.h:137
void changeLayerFilterState(Size i, bool b)
change if the defined data filters are used
No label is displayed.
Definition: LayerData.h:126
void setValue(const String &key, const DataValue &value, const String &description="", const StringList &tags=StringList())
Sets a value.
const ODExperimentSharedPtrType & getOnDiscPeakData() const
Returns a mutable reference to the on-disc data.
Definition: LayerData.h:265
void addFile(const String &path)
Adds a file to the watcher.
Definition: FileWatcher.h:84
Dataset opening options for TOPPView.
Definition: TOPPViewOpenDialog.h:60
EnhancedWorkspace * getWorkspace()
returns a pointer to the EnhancedWorkspace containing SpectrumWidgets
Definition: TOPPViewBase.cpp:1462
File adapter for MzML files.
Definition: MzMLFile.h:55
A more convenient string class.
Definition: String.h:59
Representation of a peak/feature filter combining FilterType, FilterOperation and a value (either dou...
Definition: DataFilters.h:74
File not found exception.
Definition: Exception.h:523
void fileOpen(QString file)
Canvas for visualization of one or several spectra.
Definition: Spectrum1DCanvas.h:67
void setValidStrings(const String &key, const std::vector< String > &strings)
Sets the valid strings for the parameter key.
LayerData::FeatureMapType FeatureMapType
Definition: TOPPViewBase.h:135
String current_path_
Definition: TOPPViewBase.h:507
In-Memory representation of a mass spectrometry experiment.
Definition: MSExperiment.h:77
const std::vector< Precursor > & getPrecursors() const
returns a const reference to the precursors
OpenMS consensus map format (.consensusXML)
Definition: FileTypes.h:66
void abortTOPPTool()
aborts the execution of a TOPP tool
Definition: TOPPViewBase.cpp:2323
Main window of TOPPView tool.
Definition: TOPPViewBase.h:123
void fileChanged_(const String &)
Called if a data file has been externally changed.
Definition: TOPPViewBase.cpp:2543
void disableCutoff(bool cutoff_on)
Disables cutoff section and sets the selected option.
Extension to the QApplication for running TOPPs GUI tools.
Definition: QApplicationTOPP.h:50
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
QActionGroup * group_unassigned_2d_
Definition: TOPPViewBase.h:437
double getMonoWeight(Residue::ResidueType type=Residue::Full, Int charge=0) const
void dropReceived(const QMimeData *data, QWidget *source, int id)
Signal that is emitted, when a drag-and-drop action ends on this widget.
String toString(bool full_precision=true) const
Conversion to String full_precision Controls number of fractional digits for all double types or list...
const AreaType & getVisibleArea() const
Returns the currently visible area.
Definition: SpectrumCanvas.h:340
const FeatureMapSharedPtrType & getFeatureMap() const
Returns a const reference to the current feature data.
Definition: LayerData.h:204
bool loadFeatures(const String &filename, FeatureMap &map, FileTypes::Type force_type=FileTypes::UNKNOWN)
Loads a file into a FeatureMap.
void add(const DataFilter &filter)
Adds a filter.
void closeEvent(QCloseEvent *event) override
Definition: TOPPViewBase.cpp:499
The file pendant of the Param class used to load and store the param datastructure as paramXML.
Definition: ParamXMLFile.h:49
void closeRequested(int id)
Signal that indicates that the tab with identifier id is requested to be removed (double click or con...
void setDrawMode1D(int)
Definition: TOPPViewBase.cpp:1077
void annotateWithAMS()
Annotates current layer with ID data from AccurateMassSearch.
Definition: TOPPViewBase.cpp:1890
void update()
update items in the two tabs according to the currently selected layer
void updateViewBar()
adapts view bar to the active window
Definition: TOPPViewBase.cpp:1302
bool isCutoffEnabled() const
Returns if the low intensity peaks should be hidden.
void updateMenu()
activates/deactivates menu entries
Definition: TOPPViewBase.cpp:1307
String prefix(SizeType length) const
returns the prefix of length length
void toggleProjections()
Definition: TOPPViewBase.cpp:1872
void currentIdChanged(int id)
Signal that indicates that the current tab changed, giving the id of the Tab.
bool annotate(LayerData &layer, LogWindow &log, const String ¤t_path) const
SpectrumWidget * getActiveSpectrumWidget() const
returns a pointer to the active SpectrumWidget (0 if none is active)
Definition: TOPPViewBase.cpp:1467
draw data as peak
Definition: Spectrum1DCanvas.h:104
const DataValue & getValue(const String &key) const
Returns a value of a parameter.
Int get1stLayerIndex()
Returns the index of the selected non-flipped layer.
mzIdentML (HUPO PSI AnalysisXML followup format) (.mzid)
Definition: FileTypes.h:76
QToolBar * tool_bar_
Definition: TOPPViewBase.h:417
EnhancedWorkspace ws_
Main workspace.
Definition: TOPPViewBase.h:444
virtual void getSpectrum(PeakSpectrum &spec, const AASequence &peptide, Int min_charge, Int max_charge) const
Generates a spectrum for a peptide sequence, with the ion types that are set in the tool parameters.
static bool remove(const String &file)
Removes a file (if it exists).
void setLayerName(Size i, const String &name)
Sets the name of layer i.
static String getUniqueName(bool include_hostname=true)
Returns a string, consisting of date, time, hostname, process id, and a incrementing number....
void addData(FeatureMapSharedPtrType feature_map, ConsensusMapSharedPtrType consensus_map, std::vector< PeptideIdentification > &peptides, ExperimentSharedPtrType peak_map, ODExperimentSharedPtrType on_disc_peak_map, LayerData::DataType data_type, bool show_as_1d, bool show_options, bool as_new_window=true, const String &filename="", const String &caption="", UInt window_id=0, Size spectrum_id=0)
Adds a peak or feature map to the viewer.
Definition: TOPPViewBase.cpp:759
Size indexOf(const ContainerType &cont, const typename ContainerType::value_type &val)
Definition: EnumHelpers.h:45
void setParam(const Param ¶m)
initialize GUI values with these parameters
PeakFileOptions & getOptions()
Mutable access to the options for loading/storing.
IntensityModes
Display modes of intensity.
Definition: SpectrumCanvas.h:182
Canvas for 3D-visualization of peak map data.
Definition: Spectrum3DCanvas.h:66
Identifications: Show labels (not sequences)
Definition: LayerData.h:116
Unknown file extension.
Definition: FileTypes.h:59
void linkZoom()
link the zoom of individual windows
Definition: TOPPViewBase.cpp:1361
Spectrum1DWidget * getActive1DWidget() const
returns a pointer to the active Spectrum1DWidget (0 the active window is no Spectrum1DWidget or there...
Definition: TOPPViewBase.cpp:1486
void showGridLines(bool show)
Whether or not to show grid lines.
Pimped QListView for Layers of a Canvas.
Definition: LayerListView.h:52
bool hasSubstring(const String &string) const
true if String contains the string, false otherwise
DrawModes getDrawMode() const
Returns the draw mode of the current layer.
void layerActivated(QWidget *w)
Signal emitted whenever a new layer is activated within the current window.
Feature data.
Definition: LayerData.h:100
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:92
The element number is used.
Definition: LayerData.h:127
const LayerData & getCurrentLayer() const
returns the layer data of the active layer
Definition: SpectrumCanvas.h:281
QToolButton * dm_unassigned_2d_
Definition: TOPPViewBase.h:436
static bool writable(const String &file)
Return true if the file is writable.
void load(const String &filename, std::vector< ProteinIdentification > &protein_ids, std::vector< PeptideIdentification > &peptide_ids)
Loads the identifications of an idXML file without identifier.
Exception indicating that an invalid parameter was handed over to an algorithm.
Definition: Exception.h:347
FilterList * filter_list_
Definition: TOPPViewBase.h:399
void closeByTab(int id)
Closes the window corresponding to the data of the tab with identifier id.
Definition: TOPPViewBase.cpp:967
Exception-safe way of executing arbitrary code at the end of a scope.
Definition: RAIICleanup.h:48
Precursor meta information.
Definition: Precursor.h:57
void print_usage()
Definition: TOPPView.cpp:84
void metadataFileDialog()
dialog for inspecting database meta data
Definition: TOPPViewBase.cpp:2415
File adapter for MzIdentML files.
Definition: MzIdentMLFile.h:67
Forward const iterator for the Param class.
Definition: Param.h:197
const ConstExperimentSharedPtrType getPeakData() const
Returns a const reference to the current in-memory peak data.
static bool exists(const String &file)
Method used to test if a file exists.
void setMergeLayers(const Map< Size, String > &layers)
Sets the possible merge layers (index and name) and activates the option.
Undefined data type indicating an error.
Definition: LayerData.h:103
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
QButtonGroup * draw_group_1d_
Definition: TOPPViewBase.h:424
bool toBool() const
Conversion to bool.
Spectrum2DWidget * getActive2DWidget() const
returns a pointer to the active Spectrum2DWidget (0 the active window is no Spectrum2DWidget or there...
Definition: TOPPViewBase.cpp:1491
Spectrum profile or centroided data.
Definition: LayerData.h:98
static String number(double d, UInt n)
returns a string for d with exactly n decimal places
void addSpectrum(const MSSpectrum &spectrum)
adds a spectrum to the list
const LayerData & getLayer(Size index) const
returns the layer data with index index
Definition: SpectrumCanvas.h:270
QDockWidget * filter_dock_widget_
Definition: TOPPViewBase.h:389
QMenu * add_2d_context_
Additional context menu for 2D layers.
Definition: TOPPViewBase.h:500
SpectraSelectionTabs * selection_view_
Definition: TOPPViewBase.h:395
Features: Unassigned peptide hits.
Definition: LayerData.h:111
void showCurrentPeaksAs2D()
Shows the current peak data of the active layer in 2D.
Definition: TOPPViewBase.cpp:2046
OpenMS feature file (.featureXML)
Definition: FileTypes.h:64
void changeLabel(QAction *)
Definition: TOPPViewBase.cpp:1086
Peptide identification data.
Definition: LayerData.h:102
String filename
file name of the file the data comes from (if available)
Definition: LayerData.h:456
QLabel * rt_label_
RT label for messages in the status bar.
Definition: TOPPViewBase.h:460
bool viewMapAs1D() const
Returns true, if 1D mode is to be used for maps.
void remove_chromatogram_flag()
remove the chromatogram flag
Definition: LayerData.h:403
const LayerData * getCurrentLayer() const
Returns the active Layer data (0 if no layer is active)
Definition: TOPPViewBase.cpp:1862
bool exists(const String &key) const
Tests if a parameter is set (expecting its fully qualified name, e.g., TextExporter:1:proteins_only)
void copyLayer(const QMimeData *data, QWidget *source, int id=-1)
Slot for drag-and-drop of layer manager to tabbar.
Definition: TOPPViewBase.cpp:2448
EnhancedTabBarWidgetInterface * getWidget(int id) const
void loadPreferences(String filename="")
Loads the preferences from the filename given.
Definition: TOPPViewBase.cpp:1501
void setLayerFlag(LayerData::Flags f, bool value)
sets a layer flag of the current layer
Definition: SpectrumCanvas.h:304
Filter the intensity value.
Definition: DataFilters.h:58
ExperimentType::SpectrumType SpectrumType
Peak spectrum type.
Definition: TOPPViewBase.h:151
void update(SpectrumWidget *active_widget)
rebuild list of layers and remember current widget (for context menu etc)
void initializeDefaultParameters_()
Initializes the default parameters on TOPPView construction.
Definition: TOPPViewBase.cpp:465
double getClockTime() const
QDockWidget * views_dockwidget_
Definition: TOPPViewBase.h:388
const ExperimentType::SpectrumType & getCurrentSpectrum() const
Returns a const reference to the current spectrum (1D view)
LogWindow * log_
Log output window.
Definition: TOPPViewBase.h:412
LayerData::ConsensusMapSharedPtrType ConsensusMapSharedPtrType
Definition: TOPPViewBase.h:142
Class that stores the data for one layer.
Definition: LayerData.h:89
void getVisibleConsensusData(ConsensusMapType &map) const
Fills the handed over map with the visible consensus features of the current layer.
void parseCommandLine(const int argc, const char **argv, const String &prefix="")
Parses command line arguments.
Facilitates file handling by file type recognition.
Definition: FileHandler.h:62
Shows the maximum displayed intensity as if it was the overall maximum intensity.
Definition: SpectrumCanvas.h:186
QToolButton * dm_label_2d_
Definition: TOPPViewBase.h:434
Representation of a mass spectrometry experiment on disk.
Definition: OnDiscMSExperiment.h:68
bool loadExperiment(const String &filename, MSExperiment &exp, FileTypes::Type force_type=FileTypes::UNKNOWN, ProgressLogger::LogType log=ProgressLogger::NONE, const bool rewrite_source_file=true, const bool compute_hash=true)
Loads a file into an MSExperiment.
void load(const String &filename, FeatureMap &feature_map)
loads the file with name filename into map and calls updateRanges().
size_t getNrChromatograms() const
Returns the number of chromatograms available.
Type
Actual file types enum.
Definition: FileTypes.h:57
Unable to create file exception.
Definition: Exception.h:636
bool openAsNewWindow() const
Returns true, if the data should be opened in a new window.
const ConsensusMapSharedPtrType & getConsensusMap() const
Returns a const reference to the consensus feature data.
Definition: LayerData.h:216
void layerZoomChanged()
gets called when a layer changes in zoom
Definition: TOPPViewBase.cpp:1366
QAction * dm_hulls_2d_
Definition: TOPPViewBase.h:433
QToolBar * tool_bar_1d_
Definition: TOPPViewBase.h:423
QLabel * message_label_
Label for messages in the status bar.
Definition: TOPPViewBase.h:456
QAction * dm_precursors_2d_
Definition: TOPPViewBase.h:431
void start()
Start the stop watch.
Identifications: m/z source.
Definition: LayerData.h:115
double getAlignmentScore()
Returns the score of the alignment.
const ExperimentSharedPtrType & getPeakDataMuteable()
Returns a mutable reference to the current in-memory peak data.
Definition: LayerData.h:247
LayerData::ExperimentType ExperimentType
Definition: TOPPViewBase.h:145
static FileTypes::Type getType(const String &filename)
Tries to determine the file type (by name or content)
bool addLayer(ExperimentSharedPtrType map, ODExperimentSharedPtrType od_map, const String &filename="")
Add a peak data layer.
LayerData::ExperimentSharedPtrType ExperimentSharedPtrType
Definition: TOPPViewBase.h:147
Consensus features: Show elements.
Definition: LayerData.h:114
QToolBar * tool_bar_2d_cons_
Definition: TOPPViewBase.h:429
SpectrumCanvas * getActiveCanvas() const
returns a pointer to the active SpectrumCanvas (0 if none is active)
Definition: TOPPViewBase.cpp:1476
void openFile(String filename)
Open a file.
Exception base class.
Definition: Exception.h:89
void setPrecursors(const std::vector< Precursor > &precursors)
sets the precursors
LayerData::ConsensusMapType ConsensusMapType
Definition: TOPPViewBase.h:140
Size getCurrentSpectrumIndex() const
Get the index of the current spectrum (1D view)
Definition: LayerData.h:342
void stop()
Stop the stop watch (can be resumed later). If the stop watch was not running an exception is thrown.
virtual void updateLayer(Size i)=0
Updates layer i when the data in the corresponding file changes.
void setParameters(const Param ¶m)
Sets the parameters.
void setMSLevel(UInt ms_level)
Sets the MS level.
const Param & getDefaults() const
Non-mutable access to the default parameters.
QString toQString() const
Conversion to Qt QString.
void showCurrentPeaksAs3D()
Shows the current peak data of the active layer in 3D.
Definition: TOPPViewBase.cpp:2227
bool hasSuffix(const String &string) const
true if String ends with string, false otherwise
bool visible
if this layer is visible
Definition: LayerData.h:433
void layerDeactivated()
gets called if a layer got deactivated
Definition: TOPPViewBase.cpp:1395
static String path(const String &file)
Returns the path of the file (without the file name).
String toFileDialogFilter(const Filter style, bool add_all_filter) const
Convenience tab bar implementation.
Definition: EnhancedTabBar.h:60
static String getVersion()
Return the version number of OpenMS.
void layerZoomChanged(QWidget *w)
Signal emitted whenever the zoom changed.
combine COMPACT and ONE_BY_ONE
void setCurrentLayerParameters(const Param ¶m)
Sets the parameters of the current layer.
Definition: SpectrumCanvas.h:463
bool chromatogram_flag_set() const
Check whether the current layer is a chromatogram.
Definition: LayerData.h:389
void showPreferences()
Shows current layer preferences.
Definition: TOPPViewBase.cpp:2410
MSExperiment PeakMap
Two-dimensional map of raw data points or peaks.
Definition: StandardTypes.h:61
void toggleGridLines()
Toggles the grid lines.
Definition: TOPPViewBase.cpp:2393
virtual void saveCurrentLayer(bool visible)=0
Saves the current layer data.
bool find(TFinder &finder, const Pattern< TNeedle, FuzzyAC > &me, PatternAuxData< TNeedle > &dh)
Definition: AhoCorasickAmbiguous.h:884
DrawModes
Enumerate all available paint styles.
Definition: Spectrum1DCanvas.h:102
void filterChanged(const DataFilters &filters)
emitted when the user has edited/added/removed a filter
QStringList chooseFilesDialog_(const String &path_overwrite="")
Shows a dialog where the user can select files.
Definition: TOPPViewBase.cpp:1591
Normal mode: f(x)=x.
Definition: SpectrumCanvas.h:184
IntensityModes getIntensityMode() const
Returns the intensity mode.
Definition: SpectrumCanvas.h:239
A container for consensus elements.
Definition: ConsensusMap.h:80
void mergeIntoLayer(Size i, FeatureMapSharedPtrType map)
Merges the features in map into the features layer i.
std::vector< String > StringList
Vector of String.
Definition: ListUtils.h:70
void store(const String &filename, const FeatureMap &feature_map)
stores the map feature_map in file with name filename.
Lets the user select two spectra and set the parameters for the spectrum alignment.
Definition: SpectrumAlignmentDialog.h:56
void load(const String &filename, ConsensusMap &map)
Loads a consensus map from file and calls updateRanges.
unsigned int UInt
Unsigned integer type.
Definition: Types.h:94
void openFilesByDialog(const String &initial_directory="")
shows the file dialog for opening files (a starting directory, e.g. for the example files can be prov...
Definition: TOPPViewBase.cpp:1614
const FloatDataArrays & getFloatDataArrays() const
Returns a const reference to the float meta data arrays.
void disableLocation(bool window)
Disables opening location section and sets the selected option.
void showGoToDialog()
shows the DB dialog for opening files
Definition: TOPPViewBase.cpp:1453
void savePreferences()
Stores the preferences (used when this window is closed)
Definition: TOPPViewBase.cpp:1567
void updateProcessLog()
Appends process output to log window.
Definition: TOPPViewBase.cpp:2311
This class is used to determine the current process' CPU (user and/or kernel) and wall time.
Definition: StopWatch.h:65
void load(const String &filename, std::vector< ProteinIdentification > &poid, std::vector< PeptideIdentification > &peid)
Loads the identifications from a MzIdentML file.
QAction * projections_2d_
Definition: TOPPViewBase.h:439
LayerData::ODExperimentSharedPtrType ODExperimentSharedPtrType
Definition: TOPPViewBase.h:149
RecentFilesMenu recent_files_
manages recent list of filenames and the menu that goes with it
Definition: TOPPViewBase.h:448
void fileChanged(const String &)
Delayed file change signal.
void showCursorStatus(double mz, double rt)
shows m/z and rt in the status bar
Definition: TOPPViewBase.cpp:1027
Param param
Layer parameters.
Definition: LayerData.h:462
OpenMS::Internal::FilterList FilterList
Definition: FilterList.h:94
Features: Convex hulls of single mass traces.
Definition: LayerData.h:110
QToolBar * tool_bar_2d_feat_
Definition: TOPPViewBase.h:428
void addDataFile(const String &filename, bool show_options, bool add_to_recent, String caption="", UInt window_id=0, Size spectrum_id=0)
Opens and displays data from a file.
Definition: TOPPViewBase.cpp:522
void showSpectrumMetaData(int spectrum_index)
shows a spectrum's metadata with index spectrum_index from the currently active canvas
Definition: TOPPViewBase.cpp:2443
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
void setSectionDescription(const String &key, const String &description)
Sets a description for an existing section.
Generates theoretical spectra for peptides with various options.
Definition: TheoreticalSpectrumGenerator.h:68
bool getLayerFlag(LayerData::Flags f) const
returns a layer flag of the current layer
Definition: SpectrumCanvas.h:298
ParamIterator end() const
End iterator for the internal tree.
static String absolutePath(const String &file)
Replaces the relative path in the argument with the absolute path.
ParamIterator begin() const
Begin iterator for the internal tree.
A container for features.
Definition: FeatureMap.h:97
void toggleAxisLegends()
Toggles the axis legends.
Definition: TOPPViewBase.cpp:2398
Parse Error exception.
Definition: Exception.h:622
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
Size getAlignmentSize()
Returns the number of aligned pairs of peaks.
QToolBar * tool_bar_2d_ident_
Definition: TOPPViewBase.h:430
void showCurrentPeaksAsIonMobility()
Shows the current peak data of the active layer as ion mobility.
Definition: TOPPViewBase.cpp:2072
void loadFiles(const StringList &list, QSplashScreen *splash_screen)
Opens all the files in the string list.
Definition: TOPPViewBase.cpp:2343
void activateSpectrum(Size index, bool repaint=true)
Sets current spectrum index of current layer to index.
Watcher that monitors file changes.
Definition: FileWatcher.h:65
void preferencesChange()
Emitted when the layer preferences have changed.
void showSpectrumGenerationDialog()
Shows the theoretical spectrum generation dialog.
Definition: TOPPViewBase.cpp:1914
draw as connected lines
Definition: Spectrum1DCanvas.h:105
QAction * dm_ident_2d_
Definition: TOPPViewBase.h:440
Canvas for 2D-visualization of peak map, feature map and consensus map data.
Definition: Spectrum2DCanvas.h:70
Spectrum3DWidget * getActive3DWidget() const
returns a pointer to the active Spectrum3DWidget (0 the active window is no Spectrum2DWidget or there...
Definition: TOPPViewBase.cpp:1496
void showTOPPDialog_(bool visible)
Apply TOPP tool. If visible is true, only the visible data is used, otherwise the whole layer is used...
Definition: TOPPViewBase.cpp:1628
struct OpenMS::TOPPViewBase::@21 topp_
Information needed for execution of TOPP tools.
void updateLayerBar()
adapts the layer bar to the active window
Definition: TOPPViewBase.cpp:1297
void showTOPPDialog()
Apply TOPP tool.
Definition: TOPPViewBase.cpp:1622
void dropOnTab(const QMimeData *data, QWidget *source, int id)
Signal that is emitted, when a drag-and-drop action ends on a tab.
This class provides Input/Output functionality for feature maps.
Definition: FeatureXMLFile.h:68
static bool readable(const String &file)
Return true if the file exists and is readable.
void updateBarsAndMenus()
calls update*Bar and updateMenu_() to make sure the interface matches the current data
Definition: TOPPViewBase.cpp:1196
Size getCurrentLayerIndex() const
returns the index of the active layer
Definition: SpectrumCanvas.h:292
Definition: LayerData.h:550
Param getSpectrumParameters(UInt dim)
Returns the parameters for a SpectrumCanvas of dimension dim.
Definition: TOPPViewBase.cpp:2316
void preferencesDialog()
shows the preferences dialog
Definition: TOPPViewBase.cpp:508
QToolBar * tool_bar_2d_peak_
Definition: TOPPViewBase.h:427
void updateFilterBar()
adapts the filter bar to the active window
Definition: TOPPViewBase.cpp:1332
void changeUnassigned(QAction *)
Definition: TOPPViewBase.cpp:1118
LabelType label
Label type.
Definition: LayerData.h:483
void dropOnWidget(const QMimeData *data, QWidget *source)
Signal that is emitted, when a drag-and-drop action ends on the unused space on the right side of the...
Definition: LayerData.h:131
DataType
Definition: LayerData.h:96
Param defaults_
Container for default parameters. This member should be filled in the constructor of derived classes!
Definition: DefaultParamHandler.h:169
static String stripExtension(const String &filename)
If filename contains an extension, it will be removed (including the '.'). Special extensions,...
const char * getFile() const noexcept
Returns the file where it occurred.
void updateCurrentPath()
changes the current path according to the currently active window/layer
Definition: TOPPViewBase.cpp:2519
void defaultsToParam_()
Updates the parameters after the defaults have been set in the constructor.
QAction * dm_elements_2d_
Definition: TOPPViewBase.h:438
Progress dialog.
Definition: ProgressLogger.h:73
A widget which shows a list of DataFilter items.
Definition: FilterList.h:60
void getVisiblePeakData(ExperimentType &map) const
Fills the handed over map with the visible peaks of the current layer.
Management and storage of parameters / INI files.
Definition: Param.h:73
void saveLayerAll()
Saves the whole current layer data.
Definition: TOPPViewBase.cpp:2383
static String getTempDirectory()
void closeTab()
closes the active window
Definition: TOPPViewBase.cpp:984
void annotateWithID()
Annotates current layer with ID data.
Definition: TOPPViewBase.cpp:1902
QDockWidget * layer_dock_widget_
Definition: TOPPViewBase.h:387
Representation of a peptide/protein sequence.
Definition: AASequence.h:111
Greater than the value or equal to the value.
Definition: DataFilters.h:67
size_t getNrSpectra() const
Returns the number of spectra available.
void layerStatistics()
Shows statistics (count,min,max,avg) about Intensity, Quality, Charge and meta data.
Definition: TOPPViewBase.cpp:1003
Base class for visualization canvas classes.
Definition: SpectrumCanvas.h:133
const char * what() const noexcept override
Returns the error message of the exception.
FileWatcher * watcher_
Watcher that tracks file changes (in order to update the data in the different views)
Definition: TOPPViewBase.h:403
void store(const String &filename, const Param ¶m) const
Write XML file.
void set(const DataFilters &filters)
void setDrawMode(DrawModes mode)
Sets draw mode of the current layer.
static AASequence fromString(const String &s, bool permissive=true)
create AASequence object by parsing an OpenMS string
Map class based on the STL map (containing several convenience functions)
Definition: Map.h:50
void showSpectrumAlignmentDialog()
Shows the spectrum alignment dialog.
Definition: TOPPViewBase.cpp:2009
void setCharge(Int charge)
Mutable access to the charge.
Preferences dialog for TOPPView.
Definition: TOPPViewPrefDialog.h:58
void finishTOPPToolExecution(int exitCode, QProcess::ExitStatus exitStatus)
slot for the finished signal of the TOPP tools execution
Definition: TOPPViewBase.cpp:1825
#define OPENMS_LOG_INFO
Macro if a information, e.g. a status should be reported.
Definition: LogStream.h:465
int main(int argc, const char **argv)
Definition: TOPPView.cpp:108
DataType type
data type (peak or feature data)
Definition: LayerData.h:439
Dialog which allows to enter an AA sequence and generates a theoretical spectrum for it.
Definition: TheoreticalSpectrumGenerationDialog.h:55
LayerData::ODExperimentSharedPtrType ODExperimentSharedPtrType
Definition: SpectrumCanvas.h:148
File is empty.
Definition: Exception.h:594
void removeId(int id)
Remove the tab with identifier id.
Spectrum3DOpenGLCanvas * openglwidget()
returns the Spectrum3DOpenGLcanvas
LabelType
Label used in visualization.
Definition: LayerData.h:124
void load(const String &filename, Param ¶m)
Read XML file.
~TOPPViewBase() override
Destructor.
Definition: TOPPViewBase.cpp:2683
void showSpectrumWidgetInWindow(SpectrumWidget *sw, const String &caption)
Opens the provided spectrum widget in a new window.
Definition: TOPPViewBase.cpp:1400
void addNewline()
appends a line break (same as append(""))
The representation of a 1D spectrum.
Definition: MSSpectrum.h:67
void showCurrentPeaksAsDIA()
Shows the current peak data of the active layer as DIA data.
Definition: TOPPViewBase.cpp:2143
void layerActivated()
gets called if a layer got activated
Definition: TOPPViewBase.cpp:1352
void updateToolBar()
updates the toolbar
Definition: TOPPViewBase.cpp:1203
void saveLayerVisible()
Saves the visible layer data.
Definition: TOPPViewBase.cpp:2388
std::vector< String > subsections_
Container for registered subsections. This member should be filled in the constructor of derived clas...
Definition: DefaultParamHandler.h:176
bool watcher_msgbox_
Holds the messageboxes for each layer that are currently popped up (to avoid popping them up again,...
Definition: TOPPViewBase.h:406
Features: Overall convex hull.
Definition: LayerData.h:109
boost::shared_ptr< OnDiscMSExperiment > ODExperimentSharedPtrType
SharedPtr on On-Disc MSExperiment.
Definition: LayerData.h:158
File not readable exception.
Definition: Exception.h:537
virtual void showCurrentLayerPreferences()=0
Shows the preferences dialog of the active layer.
double getTolerance() const
void insert(const String &prefix, const Param ¶m)
void showSpectrumBrowser()
shows the spectrum browser and updates it
Definition: TOPPViewBase.cpp:2537
void rerunTOPPTool()
returns the last invoked TOPP tool with the same parameters
Definition: TOPPViewBase.cpp:1658
virtual void setFilters(const DataFilters &filters)
Sets the filters applied to the data before drawing (for the current layer)
QAction * dm_hull_2d_
Definition: TOPPViewBase.h:432
Int get2ndLayerIndex()
Returns the index of the selected flipped layer.
void setLogType(LogType type) const
Sets the progress log that should be used. The default type is NONE!
void editMetadata()
lets the user edit the meta data of a layer
Definition: TOPPViewBase.cpp:989
static String findSiblingTOPPExecutable(const String &toolName)
Searches for an executable with the given name.
Peaks: Mark precursor peaks of MS/MS scans.
Definition: LayerData.h:112
void changeLayerFlag(bool)
Definition: TOPPViewBase.cpp:1164
bool isDIAData() const
Check whether the current layer contains DIA (SWATH-MS) data.
Definition: LayerData.h:368
float estimateNoiseFromRandomScans(const MSExperiment &exp, const UInt ms_level, const UInt n_scans=10, const double percentile=80)
This class provides Input functionality for ConsensusMaps and Output functionality for alignments and...
Definition: ConsensusXMLFile.h:62
Used to load and store idXML files.
Definition: IdXMLFile.h:63
static String typeToName(Type type)
Returns the name/extension of the type.
void layerFilterVisibilityChange(bool)
Enables/disables the data filters for the current layer.
Definition: TOPPViewBase.cpp:1344
A low-level class to read an indexedmzML file.
Definition: IndexedMzMLHandler.h:79
Param param_
Container for current parameters.
Definition: DefaultParamHandler.h:162
Chromatogram data.
Definition: LayerData.h:99
bool zoom_together_
Stores whether the individual windows should zoom together (be linked) or not.
Definition: TOPPViewBase.h:409
const String & getName() const
Non-mutable access to the name.
virtual void showMetaData(bool modifiable=false, Int index=-1)
Shows a dialog with the meta data.
void showCursorStatusInvert(double mz, double rt)
shows m/z and rt in the status bar (inverting RT and m/z)
Definition: TOPPViewBase.cpp:1021
A tabbed view, to browse lists of spectra or identifications.
Definition: SpectraSelectionTabs.h:55
void appendText(const QString &text)
appends text without adding linebreaks and shows the log-window
int getLine() const noexcept
Returns the line number where it occurred.
bool viewMapAs2D() const
Returns true, if 2D mode is to be used for maps.
void layerModficationChange(Size layer, bool modified)
Signal emitted whenever the modification status of a layer changes (editing and storing)