Changes

Jump to navigation Jump to search
no edit summary
== CPMG_1_sort_pseudo3D_initialize_files.sh ==
<source lang="bash">
#!/bin/bash -e
</source>
== CPMG_2_convert_and_process.sh ==
<source lang="bash">
#!/bin/bash
</source>
== CPMG_3_fft_all.sh ==
<source lang="bash">
#!/bin/bash -e
</source>
== convert_all.com ==
<source lang="bash">
#!/bin/csh -f
</source>
== fft_all.com ==
<source lang="bash">
#! /bin/csh -f
@ x = $x + 1
end
</source>
 
== NMRPipe_to_Sparky.sh ==
<source lang="bash">
#!/bin/tcsh -e
set FTS=`ls -v -d -1 */*.ft2`
 
foreach FT ($FTS)
set DNAME=`dirname $FT`
set BNAME=`basename $FT`
set FNAME=`echo $BNAME | cut -d'.' -f1`
echo $FT $DNAME $BNAME $FNAME
pipe2ucsf $FT ${DNAME}/${FNAME}.ucsf
end
</source>
 
== sparky_add.sh ==
<source lang="bash">
#!/bin/tcsh -e
 
if ($#argv < 4) then
echo "Change value of column"
echo "Usage: $0 file" "'"'$X'"'" "'"'0.1'"' peaks_out.list "
echo "sparky_add.sh sparky.list" "'"'$2'"'" "-0.132 peaks_out.list"
goto done
endif
 
set PEAKS=$1
set PEAKSTEMP=${PEAKS}.temp
set COL=$2
set COLOFFSET=$3
set PEAKSOUT=$4
set LINE='$0'
 
awk '$2 ~ /^[0-9]/{print $0}' $PEAKS > $PEAKSTEMP
awk "{ ${COL} = ${COL} + $COLOFFSET; print $LINE } " $PEAKSTEMP > $PEAKSOUT
rm $PEAKSTEMP
 
done: ; exit 0
</source>
 
== stPeakList.pl ==
<source lang="perl">
#! /usr/bin/perl
 
# Creates a peak list for seriesTab given a
# nmrPipe spektrum and a Sparky peak list
#
# usage: stPeakList [pipe spectrum] [Sparky peak list]
#
# Kaare Teilum 061025
 
$pipeFile = $ARGV[0];
$sparkyList = $ARGV[1];
 
open HDR, "showhdr $pipeFile |" or die "can't run: showhdr $pipeFile";
while (<HDR>){
if (/OBS MHz/){
/([0-9]+\.[0-9]+)\s+([0-9]+\.[0-9]+)/;
$frqX=$1;
$frqY=$2;
};
if (/DATA SIZE/){
/([0-9]+)\s+([0-9]+)/;
$sizeX=$1;
$sizeY=$2;
};
if (/ORIG Hz/){
/(-*[0-9]+\.[0-9]+)\s+(-*[0-9]+\.[0-9]+)/;
$origX=$1;
$origY=$2;
};
if (/SW Hz/){
/([0-9]+\.[0-9]+)\s+([0-9]+\.[0-9]+)/;
$swX=$1;
$swY=$2;
};
};
close(HDR);
 
$stepX=$swX/$frqX/$sizeX;
$highX=($origX+$swX)/$frqX;
$stepY=$swY/$frqY/$sizeY;
$highY=($origY+$swY)/$frqY;
$i=1;
print "VARS INDEX X_AXIS Y_AXIS X_PPM Y_PPM VOL ASS\n";
print "FORMAT %5d %9.3f %9.3f %8.3f %8.3f %+e %s\n\n";
 
open IN, "$sparkyList" or die "Cannot open $sparkyList for read";
while (<IN>){
@process = split (/\s+/, $_);
if ($process[0] eq ""){splice (@process, 0, 1)};
if ($process[0] ne "Assignment" && $process[0] ne ""){
$ptsX=($highX-$process[2])/$stepX;
$ptsY=($highY-$process[1])/$stepY;
printf "%5d %9.3f %9.3f %8.3f %8.3f %+e %s\n",$i,$ptsX,$ptsY,$process[2],$process[1],700000,$process[0];
$i++;
};
};
close (IN);
</source>
Trusted, Bureaucrats
1,382

edits

Navigation menu