Chazin Home Chazin Home | Ca-binding Protein DB | Vanderbilt Home Vanderbilt Home
Research Description | Publications | Wisdom | Search
How to contribute | About this page

Automating Repetitive GENXPK Tasks With Felix Macros


I discovered that since the command line of genxpk is
really only gawk waiting on stdin, you can cat GENXPK commands through a
pipe to GENXPK!  This rules!!  I wrote the following (simple) shell
script which reads in a (TOCSY) xpk file that has modified peak postions in it
(which automatically updates the GENXPK assignment table), and then regenerates
the TOCSY peaks (using the new assignments).

Example GENXPK script:

#! /bin/sh

cat << eof > genxpkrc.tmp

fil fel ~parikh/felix
fil act ~parikh/felix/tocsycrud.txt

xpc 1
wid 1 2
wid 2 2
rxpk
open
hh tocsy 1 90
close
quit
eof

cat genxpkrc.tmp | genxpk \
~parikh/felix/genxpkstuff/calhum_7_red_tocsy.refparm


Which then is run from the following (very simple) Felix macro:

Example Felix macro that calls the above GENXPK script:

dba ent write xpk:peaks tocsycrud.txt
sys '/home/parikh/felix/genxpkstuff/tocsy'
dba ent read xpk:peaks tocsycrud.txt
cp
ty Done
ret

Implementing the macro in the "right-click" Felix menu:

I then inserted a line in the right-click menu that reads:

GX Update TOCSY

which calls this macro.  Thanks to Sudip for the motivation and help to
finally do this.  We have been wishing for this kind of thing for awhile.
This is just the tip of the iceburg here, and a simple test case,
really.  I think there should eventually be a whole Felix submenu of "GX
blah blah" commands to do this type of thing.  We'll see how this
progresses.  So get to work and think up some more cool applications of
GENXPK<-->Felix automations! :-)

-Jarrod jsmith@scripps.edu