diff options
Diffstat (limited to 'gnu/packages/bioinformatics.scm')
-rw-r--r-- | gnu/packages/bioinformatics.scm | 125 |
1 files changed, 98 insertions, 27 deletions
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index f63ae5f324..91fcb28451 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -12,7 +12,7 @@ ;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com> ;;; Copyright © 2018 Gábor Boskovits <boskovits@gmail.com> ;;; Copyright © 2018, 2019, 2020 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de> -;;; Copyright © 2019, 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com> +;;; Copyright © 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; Copyright © 2019 Brian Leung <bkleung89@gmail.com> ;;; Copyright © 2019 Brett Gilio <brettg@gnu.org> ;;; Copyright © 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de> @@ -354,6 +354,28 @@ transparently with both VCFs and BCFs, both uncompressed and BGZF-compressed.") ;; The sources are dual MIT/GPL, but becomes GPL-only when USE_GPL=1. (license (list license:gpl3+ license:expat)))) +(define-public bcftools-1.9 + (package (inherit bcftools) + (name "bcftools") + (version "1.9") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/samtools/bcftools/" + "releases/download/" + version "/bcftools-" version ".tar.bz2")) + (sha256 + (base32 + "1j3h638i8kgihzyrlnpj82xg1b23sijibys9hvwari3fy7kd0dkg")) + (modules '((guix build utils))) + (snippet '(begin + ;; Delete bundled htslib. + (delete-file-recursively "htslib-1.9") + #t)))) + (build-system gnu-build-system) + (native-inputs + `(("htslib" ,htslib-1.9) + ("perl" ,perl))))) + (define-public bedops (package (name "bedops") @@ -437,7 +459,7 @@ computational cluster.") (native-inputs `(("python" ,python-wrapper))) (inputs - `(("samtools" ,samtools) + `(("samtools" ,samtools-1.9) ("zlib" ,zlib))) (home-page "https://github.com/arq5x/bedtools2") (synopsis "Tools for genome analysis and arithmetic") @@ -1894,7 +1916,7 @@ multiple sequence alignments.") (define-public python-pysam (package (name "python-pysam") - (version "0.16.0.1") + (version "0.15.1") (source (origin (method git-fetch) ;; Test data is missing on PyPi. @@ -1904,7 +1926,7 @@ multiple sequence alignments.") (file-name (git-file-name name version)) (sha256 (base32 - "168bwwm8c2k22m7paip8q0yajyl7xdxgnik0bgjl7rhqg0majz0f")) + "1vj367w6xbn9bpmksm162l1aipf7cj97h1q83y7jcpm33ihwpf7x")) (modules '((guix build utils))) (snippet '(begin ;; Drop bundled htslib. TODO: Also remove samtools @@ -1934,13 +1956,8 @@ multiple sequence alignments.") ;; This file contains tests that require a connection to the ;; internet. (delete-file "tests/tabix_test.py") - ;; These tests fail (see: - ;; https://github.com/pysam-developers/pysam/issues/939). - (delete-file "tests/compile_test.py") + ;; FIXME: This test fails (delete-file "tests/AlignmentFile_test.py") - (delete-file "tests/AlignmentFileHeader_test.py") - (delete-file "tests/StreamFiledescriptors_test.py") - (delete-file "tests/VariantRecord_test.py") ;; Add first subdirectory of "build" directory to PYTHONPATH. (setenv "PYTHONPATH" (string-append @@ -1960,7 +1977,7 @@ multiple sequence alignments.") ;; FIXME: tests keep timing out on some systems. (invoke "nosetests" "-v" "--processes" "1"))))))) (propagated-inputs - `(("htslib" ,htslib))) ; Included from installed header files. + `(("htslib" ,htslib-1.9))) ; Included from installed header files. (inputs `(("ncurses" ,ncurses) ("curl" ,curl) @@ -1968,10 +1985,9 @@ multiple sequence alignments.") (native-inputs `(("python-cython" ,python-cython) ;; Dependencies below are are for tests only. - ("samtools" ,samtools) - ("bcftools" ,bcftools) - ("python-nose" ,python-nose) - ("python-pytest" ,python-pytest))) + ("samtools" ,samtools-1.9) + ("bcftools" ,bcftools-1.9) + ("python-nose" ,python-nose))) (home-page "https://github.com/pysam-developers/pysam") (synopsis "Python bindings to the SAMtools C API") (description @@ -4256,6 +4272,19 @@ data. It also provides the @command{bgzip}, @command{htsfile}, and ;; the rest is released under the Expat license (license (list license:expat license:bsd-3)))) +(define-public htslib-1.9 + (package (inherit htslib) + (name "htslib") + (version "1.9") + (source (origin + (method url-fetch) + (uri (string-append + "https://github.com/samtools/htslib/releases/download/" + version "/htslib-" version ".tar.bz2")) + (sha256 + (base32 + "16ljv43sc3fxmv63w7b2ff8m1s7h89xhazwmbm1bicz8axq8fjz0")))))) + ;; This package should be removed once no packages rely upon it. (define htslib-1.3 (package @@ -4476,26 +4505,40 @@ experiments.") ;; The PyPi tarball does not contain tests. (method git-fetch) (uri (git-reference - (url "https://github.com/taoliu/MACS") + (url "https://github.com/macs3-project/MACS") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 - "1c5gxr0mk6hkd4vclf0k00wvyvzw2vrmk52c85338p7aqjwg6n15")))) + "1c5gxr0mk6hkd4vclf0k00wvyvzw2vrmk52c85338p7aqjwg6n15")) + (modules '((guix build utils))) + ;; Remove files generated by Cython + (snippet + '(begin + (for-each (lambda (file) + (let ((generated-file + (string-append (string-drop-right file 3) "c"))) + (when (file-exists? generated-file) + (delete-file generated-file)))) + (find-files "." "\\.pyx$")) + (delete-file "MACS2/IO/CallPeakUnitPrecompiled.c") + #t)))) (build-system python-build-system) (arguments `(#:phases (modify-phases %standard-phases - (delete 'check) - (add-after 'install 'check - (lambda* (#:key inputs outputs #:allow-other-keys) - (add-installed-pythonpath inputs outputs) - (invoke "pytest" "-v")))))) + (replace 'check + (lambda* (#:key tests? inputs outputs #:allow-other-keys) + (when tests? + (add-installed-pythonpath inputs outputs) + (invoke "pytest" "-v")) + #t))))) (inputs `(("python-numpy" ,python-numpy))) (native-inputs - `(("python-pytest" ,python-pytest))) - (home-page "https://github.com/taoliu/MACS/") + `(("python-cython" ,python-cython) + ("python-pytest" ,python-pytest))) + (home-page "https://github.com/macs3-project/MACS") (synopsis "Model based analysis for ChIP-Seq data") (description "MACS is an implementation of a ChIP-Seq analysis algorithm for @@ -5678,6 +5721,31 @@ variant calling (in conjunction with bcftools), and a simple alignment viewer.") (license license:expat))) +(define-public samtools-1.9 + (package (inherit samtools) + (name "samtools") + (version "1.9") + (source + (origin + (method url-fetch) + (uri + (string-append "mirror://sourceforge/samtools/samtools/" + version "/samtools-" version ".tar.bz2")) + (sha256 + (base32 + "10ilqbmm7ri8z431sn90lvbjwizd0hhkf9rcqw8j823hf26nhgq8")) + (modules '((guix build utils))) + (snippet '(begin + ;; Delete bundled htslib. + (delete-file-recursively "htslib-1.9") + #t)))) + (inputs + `(("htslib" ,htslib-1.9) + ("ncurses" ,ncurses) + ("perl" ,perl) + ("python" ,python) + ("zlib" ,zlib))))) + (define-public samtools-0.1 ;; This is the most recent version of the 0.1 line of samtools. The input ;; and output formats differ greatly from that used and produced by samtools @@ -15369,7 +15437,7 @@ patterns.") (define-public methyldackel (package (name "methyldackel") - (version "0.4.0") + (version "0.5.1") (source (origin (method git-fetch) (uri (git-reference @@ -15378,7 +15446,7 @@ patterns.") (file-name (git-file-name name version)) (sha256 (base32 - "10gh8k0ca92kywnrw5pkacq3g6r8s976s12k8jhp8g3g49q9a97g")))) + "1sfhf2ap75qxpnmy1ifgmxqs18rq8mah9mcgkby73vc6h0sw99ws")))) (build-system gnu-build-system) (arguments `(#:test-target "test" @@ -15391,11 +15459,14 @@ patterns.") (replace 'configure (lambda* (#:key outputs #:allow-other-keys) (substitute* "Makefile" + (("-lhts ") "-lhts -lBigWig ") (("install MethylDackel \\$\\(prefix\\)" match) (string-append "install -d $(prefix); " match))) #t))))) (inputs - `(("htslib" ,htslib) + `(("curl" ,curl) ; XXX: needed by libbigwig + ("htslib" ,htslib-1.9) + ("libbigwig" ,libbigwig) ("zlib" ,zlib))) ;; Needed for tests (native-inputs |