Differences between revisions 2 and 3
Revision 2 as of 2016-02-16 00:59:31
Size: 2879
Comment: What was this Wiki syntax again?
Revision 3 as of 2016-02-16 01:54:04
Size: 3818
Comment: Added invocation.
Deletions are marked like this. Additions are marked like this.
Line 30: Line 30:
The tutorial will refer to this directory as ~/workflow . The tutorial will refer to this directory as ''~/workflows''.
Line 34: Line 34:
coming. In [https://github.com/common-workflow-language/workflows/tree/master/workflows/hello|~/workflows/workflows/hello] a presumed innocent 'Hello World' boosts motivation with quick success. From anywhere invoke:
{{{
cwltool ~/git/workflows/workflows/hello/hello.cwl#main
}}}
and you get something alike
{{{
/usr/bin/cwltool 1.0.20160203221531
[job step0] /tmp/tmpIor1Ju$ echo 'Hello World' > /tmp/tmpIor1Ju/messageout.txt
[workflow main] outdir is /home/moeller
Final process status is success
{
    "output": {
        "path": "/home/moeller/messageout.txt",
        "checksum": "sha1$648a6a6ffffdaa0badb23b8baf90b6168dd16b3a",
        "class": "File",
        "size": 12
    }
}
}}}
Indeed, the file 'mesageout.txt' holds the output as {{{
Hello World
}}}

The #main seems somewhat unmotivated. It is the entry point within the workflow.
Line 45: Line 69:
A: The cwltool lists all alternatives on its home page (http://commonwl.org). None of these is packaged up to Debian standards, Java is tricky at times, but Bio-Linux has directly installable .debs or Taverna and Galaxy. A: The cwltool lists all alternatives on its home page (http://commonwl.org). None of these is packaged up to Debian standards, Java is tricky at times, but Bio-Linux has directly installable .debs or Taverna and Galaxy. Whoever aims at bringing more workflow tools to Debian finds help right here.

The CommonWorkflowLanguage is an effort to establish a formal specification of workflows that is accepted by a range of workflow editing tools, fostering the exchange of expertise between otherwise divided communities. The effort, now at its (https://github.com/common-workflow-language/common-workflow-language/tree/master/draft-3) third draft, is slightly dominated by bioinformaticians and their wealth of smallish tools, services and data interacting in everyone's daily routine. Debian is pretty good as a collection of those tools, with DebianMed granting an easy access to a bunch of constructive individuals, which somewhat co-anchors the workflow community with it.

This page is meant as an open invitation to describe your personal approach towards the CWL. Let this be a collection of smallish tutorials and issues you ran into, so this can be discussed and addressed. If we do this right, then this community science at its best.

Installation

Prerequisites

sudo apt-get install git git-buildpackage debhelper dh-python python python-all python-setuptools python-rdflib-jsonld python-schema-salad python-shellescape

and as runtime requirements for the cwltool, also install

sudo apt-get install python-rdflib python-rdflib-jsonld python-requests python-schema-salad python-yaml

A Debian package of the cwltool reference implementation of CWL-compatible workflow engines is about to be uploaded to the Debian repository. In the meantime, to build and install it perform

gbp clone https://anonscm.debian.org/git/debian-med/cwltool.git
cd cwltool
gbp buildpackage -rfakeroot
cd ..
sudo dpkg -i cwltool_*deb

For a range of example workflows and tool descriptions, look at https://github.com/common-workflow-language/workflows and get that whole repository to your local drive via

cd # no arguments, will change to home directory
git clone https://github.com/common-workflow-language/workflows.git

The tutorial will refer to this directory as ~/workflows.

Hello World

In [https://github.com/common-workflow-language/workflows/tree/master/workflows/hello|~/workflows/workflows/hello] a presumed innocent 'Hello World' boosts motivation with quick success. From anywhere invoke:

cwltool ~/git/workflows/workflows/hello/hello.cwl#main

and you get something alike

/usr/bin/cwltool 1.0.20160203221531
[job step0] /tmp/tmpIor1Ju$ echo 'Hello World' > /tmp/tmpIor1Ju/messageout.txt
[workflow main] outdir is /home/moeller
Final process status is success
{
    "output": {
        "path": "/home/moeller/messageout.txt", 
        "checksum": "sha1$648a6a6ffffdaa0badb23b8baf90b6168dd16b3a", 
        "class": "File", 
        "size": 12
    }
}

Indeed, the file 'mesageout.txt' holds the output as

Hello World

The #main seems somewhat unmotivated. It is the entry point within the workflow.

Questions

Q: When looking at a workflow, how do I know what binaries to install?

A: This is missing/work in progress. The ELIXIR database, i.e. a catalog of bioinformatics tools and services, knows about Debian packages. And the CWL is mean to refer to that database. Any information thus automated retrieval is a bit of a workflow of its own, yet, such that it may be preferable to, for now, just use "apt-cache search" or "apt-file" on the names of the binaries stated in the workflow.

Q: Where are other workflow engines than cwltool to experiment with?

A: The cwltool lists all alternatives on its home page (http://commonwl.org). None of these is packaged up to Debian standards, Java is tricky at times, but Bio-Linux has directly installable .debs or Taverna and Galaxy. Whoever aims at bringing more workflow tools to Debian finds help right here.