#!/bin/csh
# peakpick
# script for doing automatic peakpicking of 3D heteronuclear spectra
# using spscan
#
# usage: peakpick <target>

set target=$argv[1]

cat <<EOF > peakpick.spm

read spec ../../1xeasy/hnco.3D.param 1 3 2
read scpa ../hnco/hnco.scpa
action peaklist 'read new list' /data/ives/cesg/$target/2spscan/hs15n.peaks
action 'modify pl' 'combine + reference' .
action integrate 3D 
action peaklist 'write list standard' hnco_spscan.peaks

read spec ../../1xeasy/hnca.3D.param 1 3 2
read scpa ../hnca/hnca.scpa
action peaklist 'read new list' /data/ives/cesg/$target/2spscan/hnco_spscan.peaks
action 'modify pl' 'combine + reference' .
action integrate 3D 
action peaklist 'write list standard' hnca_spscan.peaks

read spec ../../1xeasy/hncacb.3D.param 1 3 2
read scpa ../hncacb/hncacb.scpa
action peaklist 'read new list' /data/ives/cesg/$target/2spscan/hnco_spscan.peaks
action 'modify pl' 'combine + reference' .
action integrate 3D 
action peaklist 'write list standard' hncacb_spscan.peaks

read spec ../../1xeasy/cconh.3D.param 1 3 2
read scpa ../cconh/cconh.scpa
action peaklist 'read new list' /data/ives/cesg/$target/2spscan/hnco_spscan.peaks
action 'modify pl' 'combine + reference' .
action integrate 3D 
action peaklist 'write list standard' cconh_spscan.peaks

read spec ../../1xeasy/hcconh.3D.param 1 3 2
read scpa ../hcconh/hcconh.scpa
action peaklist 'read new list' /data/ives/cesg/$target/2spscan/hnco_spscan.peaks
action 'modify pl' 'combine + reference' .
action integrate 3D 
action peaklist 'write list standard' hcconh_spscan.peaks

read spec ../../1xeasy/hbhaconh.3D.param 1 3 2
read scpa ../hbhaconh/hbhaconh.scpa
action peaklist 'read new list' /data/ives/cesg/$target/2spscan/hnco_spscan.peaks
action 'modify pl' 'combine + reference' .
action integrate 3D 
action peaklist 'write list standard' hbhaconh_spscan.peaks

read spec ../../1xeasy/hncoca.3D.param 1 3 2
read scpa ../hncoca/hncoca.scpa
action peaklist 'read new list' /data/ives/cesg/$target/2spscan/hnco_spscan.peaks
action 'modify pl' 'combine + reference' .
action integrate 3D 
action peaklist 'write list standard' hncoca_spscan.peaks

read spec ../../1xeasy/hncaco.3D.param 1 3 2
read scpa ../hncaco/hncaco.scpa
action peaklist 'read new list' /data/ives/cesg/$target/2spscan/hnco_spscan.peaks
action 'modify pl' 'combine + reference' .
action integrate 3D 
action peaklist 'write list standard' hncaco_spscan.peaks
EOF

spscan -m peakpick.spm
quit



