GUI

MetaboLabPy - Home

MetaboLabPy - Documentation

GUI - Main Window

MetaboLabPy

The Graphical User Interface

NMR Spectrum | Processing Parameters | Display Parameters | Acquisition Parameters | Title File | pUlseProgram | Script | cOnsole | Help | Menu Items

Main Window

GUI - Home

The main window of the MetaboLabPy GUI is organised as several tabs, each of which focusing on a specific area associated with the loaded NMR spectra. The first tab (NMR Spectrum) displays the selected NMR spectra. The Processing Parameters tab is used to set data processing such as phase correction values, the amount of line broadening etc. The information set in the Display Parameters tab determines how the NMR spectra are displayed (e.g. plot colour, minimum and maximum contour levels for 2D NMR spectra). The Acquisition Parameters tab summarises settings used to acquire the NMR spectrum. Information saved in title files is presented in the Title file tab. The used pulse program is shown inside the pUlseProgram tab. Reading NMR data from raw spectrometer data files as well as NMR data processing can be automated using scripts displayed in the Script tab. Any console output including error messages will be displayed in the cOnsole tab. Help files as well as links to popular NMR data bases such as BML, HDMB, KEGG and more are available in the Help tab. Every tab can be activated using keyboard shortcuts. On the Windows platform this is the combination of Ctrl + ⇧ + the first capitalised letter of the tab name (e.g. Ctrl + ⇧ + D to reach the Display Parameters tab and Ctrl + ⇧ + O to reach the cOnsole tab). Specifics for every tab are discussed below. There are specific action Items available from the different menus. These are discussed in the Menu Items section below.

NMR Spectrum | Processing Parameters | Display Parameters | Acquisition Parameters | Title File | pUlseProgram | Script | cOnsole | Help | Menu Items

NMR Spectrum | Processing Parameters | Display Parameters | Acquisition Parameters | Title File | pUlseProgram | Script | cOnsole | Help | Menu Items

NMR Spectrum

GUI - Home

GUI - Main Window

Once NMR spectra are loaded into the software, additional options appear below the spectrum display. For 1D-NMR spectra these options include Data Pre-Processing, Peak Picking and Spline baseline correction. These options will be discussed in Basic NMR Data Processing.

NMR Spectrum | Processing Parameters | Display Parameters | Acquisition Parameters | Title File | pUlseProgram | Script | cOnsole | Help | Menu Items

NMR Spectrum | Processing Parameters | Display Parameters | Acquisition Parameters | Title File | pUlseProgram | Script | cOnsole | Help | Menu Items

GUI - Home

Processing Parameters

GUI - Main Window

In this tab, NMR processing parameters can be se for each spectrum. These include the amount of zero filling, the type of window function, amount of line broadening, phase correction values to ensure pure absorptive lineshapes and whether to perform post-acquisition water suppression and strip-transform if necessary. The baseline correction parameters can be determined automatically, which is covered in Basic NMR Data Processing. Similarly, phase correction parameters are best to be determined interactively, which is also covered in Basic NMR Data Processing.

NMR Spectrum | Processing Parameters | Display Parameters | Acquisition Parameters | Title File | pUlseProgram | Script | cOnsole | Help | Menu Items

NMR Spectrum | Processing Parameters | Display Parameters | Acquisition Parameters | Title File | pUlseProgram | Script | cOnsole | Help | Menu Items

GUI - Home

Display Parameters

GUI - Main Window

Settings in this tab determine the look and feel of the displayed NMR spectra. Adjustable parameters include line colour, which for 1D-NMR spectra is set as PosCol and for 2D-NMR spectra is both PosCol and NegCol, PosCol for positive contour lines and NegCol for negative contour lines. The user can choose RGB and then provide RGB values in the interval 0 to 1, or colours which are labelled in the drop down menus.

2D-NMR spectra are displayed as contour plots, the number of contour levels (nLevels) as well as the minimum and maximum contour levels can be set here. The axis type can be set to Hz or ppm, axis labels selected and a phase reference dataset can be set, which is usually experiment 1 and the colour of that phase reference spectrum can be set when in interactive phase correction mode to ensure consistent phase corrections across a large set of 1D-NMR spectra.

NMR Spectrum | Processing Parameters | Display Parameters | Acquisition Parameters | Title File | pUlseProgram | Script | cOnsole | Help | Menu Items

NMR Spectrum | Processing Parameters | Display Parameters | Acquisition Parameters | Title File | pUlseProgram | Script | cOnsole | Help | Menu Items

GUI - Home

GUI - Main Window

Acquisition Parameters

The Acquisition Parameters tab is display only. The most important acquisition parameters are displayed here and are here for reference purposes.

NMR Spectrum | Processing Parameters | Display Parameters | Acquisition Parameters | Title File | pUlseProgram | Script | cOnsole | Help | Menu Items

NMR Spectrum | Processing Parameters | Display Parameters | Acquisition Parameters | Title File | pUlseProgram | Script | cOnsole | Help | Menu Items

GUI - Home

GUI - Main Window

Title File

Both Bruker and Varian allow for meta-information to be associated with each NMR spectrum at time of acquisition to uniquely identify every single NMR spectrum. It is the responsibility of the NMR spectrometer operator to ensure that this information is associated with each spectrum, although MetaboLabPy also contains functionality to associate that meta-information with each NMR spectrum from an Excel spreadsheet, although this requires the use of the automatic sample changing robot SampleJet and therefore is entirely Bruker centric.

NMR Spectrum | Processing Parameters | Display Parameters | Acquisition Parameters | Title File | pUlseProgram | Script | cOnsole | Help | Menu Items

NMR Spectrum | Processing Parameters | Display Parameters | Acquisition Parameters | Title File | pUlseProgram | Script | cOnsole | Help | Menu Items

GUI - Home

GUI - Main Window

Pulse Program

The TopSpin software stores a version of the pulse sequence used to acquire the NMR spectrum with each raw NMR data file. MetaboLabPy reads this pueseprogram in and displays the pueseprogram in this tab.

NMR Spectrum | Processing Parameters | Display Parameters | Acquisition Parameters | Title File | pUlseProgram | Script | cOnsole | Help | Menu Items

NMR Spectrum | Processing Parameters | Display Parameters | Acquisition Parameters | Title File | pUlseProgram | Script | cOnsole | Help | Menu Items

GUI - Home

GUI - Main Window

Script

Because MetaboLabPy is implemented as a series of python classes, procedures can be easily automated via python scripts. MetaboLabPy has a scripting interface and a collection of example scripts, all of which are well documented so that use of them should be more or less self-explanatory. Especially reading in a series of NMR spectra is greatly facilitated using the scripting interface.

Scripting is also possible just running the python interpreter and creating a NmrDataSet object or by doing the same as part of a Jupyter notebook. Both of these possibilities will be discussed in MetaboLabPy Scripts and MetaboLabPy and Jupyter Notebooks, respectively.

NMR Spectrum | Processing Parameters | Display Parameters | Acquisition Parameters | Title File | pUlseProgram | Script | cOnsole | Help | Menu Items

NMR Spectrum | Processing Parameters | Display Parameters | Acquisition Parameters | Title File | pUlseProgram | Script | cOnsole | Help | Menu Items

GUI - Home

GUI - Main Window

Console

Most GUI routines re-route their standard output device to the cOnsole tab. Any output will be displayed in this window. Execute script texts will appear in blue, error messages in red and normal output either in black or in white depending on light or dark mode settings.

NMR Spectrum | Processing Parameters | Display Parameters | Acquisition Parameters | Title File | pUlseProgram | Script | cOnsole | Help | Menu Items

NMR Spectrum | Processing Parameters | Display Parameters | Acquisition Parameters | Title File | pUlseProgram | Script | cOnsole | Help | Menu Items

GUI - Home

GUI - Main Window

Help

As the name suggests, this tab contains the included documentation, which is also available at https://ludwigc.github.io/metabolabpy/index.html. In addition quick access to NMR and metabolism related databases, including the Birmingham Metabolite Library (BML), the Human Metabolome Database (HMDB), the Small Molecule Pathway Database (SMPDB), the Biological Magnetic Resonance Bank Database (BMRB), the Kyoto Encyclopedia of Genes and Genomes Database (KEGG), NMRShiftDB2, the Database for Organic Compounds (SDBS) and the SpinCouple Database.

NMR Spectrum | Processing Parameters | Display Parameters | Acquisition Parameters | Title File | pUlseProgram | Script | cOnsole | Help | Menu Items

NMR Spectrum | Processing Parameters | Display Parameters | Acquisition Parameters | Title File | pUlseProgram | Script | cOnsole | Help | Menu Items

GUI - Home

GUI - Main Window

Menu Items

To explore the different options, click on the different menu items. Click on the X to close the pop-up window.

NMR Spectrum | Processing Parameters | Display Parameters | Acquisition Parameters | Title File | pUlseProgram | Script | cOnsole | Help | Menu Items

In this menu, default configurations can be stored (Save as Default), reload and reset to MetaboLabPy defaults. The colour scheme can be set to system mode (same as operating system or enforce either high or dark mode. The application can be put into fullscreen/windowed mode (Alt + F). The splash screen can also be displayed for 5 seconds.

This menu deals with data processing options. Data can be Fourier-Transformed (Ctrl + F / ⌘ + F, automatically referenced to either TMSP or, if not present, to the water resonance in the middle of the spectrum (Alt + R / ⌘ + R). This menu also shows the keyboard shortcuts to access the different tabs of the GUI. All NMR data can be removed from memory via the Clear command (Ctrl + ⇧ + C / ⌘ + ⇧ + C).

The integrated command line can be (de-)activated by pressing escape. The command line keeps a history of executed commands, which can be displayed using the command h() on the command line. Previous commands can be recalled using
/
when the command line is active. Scripts can be executed / saved using the keyboard shortcuts Ctrl + X / Meta + S, respectively,

Actions in this menu are all related to NMR spectra display. Plot settings can be reset with Reset Plot (Ctrl + R or ⌘ + R). Spectrum display can be changed to the previous/next experiment with Alt +
/ Alt +
, respectively. If there is more than one dataset, datasets can be changed to the previous / next dataset using Alt +
/ Alt +
, respectively.

To plot all spectra in the current dataset, click on Select All Sec for Plot (Alt + ⇧ + A), revert back to display the current spectrum only by clicking on Clear All Selected Spa for Plot (Alt + ⇧ + C).

For any spectral area, clicking on Vertical AutoScale (Alt + V) will change the vertical scaling to be optimal for the currently selected horizontal section of the NMR spectra. Clicking on Horizontal AutoScale (Alt + H) will unzoom the chemical shift axis but keep the current vertical scaling.

Mouse actions can be changed between zoom (Meta + Alt + Z, use right mouse button to unzoom) and pan (Meta + Alt + P), where the spectrum can be dragged across the screen.

NMR data can be read into MetaboLabPy from different sources. Both Bruker and Varian raw NMR data can be read into MetaboLabPy using the Open NMR Spectrum entry. On Windows, this can be achieved using the keyboard shortcut Ctrl + O, on macOS using ⌘ + O. NMR data can be save using the MetaboLabPy data file format using Ctrl + S (⌘ + S on macOS). Files saved in this format can be loaded in again using Load (Ctrl + L on Windows, ⌘ + S on macOS). On Windows a desktop icon capable of starting MetaboLabPy can be generated with the Create Desktop Icon entry. On macOS the equivalent LaunchPad starter can be generated by clicking on Create Launchpad Icon instead. The software can be shutdown by clicking on Quit (Ctrl + Q or ⌘ + Q).