CCP4 web logo CCP4I: Graphical User Interface
Implementing Data Harvesting

next button previous button

Implementing Standard Interface to Data Harvesting in CCP4I

This is what you need to do to get a Data Harvest folder in a task interface and to get the parameters into the program script.
This protocol will correctly interface with the Data Harvesting options in the programs.

Changes to taskname.def

At the end of the file add

@ [FileJoin [GetEnvPath CCP4I_top] tasks harvest.def]

In tasks/taskname.tcl:

  1. In taskname_run procedure add a line:
    SetHarvestParams $arrayname mtzin -run
    where mtzin is the name of the array parameter which contains the name of the input MTZ file.

In taskname_run_window:

  1. In the call to CreateTaskWindow add the folder name Data Harvesting as the first folder so it will appear immediately after the Files folder.

  2. Immediately after the CreateTaskWindow call add the line:

    SetHarvestParams $arrayname mtzin -init
    where mtzin is the name of the array parameter which contains the name of the input MTZ file.

  3. Append a command to the CreateInputFileLine for the input MTZ:

    -command "UpdateHarvestMTZ $arrayname mtzin"

  4. Before the current line 'Openfolder 1' add:

    OpenFolder 1
    
    CreateHarvestLine line

  5. Renumber the folders in the subsequent calls to all OpenFolder to allow for the insertion of a new folder.

In scripts/taskname.script

  1. At the top if the script add:

    # Source pdb_utils for harvest handling & move to project directory
    # if we are going to dump harvest file to current directory
    source [FileJoin [GetEnvPath CCP4I_top] utils pdb_utils.tcl ]
    if { [StringSame $HARVEST_MODE PROJECT ] }
       { ChangeDirectory $job_params(PROJECT_DIR) }

  2. and at the end of the script:

    HandleHarvestFile $HARVEST_MODE $HARVEST_PNAME
                $HARVEST_DNAME program_name

In templates/programname.com

  1. At the end of the script (but before any end/go type line) add:
    AT { [FileJoin [GetEnvPath CCP4I_top] templates harvest.com ] }

next button previous button