aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPjotr Prins2021-01-04 11:04:13 +0000
committerPjotr Prins2021-01-04 11:04:43 +0000
commit22f7f7d8dd9ec732881621f9fdf561062efa4f9e (patch)
treefdd9189aee8d20a7cfb9dfbce2904c75874f946e
parent1aac1ddb5728cd614a57482b16a3d85f67f11a92 (diff)
downloadgn-docs-22f7f7d8dd9ec732881621f9fdf561062efa4f9e.tar.gz
Run CWL on Guix
-rw-r--r--deploy/CWL/run-common-workflow-language.org67
1 files changed, 67 insertions, 0 deletions
diff --git a/deploy/CWL/run-common-workflow-language.org b/deploy/CWL/run-common-workflow-language.org
new file mode 100644
index 0000000..7ce8ddc
--- /dev/null
+++ b/deploy/CWL/run-common-workflow-language.org
@@ -0,0 +1,67 @@
+#+TITLE: Running the common workflow language on GNU Guix
+
+* Introduction
+
+The common workflow language (CWL) can run workflows defined in a YAML
+definition. Some key concepts are that CWL workflows can be analysed
+and reasoned on (unlike shell scripts) and CWL workflows are a
+separation of concerns: (1) tools/scripts, (2) data and (3) the
+workflow, i.e. how it connects up.
+
+CWL is also agnostic about finding underlying tooling. Docker links
+are often provided as hints, but with ~--no-container~ a tool just
+gets invoked. This is great in the context of GNU Guix environments!
+
+* Install CWL using GNU Guix
+
+You may need to install GNU Guix and see the README on
+http://git.genenetwork.org/guix-bioinformatics/guix-bioinformatics
+
+Recent versions of GNU Guix contain =cwl-runner=:
+
+: guix pull
+: ~/.config/guix/current/bin/guix package -A cwl
+: cwltool 3.0.20201121085451 out gnu/packages/bioinformatics.scm:2627:2
+
+Install with
+
+: guix package -i cwltool
+
+or in a special profile (I tend to do that)
+
+: guix package -i cwltool -p ~/opt/CWL
+
+Set the PATH and you should be able to run cwltool
+
+: . ~/opt/CWL/etc/profile
+: cwltool
+
+
+* Set up a more advanced workflow
+
+Let's run the workflow that was described in [[https://hpc.guix.info/blog/2019/01/creating-a-reproducible-workflow-with-cwl/][creating a reproducible
+workflow with GNU Guix]]:
+
+: git clone https://github.com/pjotrp/CWL-workflows
+
+Build the contained trimmomatic (if you are unlucky this may take a
+while)
+
+: cd CWL-workflows
+: env GUIX_PACKAGE_PATH=. guix build trimmomatic-jar
+
+Now let's rerun the workflow as set up in above [[https://hpc.guix.info/blog/2019/01/creating-a-reproducible-workflow-with-cwl/][BLOG]] (I created a
+local version to skip IPFS). Make sure your PATH points to all the
+tools and
+
+: cwltool --no-container Workflows/test-workflow.cwl Jobs/local-small.ERR034597.test-workflow.yml
+: <lots of output>
+: INFO Final process status is success
+
+Note that I hard coded two paths which you need to point to your Guix
+profile first:
+
+: Tools/trimmomaticPE.cwl: valueFrom: /gnu/store/v2jys382g6j5b7lsxzh8v4vfhd414nhz-profile/lib/share/jar/trimmomatic-0.38.jar
+: Tools/trimmomaticPE.cwl: valueFrom: 'ILLUMINACLIP:/gnu/store/v2jys382g6j5b7lsxzh8v4vfhd414nhz-profile/lib/share/jar/adapters/TruSeq2-PE.fa:2:40:15'
+
+This is not typical and I should find a proper way to do this ;)