NMR Data File Transfer and Processing

advertisement
NMR Data File Transfer and Processing
By Chad Rienstra
1. From Spinsight on acquisition workstation (example: Proton)
a. Acquire data.
b. Open each file in a separate buffer and inspect data for major problems,
either in the time domain, or using basic Spinsight 2D processing
functions.
c. Fix major problems.
d. Repeat a. through c. as necessary
e. As required, sum multiple files together
i. For a 2D or 3D acquisition stored as multiple files, open each file
in a separate buffer; e.g., record 260a into buffer a, 260b into
buffer b. A fast way to do this (relative to the file menu) is in the
macro dialog (see step ii.): a = read ‘260a’ will load the record
260a into buffer a.
ii. Sum the files together using the macro dialog box (meta-m, or
from macro menu): sum = a + b ; dis sum will add the buffers a
and b together and place them into the buffer sum, and then display
the buffer “sum”
iii. Save the summed file with a new filename, e.g., 260ab (from the
file menu, or meta-s)
f. Use scp (secure copy) to copy the Spinsight format data directory to the
processing workstation. For example, if logged on to Proton, and desiring
a transfer to Lungo: scp –r 260ab username@lungo:260ab, presuming
you want the same name at the destination (alternative something more
descriptive, or including the date, such as feb02_260ab).
2. Process data using NMRPipe at the processing workstation (example: Lungo)
a. Translate the data from Spinsight to NMRPipe format using a modified
version of the fid.com macro. There are different versions for NC and CC
2D’s. The example here is for a CC 2D:
#!/bin/csh
bin2pipe -chem -swap -in data
\
-xN
4864 -yN
1664 \
-xT
2432 -yT
1664 \
-xMODE
Complex -yMODE
TPPI \
-xSW
60606.1 -ySW
39682.5 \
-xOBS
150.741 -yOBS
150.741 \
-xCAR
95.1 -yCAR
95.1 \
-xLAB
13C -yLAB
13C \
-ndim
2 -aq2D
TPPI \
| nmrPipe -fn MAC -macro $NMRTXT/rrii.M -noRd -noWr
-out test.fid -verb -ov
sleep 5
\
b. Note the following conventions and correspondence to Spinsight for the
fid.com file:
i. –xN: number of total direct dimension pts (= al * 2)
ii. –xT : number of complex direct dimension pts (al)
iii. –xMODE: always “complex”
iv. –xSW: direct dimension sweep width = 1 / dw
v. –xOBS: observe dimension frequency (MHz)
vi. –xCAR: observe dimension carrier reference (ppm v. DSS;
calculate manually)
vii. –xLAB: label for the x dimension (arbitrary)
viii. –ndim: always 2 in this case
ix. –yN: number of total indirect dimension pts (al2)
x. –yT: number of complex indirect dimension pts (al2 / 2)
xi. –yMODE: always TPPI for Chad’s homonuclear dimensions (long
story)
xii. –ySW: indirect dimension sweep width = 1 / (2 * dw2)
xiii. –yOBS: indirect dimension frequency (MHz); usually the same as
–xOBS for homonuclear experiments
xiv. –yCAR: indirect dimension carrier reference (ppm); usually the
same as –yCAR for homonuclear experiments
xv. –yLAB: indirect dimension label
xvi. –aq2D: always TPPI for Chad’s homonuclear
xvii. nmrPipe....: DO NOT CHANGE
xviii. note that test.fid is the name of the output file (NMRPipe format);
this name can be changed, but must then be changed in subsequent
macros as well
c. To execute the script (macro) called fid.com, simply edit the file (in text
editor of your choice), save the file, and then from the command line in
the appropriate directory, type fid.com. If the file does not execute, it is
possible that the permissions need to be modified, via chmod u+x filename
d. As the fid.com macro executes, the command line should show “MAC x
of 1664” for example, if there are 1664 rows, where “x” runs up from 1 to
1664 in a matter of a few seconds (perhaps not even visible on a fast
computer like Lungo). This should take only a few seconds for the entire
file conversion. If not, something is wrong. Most error messages at this
point result from incorrect parameters in the fid.com file, such as –xN, yN, etc. Check these again if problems arise.
e. Correct operation of fid.com should result in a file “test.fid” that is slightly
larger than the original Spinsight “data” file. For example, by typing ls –l
and viewing the directory contents, one would see a data file with
32374784 bytes, and a test.fid with 32376832 bytes. The extra 2048 bytes
is header information that NMRPipe stores along with the data file.
f. Process the first dimension using a standard macro, e.g. proc1.com
i. Consult NMRPipe manual for detailed definitions
ii. Brief descriptions and suggestions:
1. LP = linear predection, -before = backwards LP, -pred #pts,
-ord order (larger number is more precise, but slower;
suggest 2 or 3); -verb verbose (shows progress on screen)
2. SP = sinebell apodization, -off = phase offset in units of π
(0.5 = cosine, 0.0 = sine), suggest 0.4 to 0.425; -end =
ending phase (1.0 = truncated to zero), suggest 0.95-1.0; pow = power, suggest 1.0
3. GM = lorentzian to Gaussian transformation; -g1 negative
Lorentzian line broadening (i.e., positive number gives line
narrowing); -g2 Gaussian line broadening (i.e., positive
number gives line broadening). Suggestion: -g1 to natural
line width, then –g2 1.5 to 2.0 times the natural line width
(for best sensitivity), or less –g2 for better resolution.
4. ZF = zero fill
5. FT
6. PS = phase (do not –di at this stage)
7. POLY = polynominal correction
8. TP = transpose
#!/bin/csh
nmrPipe -in test.fid \
#| nmrPipe -fn LP -before -pred 4 -ord 3 -verb \
#| nmrPipe -fn SP -off 0.425 -end 0.975 -pow 1.0 -c 1.0
\
| nmrPipe -fn GM -g1 40 -g2 80 \
#| nmrPipe -fn LP -ord 3 -verb \
| nmrPipe -fn ZF -size 4096
\
| nmrPipe -fn FT -auto
\
| nmrPipe -fn PS -p0 -143.5 -p1 42 -verb
\
| nmrPipe -fn POLY -auto \
#| nmrPipe -fn EXT -x1 210ppm -xn -10ppm -sw \
#| nmrPipe -fn TP
\
#| nmrPipe -fn SP -off 0.425 -end 0.975 -pow 1.0 -c 1.0
\
#| nmrPipe -fn GM -g1 60 -g2 80 \
#| nmrPipe -fn LP -before -pred 2 -ord 2 -verb \
#| nmrPipe -fn LP -ord 4 -verb \
#| nmrPipe -fn ZF -auto
\
#| nmrPipe -fn FT -auto
\
#| nmrPipe -fn PS -p0 -85 -p1 170 -verb
\
#| nmrPipe -fn POLY -auto \
#| nmrPipe -fn TP \
#| nmrPipe -fn EXT -x1 210ppm -xn -10ppm -y1 210ppm -yn -10ppm -sw \
-ov -out data.ft1
#pipe2ucsf data.ft2 /home/rienstra/Sparky/temp2d.ucsf
g. After running proc1.com, you should have a file data.ft1 with the first
dimension transformed. Now check the phasing of the direct dimension
data with NMRPipe
i.
ii.
iii.
iv.
v.
vi.
vii.
viii.
ix.
x.
xi.
xii.
xiii.
From the command line in a new terminal window: nmrDraw
nmrDraw (beautiful purple borders, etc.) should open.
Right click on File menu, then Select file.
A dialog box should open allowing you to select the file. Note that
the current directory is displayed on the top border of this box. If
not the correct directory, navigate using the bottom third of the box
(original directory, on e directory up, etc.).
Select the data.ft1 file in the appropriate directory
Click Read/Draw on the bottom of the dialog box.
Drawing of contours in NMRDraw (especially interferograms)
may take quite some time. To abort this process, move the cursor
into the data display area of the NMRDraw window and type D
(i.e., shift-d, no return necessary). This will draw a raster display
(intensity mapped by color, not contours and color), which is
significantly faster than contours
Click the + or – buttons on the upper right corner as necessary to
change the bottom threshold of the display.
Once the display is approximately correct (signal at the bottom of
the screen, first few rows, but more or less black at the top half of
the screen), put the cursor into the data region and type h, to bring
up the hoirzontal slices.
Go to the first horizontal slice by left-clicking in the data display
window and dragging down to the bottom.
Place the phasing pivot marker (upward pointing arrow) on one set
of peaks (preferably CO region) by left-clicking on the bottom axis
scale (purple area with yellow labels) and dragging over the
appropriate region. The arrow (yellow under normal Xwindow
color tables, etc.) should be indicated in the data region (top and
bottom), and the “pivot” parameter on the upper portion of the
display should change as you move the arrow.
Use the phasing sliders to adjust first the P0 (zero order phase) to
phase the region near the pivot marker, and then the P1 (first order
phase) to correct the rest of the spectrum. If the experiment is
properly configured, the first order phasing should be ~60 degrees
of less. If not, consult your local experimentalist and complain.
Once satisfactory phasing of the first row is obtained, scroll
through the other rows (by either left-clicking and dragging
through the data window, or by clicking the up arrows near the
“Y:” label on the top left portion of the window). Confirm that
other rows near the beginning of the data set are properly phased.
h. Adjust the phasing (PS) parameters in the proc1.com file according to the
changes made in NMRDraw
i. Process the data again using proc1.com. Check the phasing in NMRDraw
again. Repeat steps g. and h. as necessary to get proper phasing. Note
that POLYnominal baseline correction will not work well until the phasing
is approximately correct. Once phasing and baseline correction etc. are set
properly, proceed to the next step.
j. Prepare macro proc2.com for processing 2D
i. Go back to the command line and copy proc1.com to proc2.com
(i.e., cp proc1.com proc2.com).
ii. Edit proc2.com to remove the comment markers (#) from the
beginning of lines that are required for the second dimension
processing.
iii. To save time in processing, “extract” (EXT, see below) regions of
the spectrum of interest after processing the first dimension.
iv. To save time, add –di to the PS command (delete imaginary buffer,
unnecessary after phasing is correct).
v. Run the script proc2.com. Depending on LP parameters etc., this
may take several seconds to several minutes. Monitor the progress
by including –verb in the FT, PS, and/or LP lines of the script. If
the numbers are crawling up very slowly, reduce the order or
amount of LP and/or the number of zero fills (ZF) for initial
processing efforts, and then come back with more aggressive
parameters later.
vi. Phasing of indirect dimension. If the experiment is properly setup,
the indirect dimension phasing should be trivial. For homonuclear
experiments using Chad’s phase cycles, the phasing should be –p0
–90 –p1 180 or very close to that value. Check in NMRDraw as
above (but with vertical slices instead of horizontal). If the
phasing is far from –90 and 180, consult your local
experimentalist.
vii. The last line of the proc2.com script below is a conversion of the
2D data from NMRPipe to Sparky format. Name this file
appropriately according to the data and record number of the raw
data. Preferably include the .ucsf extension to avoid ambiguity
about the file format.
#!/bin/csh
nmrPipe -in test.fid \
#| nmrPipe -fn LP -before -pred 4 -ord 3 -verb \
| nmrPipe -fn SP -off 0.425 -end 0.975 -pow 1.0 -c 1.0
| nmrPipe -fn GM -g1 55 -g2 75 \
#| nmrPipe -fn LP -ord 3 -verb \
| nmrPipe -fn ZF -size 8192
\
| nmrPipe -fn FT -auto
\
| nmrPipe -fn PS -p0 -143.5 -p1 42 -verb -di
\
| nmrPipe -fn POLY -auto \
| nmrPipe -fn EXT -x1 210ppm -xn -10ppm -sw \
| nmrPipe -fn TP
\
\
| nmrPipe -fn SP -off 0.425 -end 0.975 -pow 1.0 -c 1.0
\
| nmrPipe -fn GM -g1 55 -g2 80 \
#| nmrPipe -fn LP -before -pred 1 -ord 2 -verb \
#| nmrPipe -fn LP -ord 4 -verb \
| nmrPipe -fn ZF -auto
\
| nmrPipe -fn FT -auto
\
| nmrPipe -fn PS -p0 -90 -p1 180 -verb
\
| nmrPipe -fn POLY -auto \
| nmrPipe -fn TP \
| nmrPipe -fn EXT -x1 210ppm -xn -10ppm -y1 210ppm -yn -10ppm -sw \
-ov -out data.ft2
pipe2ucsf data.ft2 /home/rienstra/Sparky/feb02_190abd_1.ucsf
3. Open the 2D data in Sparky.
a. Start a Sparky session from the command line: sparky.
b. Open file from the file menu, or use “accelerator” fo. Accelerators in
Sparky are blessings directly from heaven. Memorize them as soon as
possible.
c. Navigate to the appropriate file (this is much more intuitive in the Sparky
dialog box than in NMRDraw).
d. The spectrum will open with some ridiculous default display limits and
contour levels. I will eventually figure out how to fix this. In the
meantime the following workaround is usually the first thing you’ll want
to do after opening a 2D (type all accelerators while data window of
interest is selected; it may be necessary to click in that window in order for
this to be true):
i. “st” (spectrum views... you will understand accelerator logic soon
enough, just type it): this open the spectrum view box, from which
you can “recompute” the noise as median of about 2000 pts. (Type
200 in the window “medium of...” and click “recompute”.) Note
this number.
ii. “ct” (contours): set the “lowest” contour at about 5 or 6 times the
estimated noise; set the levels to something between 5 and 25,
depending on how pretty you want it; set the factor to be 1.05 to
1.4, where the value of factor to the power of the number of levels
is a number around 3 or 4. For example, if the number of levels is
25, a factor of about 1.05 (1.05^25 = 3.4). Obviously a smaller
number of levels will draw faster.
iii. At first you will want to display at least a few negative contours as
well, even for experiments in which you would not expect to see
negative peaks. This is to confirm that the baseline correction and
other processing parameters (such as phasing) are correctly being
interpreted.
iv. “zf” (zoom full): view the entire spectrum. This first redraw may
be a little slow. If so, adjust “ct” parameters accordingly.
v. “pm” (pointer modes) to select “zoom” mode, or use F11.
vi. Click and drag a box over a region of the spectrum you want to
view.
vii. Scroll around with the bars on the edges of the spectrum, and/or
“zf” (zoom full) to get a bird’s eye view, and then zoom again.
e. Several different spectra may be opened at once in Sparky, with cursors
between the windows following each other etc.
f. This should get you started. Consult Sparky documentation for further
exercises.
Download