See also

- @merge in the Ruffus Manual

- Decorators for more decorators

# merge

## @merge ( input, output, [extras,…] )

> Purpose:

>   Merges multiple input into a single output.

>   Only out of date tasks (comparing input and output files) will be run

> Example:

>     @merge(previous_task, 'all.summary')
>     def summarize(infiles, summary_file):
>         pass

> Parameters:

> - input = tasks_or_file_names

>     can be a:

>     1. Task / list of tasks.

>          File names are taken from the output of the specified task(s)

>     2. (Nested) list of file name strings.
>          File names containing `*[]?` will be expanded as a glob.

>            E.g.:`"a.*" => "a.1", "a.2"`

> - output = output

>     Specifies the resulting output file name(s).

> - extras = extras

>     Any extra parameters are passed verbatim to the task function

>     If you are using named parameters, these can be passed as a list, i.e. `extras= [...]`

>     Any extra parameters are consumed by the task function and not forwarded further down the pipeline.

See here for more advanced uses of merging.