Assembling nmrPipe planes into single file

From NMR Wiki

Jump to: navigation, search

Related document: UNIX and nmrPipe

nmrPipe usually stores multi-D data as a set of 2D planes (using pipe2xyz program).

It is possible to save data in a single file too. This page explains how to do it.

Open the last stage nmrPipe processing script, e.g. z.com

xyz2pipe -in ft/HNCOCACB%03d.ft -z -verb \
| nmrPipe -fn SP -off 0.50 -end 1.00 -pow 2 -c 0.5 \
| nmrPipe -fn ZF -auto \
| nmrPipe -fn FT -auto -verb \
| nmrPipe -fn PS -p0 0.0 -p1 0.0 -di \
| pipe2xyz -out ft/HNCOCACB%03d.ft -z -inPlace

Change the last two lines this way:

xyz2pipe -in ft/HNCOCACB%03d.ft -z -verb \
| nmrPipe -fn SP -off 0.50 -end 1.00 -pow 2 -c 0.5 \
| nmrPipe -fn ZF -auto \
| nmrPipe -fn FT -auto -verb \
| nmrPipe -fn PS -p0 0.0 -p1 0.0 -di \
> data.pipe
cat data.pipe | pipe2xyz -out ft/HNCOCACB%03d.ft -z -inPlace

Used above is a redirection of UNIX data stream from the last stage of nmrPipe processing nmrPipe -fn PS -p0 0.0 -p1 0.0 -d to a plain file on disk data.pipe (File extension here is not important, as it aways is in UNIX).

Entry > data.pipe means "save output of previous command as a disk file data.pipe".

Program cat reads file data.pipe and sends it to pipe2xyz through a UNIX pipe (as shown by the pipe symbol - a vertical line character).

Backslashes in the ends of lines simply mean that the command does not fit into one line and is split into several lines of input (i.e. consecutive lines that have "\" in the end plus one more line actually form one very long command line).

Personal tools