DrPACS

From CARMA
(Difference between revisions)
Jump to: navigation, search
(more advanced examples)
Line 25: Line 25:
  
 
== more advanced examples ==
 
== more advanced examples ==
 +
 +
=== Running pipeline in a set of directories ===
 +
 +
method 1: old-style c-shell method
 +
 +
  foreach dir (`cat dirs.txt`)
 +
    cd $dir
 +
    pipepar foo=3.3
 +
    pipe step3 all
 +
    cd ..
 +
  end
 +
 +
method 2: using piperun
 +
 +
  piperun dirs.txt 'pipepar foo=3.3 ;  pipe step3 all'
 +
 +
 +
=== Scatterplot from a set of directories ===
 +
 +
  piperun dirs.txt pipepar -v foo -v bar > foo_bar.tab
 +
  tabplot foo_bar.tab
 +
 +
=== Parallel pipe ===
 +
 +
  piperun -n 4 dirs.txt pipe step2 all
 +
 +
=== PACS, in parallel ===
 +
 +
  piperun -n 4 -c -o pipe.log dirs.txt 'pipepar -c project=%s showPlots=False; pipe clean all'

Revision as of 10:27, 26 March 2010

drPACS is a simple yet flexible and effective pipeliner for Unix commands. There is a document (currently Appendix A in the PACS cookbook) describing this is more detail,but here is just a teaser to get a feel for what you can do with it.

Assuming it has been installed, a $DRPACS environment variable points to where the code lives, and normally $DRPACS/bin will have been added to your search path.

Contents

Simple examples how to start

Step 1: generate the control Pipefile (hint: it's a Makefile)

  pipeline $DRPACS/cat/pipeline.001 > Pipefile
  pipeline 4 step1 step2 step3 step4 > Pipefile

Step 2: set some parameters

  pipepar -c
  pipepar -c project=c0184.3B_108PG2130.13 carmaRefant=2
  pipepar interval=5 carmaRefant=3

Step 3: run the pipe

  pipe all
  pipe step2
  pipe all
  pipe clean

more advanced examples

Running pipeline in a set of directories

method 1: old-style c-shell method

  foreach dir (`cat dirs.txt`)
    cd $dir
    pipepar foo=3.3
    pipe step3 all
    cd ..
  end

method 2: using piperun

  piperun dirs.txt 'pipepar foo=3.3 ;  pipe step3 all'


Scatterplot from a set of directories

  piperun dirs.txt pipepar -v foo -v bar > foo_bar.tab
  tabplot foo_bar.tab

Parallel pipe

  piperun -n 4 dirs.txt pipe step2 all

PACS, in parallel

  piperun -n 4 -c -o pipe.log dirs.txt 'pipepar -c project=%s showPlots=False; pipe clean all'
Personal tools