Mbirn: Data Provenance:Documentation:Parsing

From NAMIC Wiki
Jump to: navigation, search
Home < Data Provenance:Documentation:Parsing

This is version 1.0, see BIRN xwiki for 2.0+

Parsing of raw output

The script file dataprov.tcl will parse the output from the processing script and construct a tree of information as follows:

  • Processing Tool1
    • field: value pairs
  • Processing Tool2
    • field: value pairs

It is important that all processing tools start their data provenance output with the ProgramName flag. The rest of the flags can be in any order, but this one marks the beginning of a new tool's information.

Processing Script

The procesing script will call the processing steps with the --all-info flag, and the programs will print out their data provenance information to the standard output. The output of the processing script will be redirected to a file, and that file will be processed by dataprov.tcl. The following example uses a processing script that converts from a Freesurfer MGH volume to a Freesurfer COR voluem and displays it in Slicer.

   # convertandshow.sh
   mri_convert -all-info
   rm -rf /home/nicole/data/flash40cor
   mkdir /home/nicole/data/flash40cor
   mri_convert  --out_type cor /home/nicole/data/flash40.mgh /home/nicole/data/flash40cor
   /extra/nicole/slicer2/slicer2-linux-x86 --no-tkcon --all-info --load-freesurfer-volume /home/nicole/data/flash40cor/COR-.info
   exit

The script is called from another script that redirects and parses the output:

   # dataprov.sh
   convertandshow.sh > /home/nicole/dataprov/convertandshow.txt
   dataprov.tcl /home/nicole/dataprov/convertandshow.txt

Once you exit Slicer, the xml file appears on the standard output, and can be redirected to an xml file by calling the script like so:

   dataprov.sh > dataprov.xml



Back