You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

149 lines
4.5 KiB

3 years ago
7 years ago
2 years ago
7 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
7 years ago
3 years ago
7 years ago
3 years ago
7 years ago
7 years ago
7 years ago
3 years ago
7 years ago
7 years ago
7 years ago
3 years ago
7 years ago
3 years ago
7 years ago
3 years ago
7 years ago
7 years ago
2 years ago
2 years ago
7 years ago
3 years ago
2 years ago
2 years ago
7 years ago
2 years ago
3 years ago
7 years ago
2 years ago
7 years ago
2 years ago
7 years ago
3 years ago
2 years ago
2 years ago
3 years ago
7 years ago
2 years ago
3 years ago
7 years ago
3 years ago
7 years ago
3 years ago
7 years ago
3 years ago
7 years ago
7 years ago
3 years ago
7 years ago
  1. * guix-bioinformatics
  2. Bioinformatics packages for GNU Guix that are used in
  3. http://genenetwork.org/ and some other places. See [[https://gitlab.com/pjotrp/guix-notes/blob/master/HACKING.org][Guix notes]] for
  4. installing and hacking GNU Guix. Other channels of bioinformatics
  5. interest can be found at
  6. 1. https://github.com/BIMSBbioinfo
  7. 2. https://github.com/UMCUGenetics/guix-additions
  8. 3. https://github.com/ekg/guix-genomics
  9. Also see [[http://git.genenetwork.org/pjotrp/guix-notes/src/branch/master/CHANNELS.org][Guix notes]] for a list of channels.
  10. To easily use the packages from this repo, simply add it to your
  11. `channels` list in ~/.config/guix/channels.scm as described
  12. [[https://guix.gnu.org/manual/en/html_node/Channels.html][here]]:
  13. #+BEGIN_SRC scheme
  14. (cons*
  15. (channel
  16. (name 'gn-bioinformatics)
  17. (url "https://git.genenetwork.org/guix-bioinformatics/guix-bioinformatics.git")
  18. (branch "master"))
  19. %default-channels)
  20. #+END_SRC
  21. and run `guix pull` like normal to update your software. This is the
  22. recommended way to use the software from this repository and the code
  23. snippets in this README assume you have done so.
  24. If you want to make changes to the packages in this repo then simply set
  25. the GUIX_PACKAGE_PATH to point to the root of this directory
  26. before running Guix. E.g.
  27. #+BEGIN_SRC bash
  28. git clone https://git.genenetwork.org/guix-bioinformatics/guix-bioinformatics.git
  29. git clone https://gitlab.inria.fr/guix-hpc/guix-past.git
  30. export GUIX_PACKAGE_PATH=$PWD/guix-bioinformatics/:$PWD/guix-past/modules
  31. guix package -A cwl
  32. #+END_SRC
  33. or using a checked out Guix repo with
  34. : env GUIX_PACKAGE_PATH=$genenetwork/guix-bioinformatics/ ./pre-inst-env guix package -A cwl
  35. Some (or most) of these package definitions should make it upstream
  36. into the GNU Guix repository when tested and stable.
  37. * Slurm and munge
  38. Install slurm with
  39. #+BEGIN_SRC bash
  40. guix pull
  41. guix package -i slurm-llnl
  42. ~/.guix-profile/sbin/slurmd -C -D
  43. ClusterName=(null) NodeName=selinunte CPUs=4 Boards=1 SocketsPerBoard=1 CoresPerSocket=2 ThreadsPerCore=2 RealMemory=7890 TmpDisk=29909
  44. #+END_SRC
  45. * Common Workflow Language (CWL)
  46. /Note that CWL moved into Guix master!/
  47. Install the common workflow language tool cwltool from this repo with
  48. #+BEGIN_SRC bash
  49. guix pull
  50. export PATH=$HOME/.config/guix/current/bin/guix:$PATH
  51. ~/guix-bioinformatics$ env GUIX_PACKAGE_PATH=.:../guix-past/modules/ ~/.config/guix/current/bin/guix package -i cwl-runner -p ~/opt/CWL
  52. The following package will be installed:
  53. cwl-runner 1.0
  54. The following derivations will be built:
  55. /gnu/store/ld59374zr45rbqanh7ccfi2wa4d5x4yl-cwl-runner-1.0.drv
  56. /gnu/store/86j15mxj5zp3k3sjimhqhb6zsj19azsf-python-schema-salad-7.0.20200811075006.drv
  57. /gnu/store/0q2ls0is3253r4gx6hs7kmvlcz412lh1-schema-salad-7.0.20200811075006.tar.gz.drv
  58. /gnu/store/myj1365ph687ynahjhg6zqslrmd6zpjq-cwltool-3.0.20201117141248.drv
  59. source ~/opt/CWL/etc/profile
  60. cwltool --version
  61. /gnu/store/50mncjcgc8vmq5dfrh0pb82avbzy8c4r-cwltool-3.0.20201117141248/bin/.cwltool-real 3.0
  62. #+END_SRC
  63. To run CWL definitions you can install tools in a Guix environment (avoiding
  64. Docker). Say you need mafft in a workflow
  65. #+begin_src sh
  66. ~/guix-bioinformatics$ env GUIX_PACKAGE_PATH=.:../guix-past/modules/ ~/.config/guix/current/bin/guix environment \
  67. guix --ad-hoc cwl-runner mafft
  68. #+end_src
  69. in the new shell you should be able to find both CWL and MAFFT:
  70. #+begin_src sh
  71. ls $GUIX_ENVIRONMENT/bin/cwl*
  72. /gnu/store/bhfc5rk29s38w9kgcl4zmcdlh369y9f9-profile/bin/cwl-runner
  73. /gnu/store/bhfc5rk29s38w9kgcl4zmcdlh369y9f9-profile/bin/cwltool
  74. ls $GUIX_ENVIRONMENT/bin/mafft
  75. /gnu/store/bhfc5rk29s38w9kgcl4zmcdlh369y9f9-profile/bin/mafft
  76. #+end_src
  77. The paths can be loaded into the shell with
  78. : source $GUIX_ENVIRONMENT/etc/profile
  79. * Module system
  80. For those who think they need modules: install the module environment
  81. with
  82. #+BEGIN_SRC bash
  83. guix pull
  84. guix package -i environment-modules
  85. modulecmd --version
  86. VERSION=3.2.10
  87. DATE=2012-12-21
  88. #+END_SRC
  89. Note that GNU Guix supercedes module functionality!
  90. * Development tips
  91. ** Override individual packages
  92. The cheerful way of overriding a version of a package:
  93. #+BEGIN_SRC scheme
  94. (use-modules (guix) (gnu packages emacs))
  95. (package
  96. (inherit emacs)
  97. (name "emacs-snapshot")
  98. (source "/path/to/some-file-or-directory.tar.gz"))
  99. #+END_SRC
  100. and then run:
  101. : guix package --install-from-file=that-file.scm
  102. * LICENSE
  103. These package descriptions (so-called Guix expressions) are
  104. distributed by the same license as GNU Guix, i.e. GPL3+