
Scaler Elves guide to their scripts

1) In a rush?  Just type this:

make 

That's it.  

Your scaled and merged data will end up in ./mtz/all.mtz, in CCP4/SHARP format, 
and will also be converted into SOLVE, SHELX, and X-PLOR formats.



2) Okay, how does it work?

    All the really important stuff is in ./scripts, and that directory
has its own README file.

In this directory (/home/jamesh/projects/workshop_fakedata/final/process/overlaps/scaler):

################################################################################
Makefile		- "make" file for your project

    usage: make [target]
    where: [target] is the thing (file) you want to create or update
    
    example: make SOLVE

    will create data files for input into Tom Terwilliger's "solve" program

    The unix program "make" is a wonderful tool for maintaining a complex, 
    interdependent system of files (like source code, or x-ray data processing).
    The Makefile contains a list of instructions and rules, like this:
    
somefile.mtz: someotherfile.mtz script.com
	script.com >! logfile.log

    Translated: 
    To create somefile.mtz, you need someotherfile.mtz and script.com.  If
    somefile.mtz is missing, or if someotherfile.mtz or script.com are newer 
    (by file date stamp) than somefile.mtz, then execute the command:
    "script.com >! logfile.log".  

    This way, if you edit script.com or change someotherfile.mtz, "make" knows 
    that somefile.mtz needs to be updated.  The really neat part of it all is 
    that the Makefile can also contain a similar entry for how to make 
    someotherfile.mtz, using a different script, and "make" will then know 
    it needs to update somefile.mtz after it has updated someotherfile.mtz.
    The list can go on and on.
    Simply put, typing "make" will update your project, making use of any
    changes you have made to the scripts, and frees you from keeping track
    of which scripts to run in which order.
    
    To "defeat" make, and keep it from doing processing you don't want it to, 
    use "touch".  If you type: "touch ./mtz/rough_scaled.mtz", then, as far
    as make is concerned, you just ran ./scripts/rough_scale.com
    etc...

################################################################################
./runlist.txt		- customizable run list 

    Your data are divided into "runs" of contiguous frames
    Run-specific scala commands can be put in here, i.e.
    RESOLUTION run 1 5.0 
    for a 5A cuttoff on run 1

################################################################################
./rules.txt		- custom SCALA commands used in all Scaler Elves scripts

    Note: unlike ./runlist.txt, ./rules.txt is not dynamically loaded by the
    scripts in ./scripts.  However, you can present this file to Scaler
    Elves the next time you invoke them, and they will include any scala cards
    they find there into their scala scripts.
    
################################################################################



3) What if something goes wrong?

    The Scaler elves have been trained to handle a number of common problems 
encountered in their localscaling procedure.  However, if something happens that
is beyond their experience, it's up to you to figure it out.  :(  But, please
email jamesh@ucxray6.berkeley.edu about your problem.

    The scripts you will need to look at are all in ./scripts,  and are run
(pretty much) in the following order:
./scripts/sort_everything.com    - sorts all raw data together
./scripts/make_reference_set.com - creates a small, reference dataset from a selected wavelength
./scripts/import_reference.com   - imports the reference dataset into the raw, unscaled mtz
./scripts/rough_scale.com        - does one-scale-per-frame scaling
./scripts/localscale.com         - performs 3D localscaling
./scripts/merge.com wave         - merges "wave", do this for each of: FP
./scripts/merge.com ...etc.
./scripts/scaleit.com            - combines all wavelengths into one file

the file ./scripts/README explains all this in more detail

    Wether you have problems or not, When you're ready to start tinkering around, 
(edit the scripts, trying other space groups, etc.), have a look in ./scripts, 
./SHELX, ./SOLVE, and ./XPLOR.  There are README files there too.


