.. include:: ../global.inc
.. role:: raw-html(raw)
:format: html
:raw-html:``
:raw-html:``
.. role:: highlight-red
.. role:: highlight-blue
.. :highlight-red:`Test.`
.. _new_syntax.worked_example:
################################################################################
Worked Example for New Object orientated syntax for Ruffus in Version 2.6
################################################################################
Ruffus Pipelines can now be created and manipulated directly using :highlight-red:`Pipeline` and :highlight-red:`Task` objects instead of via decorators.
For clarity, we use named parameters in this example. You can just as easily pass all parameters by position.
==============================================================================
Worked example
==============================================================================
.. note::
Remember to look at the example code:
* :ref:`new_syntax.worked_example.code`
This example pipeline is a composite of three separately subpipelines each created by a python
function ``make_pipeline1()`` which is joined to another subpipeline created by ``make_pipeline2()``
.. image:: ../images/subpipeline_example.png
:scale: 50
Although there are 13 different stages to this pipeline, we are using the same three python functions
(but supplying them with different data).
.. < pipeline2
pipeline2.run(multiprocess = 10, verbose = 0)
..
python
.. note::
Remember to look at the example code:
* :ref:`new_syntax.worked_example.code`