mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
gnu: Add khmer.
* gnu/packages/bioinformatics.scm (khmer): New variable. * gnu/packages/patches/khmer-use-libraries.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it.
This commit is contained in:
parent
9ded145717
commit
94ff31572d
3 changed files with 95 additions and 0 deletions
|
@ -593,6 +593,7 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/jasper-CVE-2016-2089.patch \
|
%D%/packages/patches/jasper-CVE-2016-2089.patch \
|
||||||
%D%/packages/patches/jasper-CVE-2016-2116.patch \
|
%D%/packages/patches/jasper-CVE-2016-2116.patch \
|
||||||
%D%/packages/patches/jbig2dec-ignore-testtest.patch \
|
%D%/packages/patches/jbig2dec-ignore-testtest.patch \
|
||||||
|
%D%/packages/patches/khmer-use-libraries.patch \
|
||||||
%D%/packages/patches/kmod-module-directory.patch \
|
%D%/packages/patches/kmod-module-directory.patch \
|
||||||
%D%/packages/patches/ldc-disable-tests.patch \
|
%D%/packages/patches/ldc-disable-tests.patch \
|
||||||
%D%/packages/patches/lftp-dont-save-unknown-host-fingerprint.patch \
|
%D%/packages/patches/lftp-dont-save-unknown-host-fingerprint.patch \
|
||||||
|
|
|
@ -2301,6 +2301,84 @@ (define-public jellyfish
|
||||||
;; files such as lib/jsoncpp.cpp are released under the Expat license.
|
;; files such as lib/jsoncpp.cpp are released under the Expat license.
|
||||||
(license (list license:gpl3+ license:expat))))
|
(license (list license:gpl3+ license:expat))))
|
||||||
|
|
||||||
|
(define-public khmer
|
||||||
|
(package
|
||||||
|
(name "khmer")
|
||||||
|
(version "2.0")
|
||||||
|
(source
|
||||||
|
(origin
|
||||||
|
(method url-fetch)
|
||||||
|
(uri (pypi-uri "khmer" version))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"0wb05shqh77v00256qlm68vbbx3kl76fyzihszbz5nhanl4ni33a"))
|
||||||
|
(patches (search-patches "khmer-use-libraries.patch"))))
|
||||||
|
(build-system python-build-system)
|
||||||
|
(arguments
|
||||||
|
`(#:phases
|
||||||
|
(modify-phases %standard-phases
|
||||||
|
(add-after 'unpack 'set-paths
|
||||||
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||||
|
;; Delete bundled libraries.
|
||||||
|
(delete-file-recursively "third-party/zlib")
|
||||||
|
(delete-file-recursively "third-party/bzip2")
|
||||||
|
;; Replace bundled seqan.
|
||||||
|
(let* ((seqan-all "third-party/seqan")
|
||||||
|
(seqan-include (string-append
|
||||||
|
seqan-all "/core/include")))
|
||||||
|
(delete-file-recursively seqan-all)
|
||||||
|
(copy-recursively (string-append (assoc-ref inputs "seqan")
|
||||||
|
"/include/seqan")
|
||||||
|
(string-append seqan-include "/seqan")))
|
||||||
|
;; We do not replace the bundled MurmurHash as the canonical
|
||||||
|
;; repository for this code 'SMHasher' is unsuitable for
|
||||||
|
;; providing a library. See
|
||||||
|
;; https://lists.gnu.org/archive/html/guix-devel/2016-06/msg00977.html
|
||||||
|
#t))
|
||||||
|
(add-after 'unpack 'set-cc
|
||||||
|
(lambda _
|
||||||
|
(setenv "CC" "gcc")
|
||||||
|
#t))
|
||||||
|
;; It is simpler to test after installation.
|
||||||
|
(delete 'check)
|
||||||
|
(add-after 'install 'post-install-check
|
||||||
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||||
|
(let ((out (assoc-ref outputs "out")))
|
||||||
|
(setenv "PATH"
|
||||||
|
(string-append
|
||||||
|
(getenv "PATH")
|
||||||
|
":"
|
||||||
|
(assoc-ref outputs "out")
|
||||||
|
"/bin"))
|
||||||
|
(setenv "PYTHONPATH"
|
||||||
|
(string-append
|
||||||
|
(getenv "PYTHONPATH")
|
||||||
|
":"
|
||||||
|
out
|
||||||
|
"/lib/python"
|
||||||
|
(string-take (string-take-right
|
||||||
|
(assoc-ref inputs "python") 5) 3)
|
||||||
|
"/site-packages"))
|
||||||
|
(with-directory-excursion "build"
|
||||||
|
(zero? (system* "nosetests" "khmer" "--attr"
|
||||||
|
"!known_failing")))))))))
|
||||||
|
(native-inputs
|
||||||
|
`(("seqan" ,seqan)
|
||||||
|
("python-nose" ,python-nose)))
|
||||||
|
(inputs
|
||||||
|
`(("zlib" ,zlib)
|
||||||
|
("bzip2" ,bzip2)
|
||||||
|
("python-screed" ,python-screed)
|
||||||
|
("python-bz2file" ,python-bz2file)))
|
||||||
|
(home-page "https://khmer.readthedocs.org/")
|
||||||
|
(synopsis "K-mer counting, filtering and graph traversal library")
|
||||||
|
(description "The khmer software is a set of command-line tools for
|
||||||
|
working with DNA shotgun sequencing data from genomes, transcriptomes,
|
||||||
|
metagenomes and single cells. Khmer can make de novo assemblies faster, and
|
||||||
|
sometimes better. Khmer can also identify and fix problems with shotgun
|
||||||
|
data.")
|
||||||
|
(license license:bsd-3)))
|
||||||
|
|
||||||
(define-public macs
|
(define-public macs
|
||||||
(package
|
(package
|
||||||
(name "macs")
|
(name "macs")
|
||||||
|
|
16
gnu/packages/patches/khmer-use-libraries.patch
Normal file
16
gnu/packages/patches/khmer-use-libraries.patch
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
Change setup.cfg so that the bundled zlib and bzip2 are not used. This cannot
|
||||||
|
currently be achieved using "--library z,bz2" as instructed in the setup.py.
|
||||||
|
|
||||||
|
diff --git a/setup.cfg b/setup.cfg
|
||||||
|
index c054092..080992e 100644
|
||||||
|
--- a/setup.cfg
|
||||||
|
+++ b/setup.cfg
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
[build_ext]
|
||||||
|
define = SEQAN_HAS_BZIP2,SEQAN_HAS_ZLIB
|
||||||
|
undef = NO_UNIQUE_RC
|
||||||
|
-# libraries = z,bz2
|
||||||
|
+libraries = z,bz2
|
||||||
|
## if using system libraries
|
||||||
|
include-dirs = lib:third-party/zlib:third-party/bzip2:third-party/seqan/core/include:third-party/smhasher
|
||||||
|
# include-dirs = lib
|
Loading…
Reference in a new issue