- the use of Telnet and Fetch to do the periodic work
- shell script programming to alter & maintain the "browser-update" system
- knowledge of what kinds of files go where, without resorting to black magic
To look at any of the frame files in the Index folders is easier:
unix% cd /usr/local/data2/browser/Index unix% tr '\015' '\012' <"Open.Thorax" | moreThe above command sequence gets you to the right location and then pipes one of the top-level frame files to the "more" utility so you can page through it; but since it's a Mac file with carriage returns on each line, it has to be translated first to map those to Unix linefeeds so it will look sensible. The "tr" utility does this.
Armed with the above information, plus knowledge of the frame file format, you can really dig through things and find out some interesting stuff. For example, you can concatenate all the frame files for a particular dataset together with the "cat" utility, do the CR-->LF mapping with "tr", extract just the structure names with "grep", sort them, and eliminate duplicates with "uniq"; this gives an alphabetical list of all the structure names used anywhere in the dataset, which is very useful in checking for misspellings and stray spaces. Here's the magic command (do it from a NeXT if possible, because an SGI has trouble with large groups of wildcarded files and will probably fail -- to avoid the error you'll have to do groups of files like with [a-k]*/* and [l-z]*/* and then join the results.)
unix% cd /usr/local/data2/browser/Neuroanatomy/Index unix% cat */* */*/*|tr '\015' '\012'|fgrep STRUCTURE|sort|uniq >~/resultsFinally, there's a similar sequence of operations that will result in a list of frame names and their individual structure names; Dr. Sundsten found this useful and asked me to include it somewhere so he could obtain such a list in the future. So here it is:
Go to your home directory on a Biostr Unix machine, preferably a NeXT: cd Create a file with the following contents (call the file "d"): echo "FRAME:" $1 cat "$1" |tr '\015' '\012'|fgrep STRUCTURE|sort|uniq echo echo Make the file executable: chmod +x d Go collect the names of all the files to process: cd /usr/local/data2/browser/Neuroanatomy/Index ls */* */*/* >~/neuro.dat Modify the list, removing files you don't want (like those in the SUBJECTS directory) and add the call to the "d" script on each line: vi ~/neuro.dat :g/^/s/^/\~\/d "/g :g/$/s/$/"/g :wq The above editing session leaves you with a file that contains lines like: ~/d "3D Object Composites/Accumbens Caudate Putamen" ~/d "3D Object Composites/All Objects" ~/d "3D Object Composites/Amygdala Caudate" Execute the script with: sh ~/neuro.dat >~/neuro.out