Quick Start Guide to nmrPipe Processing of 15N-HSQC...

11
1 Quick Start Guide to nmrPipe Processing of 15 N-HSQC data Data conversion: We make the basic assumption here that the data set was recorded on an INOVA-class or later model of NMR instrument running VNMRJ. We further assume that the BioPack pulse sequence named gNhsqc was used to record using the HSQC data set. The goal will be to read/convert the native spectrometer data into the format used by nmrPipe, and simultaneously to transfer parameters used to provide chemical shift reference to the converted data. Load the original Varian data into your working directory. It may be useful to create a copy of the original data to prevent corruption. NMR data must be converted from the native format used by the spectrometer into the data structure used by the nmrPipe software. This process will also transfer parameters for referencing the data from the procpar file. Within your .fid directory, change to a c-shell (type csh if you are not already running in c-shell command mode) and type varian. The dialog panel shown below will appear:

Transcript of Quick Start Guide to nmrPipe Processing of 15N-HSQC...

Page 1: Quick Start Guide to nmrPipe Processing of 15N-HSQC datanmrc.utah.edu/.../Quick_Start_Guide_to_nmrPipe_Processing_for_gNh… · Quick Start Guide to nmrPipe Processing of 15N-HSQC

1

Quick Start Guide to nmrPipe Processing of 15N-HSQC data Data conversion:

We make the basic assumption here that the data set was recorded on an INOVA-class or later model of NMR instrument running VNMRJ. We further assume that the BioPack pulse sequence named gNhsqc was used to record using the HSQC data set. The goal will be to read/convert the native spectrometer data into the format used by nmrPipe, and simultaneously to transfer parameters used to provide chemical shift reference to the converted data. Load the original Varian data into your working directory. It may be useful to create a copy of the original data to prevent corruption. NMR data must be converted from the native format used by the spectrometer into the data structure used by the nmrPipe software. This process will also transfer parameters for referencing the data from the procpar file. Within your .fid directory, change to a c-shell (type csh if you are not already running in c-shell command mode) and type varian. The dialog panel shown below will appear:

Page 2: Quick Start Guide to nmrPipe Processing of 15N-HSQC datanmrc.utah.edu/.../Quick_Start_Guide_to_nmrPipe_Processing_for_gNh… · Quick Start Guide to nmrPipe Processing of 15N-HSQC

2

The initial panel view is generic, and indicates the presence of three channels even though the experiment contains only two frequency domains. Begin editing the conversion script by selecting the Read Parameters button near the lower left region of the NMRPipe Conversion Utility dialog box. Parameters are read from the procpar file and the Conversion Utility dialog box changes to reflect the input as shown below:

Information in the dialog box cells changes to reflect the acquisition parameters defined in the procpar file. Note that several cells are colored yellow. Curiously, the conversion is incorrect for the indirectly detected dimension (15N in this case) and must be manually corrected as shown in the next figure.

Page 3: Quick Start Guide to nmrPipe Processing of 15N-HSQC datanmrc.utah.edu/.../Quick_Start_Guide_to_nmrPipe_Processing_for_gNh… · Quick Start Guide to nmrPipe Processing of 15N-HSQC

3

The conversion script is now ready to execute. Select the Save Script button to create

a hardcopy of the conversion script – this should always be done so that a record of

details of the conversion can be reviewed.

Convert the data by selecting the Execute Script button. You may observe the

appearance of temporary activity dialog like the one shown below:

When file conversion is complete, the dialog box will disappear. A new file named test.fid

will be created.

You may terminate this session by selecting the Quit button.

Page 4: Quick Start Guide to nmrPipe Processing of 15N-HSQC datanmrc.utah.edu/.../Quick_Start_Guide_to_nmrPipe_Processing_for_gNh… · Quick Start Guide to nmrPipe Processing of 15N-HSQC

4

.

Determination of Processing Parameters:

The processing of two-dimensional (2D) time-domain NMR into a 2D spectrum consists of two sequential Fourier transformations of the NMR data. The real-time, f2, data transform is carried first. For the purposes of this guide, the essential task will be to render the f2 spectra in pure-absorptive lineshape. The process of producing the absorptive shape is known as phasing. To begin review of the data type nmrDraw test.fid at the (unix) command prompt to open nmrDraw and the converted data set. Note that the nmrDraw buttons icons are old school Mac style. A left mouse click will execute the first option in the pull-down menu, while right-click will display the pull-down menu and allow you to select an option from the menu.

Typing h toggles on the interactive horizontal selection mode - a horizontal line appears in the display that is under control of the left mouse button. The vertical (Y) position of cursor specifies a row in the 2D data matrix. A line will appear midway up the vertical axis and that particular FID will be displayed below it, overlaid on the spectrum. In the upper left of the window, the Y index value of the horizontal line will appear. This index value can be edited, and doing so will specify the row selected, e.g., from 308 to 1, or the first FID of the experiment. Use the cursor or the index value to select and display the first FID.

Page 5: Quick Start Guide to nmrPipe Processing of 15N-HSQC datanmrc.utah.edu/.../Quick_Start_Guide_to_nmrPipe_Processing_for_gNh… · Quick Start Guide to nmrPipe Processing of 15N-HSQC

5

An nmrPipe command line window is then be opened to execute processing commands one at a time, and to adjust values as needed. The command line window can be opened by right-clicking on the Proc button on the toolbar and then left-clicking on N) NMRPipe Command, or by typing Shift+n. Function commands entered into the command line window do not need the |nmrPipe -fn prefix used in a script (below), and can be executed by selecting the Enter key.

Page 6: Quick Start Guide to nmrPipe Processing of 15N-HSQC datanmrc.utah.edu/.../Quick_Start_Guide_to_nmrPipe_Processing_for_gNh… · Quick Start Guide to nmrPipe Processing of 15N-HSQC

6

Type the following series of commands, being careful to observe the effect of each, and adjust as needed for your data – type <return> at the end of each line. Additional information on commands appear at the end the end of this document. You should get to know each command - what it does and what options are available. SOL -fl 20 -fs 3 SP -off 0.5 -end 1.0 -pow 2 ZF -size 2048 (double the original number of points, which was 1024) FT -auto You should now see a frequency-domain spectrum, but it may not be phased properly. In order to phase a spectrum click the Phasing On button in the middle of the toolbar (it will have a depressed appearance). Adjust the two P0 sliders - one for coarse correction and one for fine correction to produce an absorptive lineshape. There are also two equivalent P1 sliders for first order phase corrections if needed (though not usually, and the common value for P1 is zero). When the transformed FID has been correctly phased with the sliders, the final phase values should be noted, and used in the data processing script. If you are going to quantify anything in the processed spectrum you we will be using auto baseline correction. You can test POLY -auto -ord 3 to make sure the baseline is flat using those parameters and then include in your script below.

Page 7: Quick Start Guide to nmrPipe Processing of 15N-HSQC datanmrc.utah.edu/.../Quick_Start_Guide_to_nmrPipe_Processing_for_gNh… · Quick Start Guide to nmrPipe Processing of 15N-HSQC

7

Processing 2D data:

The processing parameters defined in the previous section are used to create an automation script that processes the entire 2D data set (HSQC). A convenient method for editing and running scripts is open nmrDraw’s Macro Edit interface. The interface is accessed by right-clicking on the File button in the toolbar, which will drop down a small menu, and then left-clicking on the m) Macro Edit option; or by simply typing m while the mouse pointer is in the spectrum display area. You can start with a basic script from the default scripts and edit as needed, or load and edit a copy of the gNhsqc.com example below. To edit a script already copied into your working directory, within the Macro Edit window open right-click within the cyan-colored window to bring up the Text Panel, right-click on File, and then left-click on Open… to initiate the Text:Open window and open your script.

Edits to the script are easily made by using the keyboard and mouse. Copy and paste can be performed within a single instance of nmrPipe, or between two instances on a multi-desktop computer, but the copy buffer is volatile and empties when nmrPipe is closed. Unfortunately, text copied in another application (e.g., vi or terminal) cannot be pasted into nmrPipe. Right-click in the cyan window to bring up the Text Panel, right-click on Edit, and left-click on the desired action.

Edit your script to match your processing of the first FID for the 1H direct dimension processing including the phase values you determined (PS). Keep in mind that you may need to change the number of points for ZF, the extracted dimensions of the final spectrum (EXT), the values for LP in 15N etc. Save your changes and execute the script to create a 2D spectrum. To view your processed spectrum, click done on the macro window. Right-click on File, left-click on select, then select your .ft2 file and click read/draw. You can adjust the number of contours in the plus and minus fields, and adjust the threshold either with the

Page 8: Quick Start Guide to nmrPipe Processing of 15N-HSQC datanmrc.utah.edu/.../Quick_Start_Guide_to_nmrPipe_Processing_for_gNh… · Quick Start Guide to nmrPipe Processing of 15N-HSQC

8

number in the ‘first’ field or using the + and – buttons. Left-click ‘draw’ to apply changes. You can check phasing using either horizontal h or vertical v strips and use the cursor to look at different parts of the spectrum. Use e to exit cursor modes. To exit nmrDraw you can simply type Q or go to File > Quit the Program. Important! You can edit, save, execute your macro as many times as needed and will always overwrite the old data. The only exception is that nmrPipe will save a n-1 version of your script as script.com% if you don’t change the name when saving. Again, make sure the data is processed properly and that the scripts in the directory have been executed as saved before declaring victory. At the end of the example script you will note a pipe2ucsf function that will create a Sparky-formatted spectrum- you will want to edit this to have a unique name (probably matching the .fid file name) for use in Sparky. If you do not have paths to Sparky set up in csh, then you will have to either do that or use pipe2ucsf from a terminal in bash. Example 2D script and details:

The following is the gNhsqc.com script for nmrPipe processing data recorded using the (2D) gradient-selected, sensitivity-enhanced 15N-HSQC experiments. It has been optimized to run from within the Macro Edit window of nmrDraw. A more detailed explanation follows. --------------------------------------------------------------------- #!/bin/csh

#

# gNhsqc.com, edited 20170415

#

echo "Processing test.fid"

#

#PS arguments are -p0 -90 -p1 180 –di when f1180=’y’

#PS arguments are -p0 0 -p1 0 –di when f1180=’n’

nmrPipe -in test.fid \

|nmrPipe -fn SOL -fl 20 -fs 3 \

|nmrPipe -fn SP -off 0.5 -end 1.0 -pow 2 \

|nmrPipe -fn ZF -size 2048 \

|nmrPipe -fn FT -auto \

|nmrPipe -fn PS -p0 0.0 -p1 0.0 -di \

|nmrPipe -fn POLY -auto -ord 3 \

|nmrPipe -fn EXT -x1 5.0ppm -xn 11.5ppm -sw \

|nmrPipe -fn TP -verb \

|nmrPipe -fn LP -x1 1 -xn 96 -order 16 -pred 48 -f -after -fix \

|nmrPipe -fn SP -off 0.5 -end 1.0 -pow 2 \

|nmrPipe -fn ZF -size 1024 \

|nmrPipe -fn FT -auto \

|nmrPipe -fn PS -p0 -90 -p1 180 -di \

|nmrPipe -fn TP -verb \

|nmrPipe -out gNhsqc.ft2 -ov

pipe2ucsf gNhsqc.ft2 gNhsqc.ucsf

-----------------------------------------------------------------------

Page 9: Quick Start Guide to nmrPipe Processing of 15N-HSQC datanmrc.utah.edu/.../Quick_Start_Guide_to_nmrPipe_Processing_for_gNh… · Quick Start Guide to nmrPipe Processing of 15N-HSQC

9

Details of script: Because nmrPipe is run within a c-shell, the first command must always invoke the c-shell, like so: #!/bin/csh The next command types the text within the quotation marks to the screen. Invocation of nmrPipe is followed by a series of function commands, where each function takes arguments (or “flags” in nmrPipe parlance) set off with a leading minus sign (e.g., -in), and one function’s output is piped into the next function as its input. In order for the pipeline built by the script to be “data-tight” each line must begin with “|nmrPipe” and end with “\” having no stray spaces after the “\”. It seems to be the case that empty lines, such as the one following the c-shell invocation (above) cause nmrPipe to crash when the script is run from a command line; this script can be run successfully using the “macro” feature within nmrDraw. A single hashtag before a line comments that line out and disables/enables that line of the script. Before this script can be run, the spectrometer data must be converted (from Varian format) into pipe format using the varian command in a terminal. This small program reads the procpar file within a .fid directory adds the parameters as a header to its output data, converts the data into a pipe format file named test.fid, and writes itself out as fid.com. The input for this nmrPipe script, therefore, is the test.fid file. Individual nmrPipe function commands that make up this script:

SOL is the solvent filter function. Within the default lowpass mode (spline is also available but polynomial is not) -fl sets the filter length (+/-) in points, and -fs selects the filter shape. The default filter length is 16, and the default filter shape (1) is “boxcar”. A sine-squared filter shape (3) that is wider than default (20) usually yields better results. SP is the adjustable sine window function, which apodizes the data. Setting the -off flag to 0.5, shifts the origin of the sine function by 0.5*pi to the left, ensuring that the first points of the FID are not compromised. The -end flag tells nmrPipe where the window function stops relative to the length of the vector, again using a 1.0*pi format. A value of 1.0 means that the data will be apodized to zero at the end of the vector. This is useful except in cases where the data will need to be inverse Fourier transformed. In such instances setting -end 0.98 will prevent the system from dividing by zero, and crashing. The -pow flag sets the exponent for the sine function; 1 gives a sinebell (this is the nmrPipe default), 2 gives a sine-squared. The -c flag (not used in this example) applies a scaling factor to the first point of the FID, which can be useful when processing data that was not recorded with the half-dwell flag on. The default value for the -c flag is 1. ZF is the zero fill function. The default operation for this function is to double the length of the vector a single time, and one can direct multiple doublings using the -zf flag, by setting it to -zf 2 or more. The -size flag causes zeros to be added to the vector up to a specified total vector size, in this example 2048. One option that is useful when dealing with vectors

Page 10: Quick Start Guide to nmrPipe Processing of 15N-HSQC datanmrc.utah.edu/.../Quick_Start_Guide_to_nmrPipe_Processing_for_gNh… · Quick Start Guide to nmrPipe Processing of 15N-HSQC

10

of unusual length is the -auto flag, which rounds the final vector length up to the nearest power of 2. FT is the Fourier transform function. The most common flag is -auto, which directs nmrPipe to automatically select the mode from among real, inverse, and negation depending on what the acquisition mode is. PS is the phase spectrum function. The -p0 flag sets the zero order phase correction and the -p1 flag sets the first order phase correction. The -di flag deletes imaginaries, reducing the size of the data which is helpful for larger nD spectra. POLY is the baseline subtraction function. The -auto flag performs an automated baseline correction. The -ord flag specifies the order of polynomial used; the default order is 4. This function has many flags and no manual entry, so one must type “nmrPipe -fn POLY -help” to examine the flag list and divine their meanings. Some scripts use time domain POLY to remove the solvent signal instead of the SOL function. Any data that will be used to quantify signals must be baseline corrected! EXT is the extract region function. This function has several straightforward flags, like -left and -right, which retain either the left or right half of the spectrum. Using the -x1 and -xn flags one can be much more specific about what region is extracted, for example to focus on the amide proton region of an HSQC spectrum. Units may be in points (default), Hz, %, or ppm, and no white space should appear between an extraction value and its unit designation or the command will likely be ignored. Because points are the default unit, and 1 is the default value for -x1, it is possible to extract the first 1024 points using only the following: nmrPipe -fn EXT -xn 1024. Finally, the -sw flag updates the sweep width and chemical shift calibration information of frequency-domain data to match the extracted region. TP is the transpose function. When used on a 2D plane it will transpose the X and Y axes, permitting processing of the indirect dimension. LP is the complex linear prediction function. The flags -x1 and -xn are used to set the data region to be used for creating the model that will predict synthetic points. The -ord flag sets the linear prediction order, or number of coefficients that will be used; the default value is 8. This value should be as large as the number of signals which are to be extracted from each vector, but must be smaller than half of the original data size. The -pred flag sets the number of synthetic points to be predicted; the default value for this flag is equal to the size of the original data, which is not always ideal. The -f flag sets the linear prediction into the forward mode; backwards prediction (-b) and a combination of forwards- and backwards-linear prediction (-fb) are also possible. The -after flag tells the LP function to predict future data. While this is also the default for this function, a -before setting is also supported. The -fix flag enables root reflection, which should help to suppress the creation of artifacts by the LP algorithm.

Page 11: Quick Start Guide to nmrPipe Processing of 15N-HSQC datanmrc.utah.edu/.../Quick_Start_Guide_to_nmrPipe_Processing_for_gNh… · Quick Start Guide to nmrPipe Processing of 15N-HSQC

11

REV is the reverse spectrum function. The -sw flag adjusts sweep width and ppm calibration information after the reversal. Owing to differences in data orientation protocols between Varian BioPack experiments and Louis E Kay experiments, an LEK experiment processed without the REV function will display “upside-down” in the 15N dimension. The second to last line of this script tells nmrPipe to write out the processed data (-out), assigns the output file a name (nmrcfull.ft2), and grants overwrite privileges (-ov) in the event that a file with the same name already exists. The file name and extension can be nearly anything, and using the “ft2” extension for Fourier transformed and processed 2D experiments can make keeping track of things simpler. The very last line invokes a program (pipe2ucsf) that converts the processed and pipe-format file into a ucsf file that can be opened and analyzed in Sparky. This actually invokes a Sparky function so you must have a path to Sparky set up in your account and csh. Alternatively, you can wait until you are done with this file, return to bash and type the command pipe2ucsf test.ft2 name.ucsf using your appropriate names to create the Sparky-compatible version of the spectrum.