about summary refs log tree commit diff
diff options
context:
space:
mode:
authorpjotrp2020-11-21 10:43:24 +0000
committerpjotrp2020-11-21 10:43:52 +0000
commit8a66ab55cab786acb9cba38b387bbbc58fa35dfa (patch)
treec573456e1e984d49c595370527ba871da58d323f
parentf129c4fc90fd70b6a468537bda8c497f2bee2277 (diff)
downloadguix-bioinformatics-8a66ab55cab786acb9cba38b387bbbc58fa35dfa.tar.gz
Updated CWL
-rw-r--r--README.org60
-rw-r--r--gn/packages/gemma.scm60
2 files changed, 108 insertions, 12 deletions
diff --git a/README.org b/README.org
index 6f986c0..e3770f7 100644
--- a/README.org
+++ b/README.org
@@ -58,31 +58,69 @@ Install slurm with
       ClusterName=(null) NodeName=selinunte CPUs=4 Boards=1 SocketsPerBoard=1 CoresPerSocket=2 ThreadsPerCore=2 RealMemory=7890 TmpDisk=29909
 #+END_SRC
 
-* Module system
 
-Install the module environment with
+* Common Workflow Language (CWL)
+
+Install the common workflow language tool cwltool from this repo with
 
 #+BEGIN_SRC bash
+
     guix pull
-    guix package -i environment-modules
+    export PATH=$HOME/.config/guix/current/bin/guix:$PATH
+    ~/guix-bioinformatics$ env GUIX_PACKAGE_PATH=.:../guix-past/modules/ ~/.config/guix/current/bin/guix package -i cwl-runner -p ~/opt/CWL
 
-    modulecmd --version
-      VERSION=3.2.10
-      DATE=2012-12-21
+The following package will be installed:
+   cwl-runner 1.0
+
+The following derivations will be built:
+   /gnu/store/ld59374zr45rbqanh7ccfi2wa4d5x4yl-cwl-runner-1.0.drv
+   /gnu/store/86j15mxj5zp3k3sjimhqhb6zsj19azsf-python-schema-salad-7.0.20200811075006.drv
+   /gnu/store/0q2ls0is3253r4gx6hs7kmvlcz412lh1-schema-salad-7.0.20200811075006.tar.gz.drv
+   /gnu/store/myj1365ph687ynahjhg6zqslrmd6zpjq-cwltool-3.0.20201117141248.drv
+
+source ~/opt/CWL/etc/profile
+cwltool --version
+  /gnu/store/50mncjcgc8vmq5dfrh0pb82avbzy8c4r-cwltool-3.0.20201117141248/bin/.cwltool-real 3.0
 #+END_SRC
 
-* Common Workflow Language (CWL)
+To run CWL definitions you can install tools in a Guix environment (avoiding
+Docker). Say you need mafft in a workflow
+
+#+begin_src sh
+    ~/guix-bioinformatics$ env GUIX_PACKAGE_PATH=.:../guix-past/modules/ ~/.config/guix/current/bin/guix environment \
+       guix --ad-hoc cwl-runner mafft
+#+end_src
 
-Install the common workflow language tool cwltool with
+in the new shell you should be able to find both CWL and MAFFT:
+
+#+begin_src sh
+ls $GUIX_ENVIRONMENT/bin/cwl*
+/gnu/store/bhfc5rk29s38w9kgcl4zmcdlh369y9f9-profile/bin/cwl-runner
+/gnu/store/bhfc5rk29s38w9kgcl4zmcdlh369y9f9-profile/bin/cwltool
+ls $GUIX_ENVIRONMENT/bin/mafft
+/gnu/store/bhfc5rk29s38w9kgcl4zmcdlh369y9f9-profile/bin/mafft
+#+end_src
+
+The paths can be loaded into the shell with
+
+: source $GUIX_ENVIRONMENT/etc/profile
+
+* Module system
+
+For those who think they need modules: install the module environment
+with
 
 #+BEGIN_SRC bash
     guix pull
-    guix package -i python2-cwltool
+    guix package -i environment-modules
 
-    cwtool --version
-      1.0.20150916041152
+    modulecmd --version
+      VERSION=3.2.10
+      DATE=2012-12-21
 #+END_SRC
 
+Note that GNU Guix supercedes module functionality!
+
 * Development tips
 
 ** Override individual packages
diff --git a/gn/packages/gemma.scm b/gn/packages/gemma.scm
index 9bbb186..e6d49b4 100644
--- a/gn/packages/gemma.scm
+++ b/gn/packages/gemma.scm
@@ -100,7 +100,7 @@
     (license license:bsd-3))))
 
 
-(define-public gemma-gn2 ; guix candidate - generic openblas version
+(define-public gemma-gn2 ; Version used in GeneNetwork. Guix candidate - generic openblas version
   (let ((commit "97547ee82e0bd1cc2210612415b0ceb135dbba6d"))
   (package
     (name "gemma-gn2")
@@ -176,6 +176,63 @@ genome-wide association studies (GWAS).")
        #:parallel-tests? #f))
    ))
 
+(define-public gemma-gn2-dev ; Dev version for GeneNetwork. Not a Guix candidate
+  (let ((commit "d53a04edc476d820de7a611cacc8b105115aa3cc"))
+  (package
+    (name "gemma-gn2-dev")
+    (version (string-append "0.98.2-" (string-take commit 7)))
+    (source (origin
+             (method git-fetch)
+             (uri (git-reference
+                   (url "https://github.com/genenetwork/GEMMA")
+                   (commit commit)))
+             (file-name (string-append name "-" version "-checkout"))
+             (sha256
+              (base32
+               "0xm4cjfzrcb1wc8lw9p1727spica8rlzwnvjkp7ackn1g7zmzhw0"))))
+    ; guix environment -C guix --ad-hoc gcc-toolchain gdb gsl openblas zlib bash ld-wrapper perl vim which
+    (inputs `(
+              ("gsl" ,gsl)
+              ("shunit2" ,shunit2)
+              ("openblas" ,openblas)
+              ("zlib" ,zlib)
+              ))
+    (native-inputs ; for running tests
+     `(("perl" ,perl)
+       ("which" ,which)
+       ))
+
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+        (modify-phases %standard-phases
+         (delete 'configure)
+         (add-before 'build 'bin-mkdir
+                     (lambda _
+                       (mkdir-p "bin")
+                       ))
+         (replace 'build
+                  (lambda* (#:key inputs #:allow-other-keys)
+                    (invoke "make" "debug" "-j" (number->string (parallel-job-count)))))
+         (replace 'check
+                  (lambda* (#:key inputs #:allow-other-keys)
+                    (invoke "make" "fast-check" )))
+         (replace 'install
+                  (lambda* (#:key outputs #:allow-other-keys)
+                           (let ((out (assoc-ref outputs "out")))
+                             (install-file "bin/gemma" (string-append out "/bin"))))))
+       ; #:tests? #f
+       #:parallel-tests? #f))
+    (home-page "http://www.xzlab.org/software.html")
+    (synopsis "Tool for genome-wide efficient mixed model association")
+    (description "Genome-wide Efficient Mixed Model Association (GEMMA)
+provides a standard linear mixed model resolver with application in
+genome-wide association studies (GWAS).")
+
+    (license license:gpl3))))
+
+
+
 (define-public gemma-wrapper
   (package
     (name "gemma-wrapper")
@@ -256,6 +313,7 @@ genome-wide association studies (GWAS).")
     (description "Gemma-development")
     (license license:gpl3))))
 
+
 (define-public faster-lmm-d-dev ; incomplete, just creates build environment
   (let ((commit "68e22043ce0ca348cbc4f3bdd015e036ba9ac5f2"))
     (package