Ruffus Decorators¶
See also
Core¶
Decorator |
Examples |
|
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
Combinatorics¶
Decorator |
Examples |
|
|---|---|---|
|
||
@permutations (Summary / Manual)
|
|
|
@combinations (Summary / Manual)
|
|
|
@combinations_with_replacement (Summary / Manual)
|
|
Advanced¶
Decorator
Examples
Subdivides each input into multiple Outputs.
The number of output can be determined at runtime using globs.
Many to Even More operator.
Do not use split as a synonym for subdivide.
- @subdivide (
input, regex() , [ inputs | add_inputs(input_pattern), ]output, [extras,…] )
- @subdivide (
input, formatter([] ), [ inputs | add_inputs(input_pattern), ]output, [extras,…] )
Generates both input & output from regular expressions
Useful for adding additional file dependencies
- @transform (
input, regex() , [ inputs | add_inputs(input_pattern), ]output, [extras,…] )
- @transform (
input, formatter() , [ inputs | add_inputs(input_pattern), ]output, [extras,…] )
Groups multiple input using regular expression matching.
Multiple input generating identical output are collated together.
Indicates task dependency
optional mkdir prerequisite (see Manual)
Calls function after task completes
Optional touch_file indicator (Manual)
- @posttask (
completion_signal_func)
- @posttask (touch_file(
'task1.done'))
Switches tasks on and off at run time
- Evaluated each time you call
- Dormant tasks behave as if they are :
up to date and
have no output.
- @active_if (
on_or_off1,[on_or_off2, ...])@jobs_limit (Summary / Manual)
Limits the amount of multiprocessing for the specified task
Ensures that fewer than N jobs are run in parallel for this task
Overrides
multiprocessparameter in pipeline_run(…)
- @jobs_limit (
NUMBER_OF_JOBS_RUNNING_CONCURRENTLY)
Generates paths for os.makedirs
Customise the task graphics in flowcharts from pipeline_printout_graph(…)
- @graphviz (
graphviz_parameter = XXX,[graphviz_parameter2 = YYY ...])
Esoteric!¶
Decorator
Examples
I/O parameters
skips up-to-date jobs
Should use @transform etc instead
By default, does not check if jobs are up to date
Best used in conjuction with @check_if_uptodate
@check_if_uptodate (Summary / Manual)
Custom function to determine if jobs need to be run
- @check_if_uptodate (
is_task_up_to_date_function)
@files_re (
input,matching_regex, [input_pattern,]output,...)