Skip to main content

Light-weight Python Computational Pipeline Management

Project description

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])

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ruffus-2.4beta3.tar.gz (81.8 kB view details)

Uploaded Source

Built Distributions

ruffus-2.4beta3-py2.7.egg (177.9 kB view details)

Uploaded Source

ruffus-2.4beta3-py2.6.egg (178.6 kB view details)

Uploaded Source

File details

Details for the file ruffus-2.4beta3.tar.gz.

File metadata

  • Download URL: ruffus-2.4beta3.tar.gz
  • Upload date:
  • Size: 81.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for ruffus-2.4beta3.tar.gz
Algorithm Hash digest
SHA256 9acbdbc3886ffeb2dfc46e190e878d5590292cc14f35896e32fb14049dc44a30
MD5 8f5656186ec47115b108933d1e85b7fe
BLAKE2b-256 3ff504a530205e7d69edcdec5a65684906626a419aef7e12a1b5984add9b86d5

See more details on using hashes here.

File details

Details for the file ruffus-2.4beta3-py2.7.egg.

File metadata

File hashes

Hashes for ruffus-2.4beta3-py2.7.egg
Algorithm Hash digest
SHA256 71dfaf17a3ea3085043c2dda089bfa5f7454bd6cd1ce2c77a2bed8834c37ca15
MD5 9248751b7e7dddf13f1a6c739b0ba9e1
BLAKE2b-256 7b6f11d294ccad622a746af801e87c21988b0abdc0bd61b4ace46cfdea7e5ac5

See more details on using hashes here.

File details

Details for the file ruffus-2.4beta3-py2.6.egg.

File metadata

File hashes

Hashes for ruffus-2.4beta3-py2.6.egg
Algorithm Hash digest
SHA256 7d4014c43459be599b676c45092927aba215660fb60d6caf9695a53c18817f6e
MD5 bac4f0abf589ff4ec1ff956534761428
BLAKE2b-256 b6db0c7a5cd77dc1ed01dab4c3b9b252f21f065b2bdca509d372589b80f45289

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page