Cheat Sheet
The ruffus
module is a lightweight way to add support
for running computational pipelines.
Each stage or task in a computational pipeline is represented by a python function
Each python function can be called in parallel to run multiple jobs.
1. Annotate functions with Ruffus decorators
Core
Decorator |
Syntax |
|
---|---|---|
@originate (Manual) |
@originate ( |
|
@split (Manual) |
@split ( |
|
@transform (Manual) |
||
@merge (Manual) |
@merge ( |
|
@posttask (Manual) |
@posttask (
signal_task_completion_function ) |
See Decorators for a complete list of decorators
2. Print dependency graph if necessary
For a graphical flowchart in
jpg
,svg
,dot
,png
,ps
,gif
formats:pipeline_printout_graph ( "flowchart.svg")
For a text printout of all jobs
pipeline_printout()
3. Run the pipeline
pipeline_run(multiprocess = N_PARALLEL_JOBS)