NmrProj.pl - calculate 2D projection of 3D NMR data

From NMR Wiki

Jump to: navigation, search

This simple Perl script will calculate 2D projection of nmrPipe 3D dataset on the XY plane.

Script uses addNMR and sethdr programs which are part of the nmrPipe suite.

This version will simply add many planes and output file proj.DAT containing a single plane.

You might want to experiment with removing -max option from the addNMR call, but script seems to work better with that option.

Also, data matrix may need appropriate rotation prior to calculating the XY projection.

#!/usr/bin/perl
 
use strict;
 
my @files = @ARGV;
 
my $file1 = shift @files;
 
foreach my $file (@files){
        system("addNMR -in1 $file1 -in2 $file -max -out tmp.DAT");
        rename "tmp.DAT", "proj.DAT";
        $file1 = "proj.DAT";
}
 
system("sethdr proj.DAT -ndim 2"); #this will set number of dimensions to 2 in the file header
Personal tools