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 download notes , a tutorial and an in-depth manual .

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 maintain.

Design

The ruffus module has the following design goals:

  • Lightweight

  • Scalable / Flexible / Powerful

  • Standard Python

  • Unintrusive

  • As simple as possible

Features

Automatic support for

  • Managing dependencies

  • Parallel jobs, including dispatching work to computational clusters

  • Re-starting from arbitrary points, especially after errors (checkpointing)

  • Display of the pipeline as a flowchart

  • Managing complex pipeline topologies

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.

The canonical Ruffus decorator is @transform which transforms data flowing down a computational pipeline from one stage to teh next.

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:

      pipeline_printout_graph ("flowchart.svg")

    This requires dot to be installed

    • For a text printout of all jobs

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

    pipeline_run()

Metadata

Release files for ruffus 3.0.0

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

Source distribution (sdist)

Source distribution for ruffus 3.0.0
File Size Uploaded
ruffus-3.0.0.tar.gz 12.2 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for ruffus 3.0.0
File Interpreter ABI Platform
ruffus-3.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.4 MB

Release files / ruffus-3.0.0.tar.gz

Download URL ruffus-3.0.0.tar.gz
Size 12.2 MB
Tags Source
SHA-256 checksum
How to use checksums
424a2c62a61a648f7826d7deeca02d344f62da3100f8c4b0d2d7882bd148f73c
BLAKE2b-256 checksum
How to use checksums
3b050b82d6afe0f2c4745a70c1a8ce1084b71e7b23a9b369056e58e29ca8180b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.12

Release files / ruffus-3.0.0-py3-none-any.whl

Download URL ruffus-3.0.0-py3-none-any.whl
Size 249.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
069f7befd7ec47f355bbbbf49a5f0af389f3a5c5f905b46b29915f58318adcc0
BLAKE2b-256 checksum
How to use checksums
d17f65153dff8c22674b3d52aefc89f6555dfc8fe99ddd0baa74a77f60cc1478
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.12

Release history Release notifications | RSS feed

This release

3.0.0 This release

2 release files

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

2.0.8

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