Skip to content

Commit

Permalink
Start with introducing key workflow-related planemo commands
Browse files Browse the repository at this point in the history
  • Loading branch information
wm75 committed Feb 1, 2024
1 parent 35e4d9f commit 8bdcbf3
Showing 1 changed file with 41 additions and 10 deletions.
51 changes: 41 additions & 10 deletions docs/running.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,53 @@
Interacting with Galaxy workflows
====================================

Planemo offers a number of convenient commands for working with Galaxy
workflows. Workflows are made up of a number of individual tools, which are
Galaxy workflows are made up of a number of individual tools, which are
executed in sequence, automatically. They allow Galaxy users to perform complex
analyses made up of multiple simple steps.

Workflows can be easily created, edited and run using the Galaxy user interface
(i.e. in the web-browser), as is described in the
`workflow tutorial <https://training.galaxyproject.org/training-material/topics/galaxy-interface/tutorials/workflow-editor/tutorial.html>`__
provided by the Galaxy Training Network. However, in some circumstances,
executing workflows may be awkward via the graphical interface. For example,
you might want to run workflows a very large number of times, or you might
want to automatically trigger workflow execution as a particular time as new
data becomes available. For these applications, being able to execute workflows
via the command line is very useful. This tutorial provides an introduction to
the ``planemo run`` command, which allows Galaxy tools and workflows to be
executed simply via the command line.
provided by the Galaxy Training Network.

Planemo commands for interacting with workflows
===============================================

Planemo offers a number of convenient commands for interacting with Galaxy
workflows from the command line.
Here, you will use the following ones to interact with a small example workflow:

- ``planemo run``, which can be used to execute a Galaxy workflow with input datasets / parameters defined in a so-called *job file* in YAML format.

If you are looking for a way to run workflows a very large number of times,
or to automatically trigger workflow execution at particular times or as new
data becomes available, this command is a great starting point!

- ``planemo test`` which cannot only be used to `test Galaxy tools <https://planemo.readthedocs.io/en/latest/writing_advanced.html#test-driven-development>`__, but also workflows.

Similar to ``planemo run``, this command can be used to execute a Galaxy workflow,
but it will also evaluate the success of the workflow execution by comparing workflow output datasets to expected results.

This command enables test-driven development of Galaxy workflows.
It can also form the basis of automated monitoring systems that, for example,
check for compatibility between workflow versions and Galaxy server versions and instances.

Input datasets / parameters and output assumptions are passed to this command in a *test file* in YAML format,
which extends the job file format used with ``planemo run``.

- ``planemo workflow_job_init`` and ``planemo workflow_test_init``

These are useful helper commands that generate templates of the *job file*
expected by ``planemo run`` and of the *test file* expected by ``planemo test``,
respectively, from a workflow definition file.

- ``planemo workflow_lint``, which lets you check a workflow for syntax errors and violation of workflow `best practices <https://planemo.readthedocs.io/en/latest/best_practices_workflows.html>`__.

- ``planemo list_invocations`` and ``planemo rerun``, which are great companions of ``planemo run``.

``planemo list_invocations`` provides information about the status of previous runs of a given workflow,
while ``planemo rerun``, through its ``--invocation`` option lets you rerun failed jobs
that resulted from any particular previous run of your workflow.

.. include:: _running_intro.rst
.. include:: _running_external.rst

0 comments on commit 8bdcbf3

Please sign in to comment.