Skip to content

Commit 84c4a73

Browse files
committed
Implement instructions and project template for GA4GH Tool Execution Challenge Phase 1.
1 parent 3129216 commit 84c4a73

File tree

2 files changed

+74
-0
lines changed

2 files changed

+74
-0
lines changed
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# GA4GH Tool Execution Challenge - Phase 1 - Entry Planemo + Galaxy
2+
3+
This document describes how to use Planemo ([docs](http://planemo.readthedocs.io/en/latest/?badge=latest)
4+
| [github](https://github.com/galaxyproject/planemo)) to complete Phase 1 of the
5+
[GA4GH Tool Execution Challenge](https://www.synapse.org/#!Synapse:syn8080249) - running the example tool
6+
through both a fork of Galaxy implementing initial support for CWL tool and [cwltool](https://github.com/common-workflow-language/cwltool) (the CWL reference implementation).
7+
8+
## Install Planemo
9+
10+
First install Planemo. Planemo is available for Linux and Mac OS X and can be installed using pip, Conda, or Homebrew and is also available as a virtual appliance for Docker, Vagrant, or VirtualBox. If you have virtualenv and Python installed the following is perhaps the easiest way to get going.
11+
12+
```
13+
$ virtualenv planemo-venv; . planemo-venv/bin/activate
14+
$ pip install -U pip
15+
$ pip install planemo
16+
```
17+
18+
Full documentation on installing Planemo is available [here](http://planemo.readthedocs.io/en/latest/installation.html).
19+
20+
## Setup Test Files
21+
22+
Planemo has a project and tool templates to quickly get going with CWL and Galaxy tool development. A project has been created for this phase that just populates a directory with these directions and the required input files.
23+
24+
```
25+
$ planemo project_init --template ga4gh_execution_challenge_phase_1 phase_1
26+
$ cd phase_1
27+
$ ls
28+
README.md job.json md5sum.input
29+
```
30+
31+
These files are:
32+
33+
* ``README.md`` is this document.
34+
* ``md5sum.input`` is the document provided for the challenge to run through the challenge tool.
35+
* ``job.json`` is a CWL job crafted to run ``md5sum.input`` with the supplied tool.
36+
37+
## Run the Test
38+
39+
Planemo can now be used to run the test tool.
40+
41+
```
42+
$ time planemo run --docker --non_strict_cwl --output_directory . dockstore://quay.io/briandoconnor/dockstore-tool-md5sum job.json
43+
** Lots of Galaxy output as a server is launched containing the referenced tool **
44+
{u'output_file': {'path': u'/Users/john/workspace/planemo/project_templates/ga4gh_execution_challenge_phase_1/output_file', 'class': 'File'}}
45+
planemo run --docker --non_strict_cwl --output_directory . job.json 7.06s user 3.19s system 25% cpu 39.912 total
46+
$ cat output_file
47+
00579a00e3e7fa0674428ac7049423e2
48+
```
49+
50+
The various Planemo flags here used are:
51+
52+
* ``--docker``: Unlike cwltool, Planemo doesn't attempt to use Docker by default but the tool used in the
53+
challenge requires a Docker container. This flags enables Docker - be sure Docker is running and available
54+
to the user of Planemo.
55+
* ``--non_strict_cwl``: The test tool (at least one version of it) was non-strict CWL, this flag allows such
56+
tools to execute when using Planemo.
57+
* ``--output_directory .``: This tells ``planemo run`` to write the tool outputs to the current directory.
58+
59+
As you can see, Planemo copied the output of that tool execution to the current directory as ``output_file`` (the
60+
id of output in the CWL tool definition.
61+
62+
Planemo has the concept of engines - and it uses the Galaxy engine to run CWL tools by default but it can
63+
also use ``cwltool`` (the reference implementation).
64+
65+
Below is an example of that.
66+
67+
```
68+
$ time planemo run --engine cwltool --docker --non_strict_cwl dockstore://quay.io/briandoconnor/dockstore-tool-md5sum job.json
69+
{u'output_file': {u'format': u'http://edamontology.org/data_3671', u'checksum': u'sha1$1250816c19c6f5524c5366b56c7a1eed6f3c3ab3', u'basename': u'md5sum.txt', u'location': u'file:///Users/john/workspace/planemo/project_templates/ga4gh_execution_challenge_phase_1/md5sum.txt', u'path': u'/Users/john/workspace/planemo/project_templates/ga4gh_execution_challenge_phase_1/md5sum.txt', u'class': u'File', u'size': 33}}
70+
planemo run --engine cwltool --docker --non_strict_cwl job.json 1.30s user 0.22s system 46% cpu 3.262 total
71+
$ cat md5sum.txt
72+
00579a00e3e7fa0674428ac7049423e2
73+
```
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
this is the test file that will be used when calculating an md5sum

0 commit comments

Comments
 (0)