Skip to content

NMR1d Workflow

Pablo Moreno edited this page Sep 22, 2017 · 24 revisions

NMR Workflow MTBLS1 Tutorial

This workflow performs the processing of 1D NMR experiments from raw data to a data matrix required for visualisation and statistics. The first tool imports NMR data from MetaboLights study of choice, which is then converted it to nmrML, an open source raw format. The rnmr1d tool will run the fourier transformation (ftt), zero-filling, line broadening, phase-correction and baseline correction. This steps are considered the pre-processing steps. After those step, the alignment and bucketing of spectra takes place. The data matrix file is produced as output and then fed into the following step that will produce a stacked plot with all spectra.

To follow the demonstration for this workflow, please download the macro settings file for MTBLS1 used in this example, available here (right-click and choose "save this link as...", or equivalent, and name it NP_macro_cmd_ADG19007_nmrML.txt.

This tutorial and the current version (2017-08 Bucetine) of the NMR 1D workflow is supported with data formatted as in MTBLS1. Please read this section if you plan to use your own data.

Due to the high parallelisation used in the workflow, it might become slow and unresponsive on a laptop or small machine. It is recommended to run on a cloud deployment or the PhenoMeNal public instance.

NMR workflow overview

NMR 1D Galaxy Workflow

Video

The complete workflow can be viewed in action by watching the following two video tutorials:

STEP 1: How load and edit the NMR Galaxy application

loading the NMR workflow

STEP 2: Runing the NMR Galaxy workflow

Coming soon

Accompanying text with snapshots

1.- Welcome to the 1D NMR Workflow demonstration on Galaxy, brought to you by the PhenoMeNal project, funded by the European Commission's Horizon 2020 programme.

2.- We will first login to a Galaxy instance deployed through PhenoMeNal. In this video we are using our development instance, but the same steps can be repeated in a newly deployed PhenoMeNal Cloud Research Environment on Amazon, Google or OpenStack.

3.- Click on ‘Login or Register’ at the top, and click on ‘Login’ from the menu options.

4.- Enter your username or email and password. If you deployed through the Portal, this will be available when clicking “more” on your deployment.

5.- You’re now logged into the PhenoMeNal Galaxy instance. We will first take a look at the workflow. For this click on ‘Shared Data’ at the top and select ‘Workflows’ from the drop down menu.

6.- On the workflows list, go to “1D NMR Workflow” and click on the triangle to the right to display the options. Select ‘Import’, which will add the workflow to your own collection.

7.- Click on ‘Start using this workflow’ on the green status rectangle. This will take you to your list of workflows.

8.- Go to ‘1D NMR Workflow’ again and click on it, to choose ‘Edit’ from the drop down menu.

9.- This will display the workflow.

10.- You can move around the workflow canvas by dragging the blue box on the lower right of the window.

11.- The first tool, ‘mtbls_nmr_raw_importer’ imports NMR data from MetaboLights study of choice.

12.- Click on the first tool, mtbls_nmr_raw_importer, and you will notice that the right hand side frame changes to display information and options for this tool. From top to bottom, past the ‘Label’ and ‘Annotation’ fields, you will find the MetaboLights Study Identifier field. You can change the content available there to the study desired. You could change this to MTBLS249 for example (although the macro file will not be optimal for it), but MTBLS1 is a good example as it is not so large.

NMR MetaboLights Importer e.g.

13.- You can notice that between the mtbls_nmr_raw_importer and nmrmlconv the connection cable seems to have multiple threads. This is because the first tool is passing to the second tool a collection of files, and hence the process with be parallelized per each file.

NMR MetaboLights Importer

14.- The second tool, nmrmlconv, takes raw data as provided by the metabolights downloader in a zip file, and converts it to nmrML, an open source raw format.

15.- Click on nmrmlconv. Here you can select the ‘Vendor format’ to be used.

16.- Each nmrML file produced by nmrmlconv will be passed separately to Zip nmrML collection, to put them all together in a single zip file, so that this single file can be passed to the following tool, rnmr1d, which will runs the main analysis steps, including the initial pre-processing to the final alignment of the spectra.

17.- rnmr1d receives a macro file containing parameters for setup, you can download an example on the top of the wiki page leading to this video / tutorial. We will explain how to upload the file to Galaxy when we actually execute the workflow in a few more steps ahead. Alternatively, you can use the “1D NMR MTBLS1 History”, under Shared data, Histories.

NMR processing

18.- rnmr1d will run the fourier transformation (ftt), zero-filling, line broadening, phase-correction and baseline correction. This steps are considered the pre-processing steps. After those step, the alignment and bucketing of spectra takes place. The data matrix file is produced as output and then fed into the following step,

19.- The last step of the workflow, rnmr1d-stacked-plot, will take the data matrix generated in the previous step and produce a stacked plot with all spectra.

20.- Now we are going to run the actual workflow. Go to the upper menu and click on “Analyze Data”.

21.- We are now going to load the data into the history. Download the data from this link to your computer. Go to the upper left part of the browser window where there is a button with an arrow pointing up, next to the word “Tools”. Press that button.

22.- A new window is shown, here you can select files in your computer to be uploaded to Galaxy. Click on the button “Choose local file” and navigate in your computer to find the file “NP_macro_cmd_ADG19007_nmrML.txt”, select it and press “Open”. On the window that you are now on, press the blue “Start” button to the lower right. This will start the upload process. Then press the button “Close”

NMR processing macro

23.- Soon, the file uploaded, shown in the history panel to the right will turn green, signalling that is ready to be used.

24.- Go to “Workflow” in the menu on the top and click it. In the following screen select “1D NMR Workflow” and click to display the drop down menu, to press Run.

25.- First field “history options” asks whether we want the resulting files of the execution to be left on a different history, for this time, we will leave this option in No.

26.- On “MetaboLights” study identifier, just leave the default MTBLS1. This could be executed with other MetaboLights NMR studies, but the macro file that we have as data is only correct for MTBLS1.

27.- On “Input dataset” select from the pull down menu the file that you just uploaded (“NP_macro_cmd_ADG19007_nmrML.txt”).

28.- There is no need to tweak other fields for other tools, so you can just proceed to press “Run workflow” on the top right of the frame. This will initiate the execution of the pipeline.

29.- Files will start to appear progressively on the history to the right, changing colours from grey to green to show status. A small clock will be displayed when the job is actually running. The run will take approximately 10 minutes.

30.- Once all files are shown in green (might be useful to refresh the history with the circled arrows next to “History”) you can download the NMR data matrix pressing on “NMR data matrix” and then on the diskette icon on the lower left of that frame. You can view the PDF plot of the aligned spectra by clicking on the eye icon next to “PDF Plot file”.

References

Jacob D, Deborde C, Lefebvre M, Maucourt M, Moing A. NMRProcFlow: a graphical and interactive tool dedicated to 1D spectra processing for NMR-based metabolomics. Metabolomics. 2017;13(4):36. doi:10.1007/s11306-017-1178-y.

Acknowledgements

The Galaxy modules have been containerized by Kristian Peters (IPB-Halle), Reza Salek (EMBL-EBI) feedback and testing the modules. The Rnmr1D NMR data processing tool in "R" was written by Daneil Jacob (INRA). Tools integrated into the PhenoMeNal instance with the help of Pablo Moreno (EMBL-EBI). A huge thank you to the PhenoMeNal NMR working group in improving and the testing modules.

Clone this wiki locally