Skip to main content

Overview

The ruffus module is a lightweight way to add support for running computational pipelines.

Computational pipelines are often conceptually quite simple, especially if we breakdown the process into simple stages, or separate tasks.

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.

Ruffus was originally designed for use in bioinformatics to analyse multiple genome data sets.

Documentation

Ruffus documentation can be found here , with an download notes , a short tutorial and an in-depth tutorial .

Background

The purpose of a pipeline is to determine automatically which parts of a multi-stage process needs to be run and in what order in order to reach an objective (“targets”)

Computational pipelines, especially for analysing large scientific datasets are in widespread use. However, even a conceptually simple series of steps can be difficult to set up and to maintain, perhaps because the right tools are not available.

Design

The ruffus module has the following design goals:

  • Simplicity. Can be picked up in 10 minutes

  • Elegance

  • Lightweight

  • Unintrusive

  • Flexible/Powerful

Features

Automatic support for

  • Managing dependencies

  • Parallel jobs

  • Re-starting from arbitrary points, especially after errors

  • Display of the pipeline as a flowchart

  • Reporting

A Simple example

Use the @follows(…) python decorator before the function definitions:

from ruffus import *
import sys

def first_task():
    print "First task"

@follows(first_task)
def second_task():
    print "Second task"

@follows(second_task)
def final_task():
    print "Final task"

the @follows decorator indicate that the first_task function precedes second_task in the pipeline.

Usage

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. Import module:

    import ruffus
  1. Annotate functions with python decorators

  2. Print dependency graph if you necessary

    • For a graphical flowchart in jpg, svg, dot, png, ps, gif formats:

      graph_printout ( open("flowchart.svg", "w"),
                       "svg",
                       list_of_target_tasks)

    This requires dot to be installed

    • For a text printout of all jobs

      pipeline_printout(sys.stdout, list_of_target_tasks)
  3. Run the pipeline:

    pipeline_run(list_of_target_tasks, [list_of_tasks_forced_to_rerun, multiprocess = N_PARALLEL_JOBS])

Release files for ruffus 2.0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distributions (sdists)

Source distribution for ruffus 2.0.8
File Size Uploaded
ruffus-2.0.8.zip 2.2 MB Details
ruffus-2.0.8.tar.gz 2.1 MB Details

Release files / ruffus-2.0.8.zip

Download URL ruffus-2.0.8.zip
Size 2.2 MB
Tags Source
SHA-256 checksum
How to use checksums
35afe0635b0eb74226add5942c6a6a3fb9a95f992291c9ddd4b2bee1ae42f769
BLAKE2b-256 checksum
How to use checksums
79cc690d30ef4cd8ff74145ce3dcd0617d60318d2a633ab84ad3e7c1f59b741a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / ruffus-2.0.8.tar.gz

Download URL ruffus-2.0.8.tar.gz
Size 2.1 MB
Tags Source
SHA-256 checksum
How to use checksums
d80d55c680fbf43d93696111a85a2cb3e805fdfa69b527745f31ccfcdf1d23fc
BLAKE2b-256 checksum
How to use checksums
bd2e0d1a15deb10ac1caf8d9d387edc07a7b4daba32f33f3cf2d18cb76a53fc1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

2.8.4

1 release file

2.8.3

1 release file

2.8.2

1 release file

2.8.1

1 release file

2.8.0

1 release file

2.7.0

1 release file

2.6.3

1 release file

2.6.2

1 release file

2.6.1

1 release file

2.6

1 release file

2.5

1 release file

2.4.1

1 release file

2.4

1 release file

2.2

2 release files

2.1.0

1 release file

2.0.10

1 release file

2.0.9

1 release file

This release

2.0.8 This release

2 release files

2.0.7

2 release files

2.0.6

2 release files

2.0.3

2 release files

2.0.1

2 release files

1.1.4

2 release files

1.1.2

2 release files

1.1.1

1 release file

1.1.0

1 release file

1.0.9

1 release file

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

1 release file

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page