aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gn/packages/bioinformatics.scm339
-rw-r--r--gn/packages/genenetwork.scm3
2 files changed, 162 insertions, 180 deletions
diff --git a/gn/packages/bioinformatics.scm b/gn/packages/bioinformatics.scm
index 397b38f..0cb199a 100644
--- a/gn/packages/bioinformatics.scm
+++ b/gn/packages/bioinformatics.scm
@@ -47,6 +47,7 @@
#:use-module (gnu packages databases)
#:use-module (gnu packages datastructures)
#:use-module (gnu packages digest)
+ #:use-module (gnu packages documentation)
#:use-module (gnu packages elf)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages gcc)
@@ -2335,14 +2336,14 @@ in-memory footprint at the cost of packing and unpacking.")
(define-public vg
(package
(name "vg")
- (version "1.50.0")
+ (version "1.61.0")
(source
(origin
(method url-fetch)
(uri (string-append "https://github.com/vgteam/vg/releases/download/v"
version "/vg-v" version ".tar.gz"))
(sha256
- (base32 "1n06fh6qvffhbxy7m096r8cy16wi0nm6gfgi3rsjy9zrb7g1jzhs"))
+ (base32 "1yb8ffqq65ma5di42qlj483x42viq5j4xyyg3vpww60gm15n1yxx"))
(snippet
#~(begin
(use-modules (guix build utils))
@@ -2353,194 +2354,174 @@ in-memory footprint at the cost of packing and unpacking.")
(("-mcx16") ""))))))
(build-system gnu-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
- (delete 'configure) ; no configure script
- (add-after 'unpack 'patch-source
- (lambda* (#:key inputs #:allow-other-keys)
- ;; Most of these are so that we can skip bootstrapping some of the sources.
- (substitute* "Makefile"
- ;; PKG_CONFIG_DEPS needs to be substituted to actually link to everything.
- (("cairo libzstd")
- "cairo htslib libzstd libdw libelf protobuf raptor2 sdsl-lite tabixpp vcflib fastahack libdeflate")
-
- ;; Skip the part where we link static libraries special. It doesn't like the changes we make
- (("-Wl,-B.*") "\n")
-
- (("\\$\\(CWD\\)/\\$\\(LIB_DIR\\)/libtabixpp\\.a") "$(LIB_DIR)/libtabixpp.a")
- ((" \\$\\(LIB_DIR\\)/libtabixpp\\.a")
- (string-append " " (search-input-file inputs "/lib/libtabixpp.so")))
- (("\\$\\(LIB_DIR\\)/pkgconfig/tabixpp\\.pc")
- (string-append " " (search-input-file inputs "/lib/pkgconfig/tabixpp.pc")))
-
- (("\\$\\(CWD\\)/\\$\\(LIB_DIR\\)/libhts\\.a") "$(LIB_DIR)/libhts.a")
- ((" \\$\\(LIB_DIR\\)/libhts\\.a")
- (string-append " " (search-input-file inputs "/lib/libhts.so")))
- (("\\$\\(LIB_DIR\\)/pkgconfig/htslib\\.pc")
- (string-append " " (search-input-file inputs "/lib/pkgconfig/htslib.pc")))
-
- (("\\$\\(CWD\\)/\\$\\(LIB_DIR\\)/libdeflate\\.a") "$(LIB_DIR)/libdeflate.a")
- ((" \\$\\(LIB_DIR\\)/libdeflate\\.a")
- (string-append " " (search-input-file inputs "/lib/libdeflate.so")))
-
- ((" \\$\\(LIB_DIR\\)/libvcflib.a")
- (string-append " " (search-input-file inputs "/lib/libvcflib.so")))
- ((" \\$\\(BIN_DIR\\)/vcf2tsv")
- (string-append " " (search-input-file inputs "/bin/vcf2tsv")))
-
- ((" \\$\\(FASTAHACK_DIR\\)/fastahack")
- (string-append " " (search-input-file inputs "/bin/fastahack")))
- (("\\+= \\$\\(OBJ_DIR\\)/Fasta\\.o")
- (string-append "+= " (search-input-file inputs "/lib/libfastahack.so")))
-
- ((" \\$\\(LIB_DIR\\)/libsnappy.a")
- (string-append " " (search-input-file inputs "/lib/libsnappy.so")))
-
- ;; Only link against the libraries in the elfutils package.
- (("-ldwfl -ldw -ldwelf -lelf -lebl") "-ldw -lelf")
- ((" \\$\\(LIB_DIR\\)/libelf.a")
- (string-append " " (search-input-file inputs "/lib/libelf.so")))
- ((" \\$\\(LIB_DIR\\)/libdw.a")
- (string-append " " (search-input-file inputs "/lib/libdw.so")))
-
- ;; We need the Make.helper file in SDSL_DIR for gcsa2
- ;((" \\$\\(LIB_DIR\\)/libsdsl.a")
- ; (string-append " " (search-input-file inputs "/lib/libsdsl.so")))
-
- ((" \\$\\(LIB_DIR\\)/%divsufsort.a")
- (string-append " " (dirname
+ (list
+ #:make-flags
+ #~(list (string-append "CC=" #$(cc-for-target))
+ ;; Set rpath so the validate-runpath phase finds
+ ;; libhandlegraph.so.
+ (string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib"))
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure) ; no configure script
+ (add-after 'unpack 'patch-source
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; Most of these are so that we can skip bootstrapping some of the sources.
+ (substitute* "Makefile"
+ ;; PKG_CONFIG_DEPS needs to be substituted to actually link to everything.
+ (("cairo libzstd")
+ "cairo htslib libzstd libdw libelf protobuf raptor2 sdsl-lite tabixpp vcflib fastahack libdeflate")
+
+ ;; Skip the part where we link static libraries special. It doesn't like the changes we make
+ (("-Wl,-B.*") "\n")
+
+ (("\\$\\(CWD\\)/\\$\\(LIB_DIR\\)/libtabixpp\\.a") "$(LIB_DIR)/libtabixpp.a")
+ ((" \\$\\(LIB_DIR\\)/libtabixpp\\.a")
+ (string-append " " (search-input-file inputs "/lib/libtabixpp.so")))
+ (("\\$\\(LIB_DIR\\)/pkgconfig/tabixpp\\.pc")
+ (string-append " " (search-input-file inputs "/lib/pkgconfig/tabixpp.pc")))
+
+ (("\\$\\(CWD\\)/\\$\\(LIB_DIR\\)/libhts\\.a") "$(LIB_DIR)/libhts.a")
+ ((" \\$\\(LIB_DIR\\)/libhts\\.a")
+ (string-append " " (search-input-file inputs "/lib/libhts.so")))
+ (("\\$\\(LIB_DIR\\)/pkgconfig/htslib\\.pc")
+ (string-append " " (search-input-file inputs "/lib/pkgconfig/htslib.pc")))
+
+ (("\\$\\(CWD\\)/\\$\\(LIB_DIR\\)/libdeflate\\.a") "$(LIB_DIR)/libdeflate.a")
+ ((" \\$\\(LIB_DIR\\)/libdeflate\\.a")
+ (string-append " " (search-input-file inputs "/lib/libdeflate.so")))
+
+ ((" \\$\\(LIB_DIR\\)/libvcflib.a")
+ (string-append " " (search-input-file inputs "/lib/libvcflib.so")))
+ ((" \\$\\(BIN_DIR\\)/vcf2tsv")
+ (string-append " " (search-input-file inputs "/bin/vcf2tsv")))
+
+ ((" \\$\\(FASTAHACK_DIR\\)/fastahack")
+ (string-append " " (search-input-file inputs "/bin/fastahack")))
+ (("\\+= \\$\\(OBJ_DIR\\)/Fasta\\.o")
+ (string-append "+= " (search-input-file inputs "/lib/libfastahack.so")))
+
+ ((" \\$\\(LIB_DIR\\)/libsnappy.a")
+ (string-append " " (search-input-file inputs "/lib/libsnappy.so")))
+
+ ;; Only link against the libraries in the elfutils package.
+ (("-ldwfl -ldw -ldwelf -lelf -lebl") "-ldw -lelf")
+ ((" \\$\\(LIB_DIR\\)/libelf.a")
+ (string-append " " (search-input-file inputs "/lib/libelf.so")))
+ ((" \\$\\(LIB_DIR\\)/libdw.a")
+ (string-append " " (search-input-file inputs "/lib/libdw.so")))
+
+ ((" \\$\\(LIB_DIR\\)/%divsufsort.a")
+ (string-append " " (dirname
(search-input-file inputs "/lib/libdivsufsort.so"))
- "%divsufsort.so"))
- ((" \\$\\(LIB_DIR\\)/libdivsufsort.a")
- (string-append " " (search-input-file inputs "/lib/libdivsufsort.so")))
- ((" \\$\\(LIB_DIR\\)/%divsufsort64.a")
- (string-append " " (dirname
+ "%divsufsort.so"))
+ ((" \\$\\(LIB_DIR\\)/libdivsufsort.a")
+ (string-append " " (search-input-file inputs "/lib/libdivsufsort.so")))
+ ((" \\$\\(LIB_DIR\\)/%divsufsort64.a")
+ (string-append " " (dirname
(search-input-file inputs "/lib/libdivsufsort64.so"))
- "%divsufsort64.so"))
- ((" \\$\\(LIB_DIR\\)/libdivsufsort64.a")
- (string-append " " (search-input-file inputs "/lib/libdivsufsort64.so")))
-
- ((" \\$\\(LIB_DIR\\)/libjemalloc.a")
- (string-append " " (search-input-file inputs "/lib/libjemalloc.a")))
-
- ((" \\$\\(INC_DIR\\)/sparsehash")
- (string-append " " (search-input-directory inputs "/include/sparsehash")))
-
- ((" \\$\\(INC_DIR\\)/raptor2")
- (string-append " " (search-input-directory inputs "/include/raptor2")))
- ((" \\$\\(LIB_DIR\\)/libraptor2.a")
- (string-append " " (search-input-file inputs "/lib/libraptor2.so")))
- ((" \\$\\(BIN_DIR\\)/rapper")
- (string-append " " (search-input-file inputs "/bin/rapper"))))))
- (add-after 'unpack 'link-with-some-shared-libraries
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* '("deps/mmmultimap/CMakeLists.txt"
- "deps/xg/CMakeLists.txt"
- "deps/xg/deps/mmmulti/CMakeLists.txt")
- (("\".*libsdsl\\.a\"") "\"-lsdsl\"")
- (("\".*libdivsufsort\\.a\"") "\"-ldivsufsort\"")
- (("\".*libdivsufsort64\\.a\"") "\"-ldivsufsort64\"")
- (("\\$\\{sdsl-lite_INCLUDE\\}")
- (search-input-directory inputs "/include/sdsl"))
- (("\\$\\{sdsl-lite-divsufsort_INCLUDE\\}")
- (dirname
+ "%divsufsort64.so"))
+ ((" \\$\\(LIB_DIR\\)/libdivsufsort64.a")
+ (string-append " " (search-input-file inputs "/lib/libdivsufsort64.so")))
+
+ ((" \\$\\(LIB_DIR\\)/libjemalloc.a")
+ (string-append " " (search-input-file inputs "/lib/libjemalloc.a")))
+
+ ((" \\$\\(INC_DIR\\)/sparsehash")
+ (string-append " " (search-input-directory inputs "/include/sparsehash")))
+
+ ((" \\$\\(INC_DIR\\)/raptor2")
+ (string-append " " (search-input-directory inputs "/include/raptor2")))
+ ((" \\$\\(LIB_DIR\\)/libraptor2.a")
+ (string-append " " (search-input-file inputs "/lib/libraptor2.so")))
+ ((" \\$\\(BIN_DIR\\)/rapper")
+ (string-append " " (search-input-file inputs "/bin/rapper"))))
+ ;; Create obj and lib directories. They do not exist in
+ ;; the release tarball.
+ (mkdir "deps/libbdsg/bdsg/obj")
+ (mkdir "deps/libbdsg/lib")
+ ;; Do not remove obj and lib directories in the clean
+ ;; target.
+ (substitute* "deps/libbdsg/Makefile"
+ (("\\[ ! -e \\$\\(OBJ_DIR\\) \\][^\n]*") "")
+ (("\\[ ! -e \\$\\(LIB_DIR\\) \\][^\n]*") ""))))
+ (add-after 'unpack 'link-with-some-shared-libraries
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* '("deps/mmmultimap/CMakeLists.txt"
+ "deps/xg/CMakeLists.txt"
+ "deps/xg/deps/mmmulti/CMakeLists.txt")
+ (("\".*libsdsl\\.a\"") "\"-lsdsl\"")
+ (("\".*libdivsufsort\\.a\"") "\"-ldivsufsort\"")
+ (("\".*libdivsufsort64\\.a\"") "\"-ldivsufsort64\"")
+ (("\\$\\{sdsl-lite_INCLUDE\\}")
+ (search-input-directory inputs "/include/sdsl"))
+ (("\\$\\{sdsl-lite-divsufsort_INCLUDE\\}")
+ (dirname
(search-input-file inputs "/include/divsufsort.h"))))))
- #;
- (add-before 'patch-source 'use-shared-libvg
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (substitute* "Makefile"
- (("libvg\\.a") "libvg.so")
- ;; Have the linker find the shared library.
- (("\\$\\(LIB_DIR\\)/libvg.\\$\\(SHARED_SUFFIX\\) \\$\\(LDFLAGS\\)")
- "-lvg $(LDFLAGS)")
- (("\\$\\(LDFLAGS\\) \\$\\(LIB_DIR\\)/libvg.so")
- "$(LDFLAGS) -lvg"))
- (setenv "LDFLAGS" (string-append "-Wl,-rpath="
- (assoc-ref outputs "out") "/lib"))
-
- ;; We need to tell a number of dependencies to build with -fPIC.
- (substitute* "Makefile"
- (("^CXXFLAGS := -O3")
- (string-append "CFLAGS := -fPIC\n"
- "CXXFLAGS := -O3 -fPIC"))
- (("^export CXXFLAGS")
- (string-append "export CFLAGS\n"
- "$(info CFLAGS are $(CFLAGS))\n"
- "export CXXFLAGS"))
- ((" \\$\\(LIB_DIR\\)/libjemalloc.a")
- (string-append " " (assoc-ref inputs "jemalloc")
- "/lib/libjemalloc_pic.a")))
- ;; We don't want to pull in all the global CXXFLAGS here.
- (substitute* "deps/sublinear-Li-Stephens/makefile"
- (("^CXXFLAGS:=") "CXXFLAGS:= -fPIC "))
- ;; CMAKE_CXX_FLAGS aren't set globally.
- (substitute* "deps/kff-cpp-api/CMakeLists.txt"
- (("CMAKE_CXX_FLAGS \"") "CMAKE_CXX_FLAGS \" -fPIC "))))
- (add-after 'unpack 'dont-build-shared-vgio
- (lambda _
- ;; vg will link with libvgio and fail the 'validate-runpath phase.
- (substitute* "deps/libvgio/CMakeLists.txt"
- (("TARGETS vgio vgio_static") "TARGETS vgio_static"))))
- (add-after 'unpack 'fix-fastahack-dependency
- (lambda _
- (substitute* (append (list "src/aligner.hpp"
- "src/vg.hpp")
- (find-files "deps/vcflib/src" "\\.cpp$"))
- (("Fasta.h") "fastahack/Fasta.h"))
- (substitute* '("deps/vcflib/src/Variant.h"
- "src/constructor.hpp"
- "src/index_registry.cpp")
- (("<Fasta.h>") "\"fastahack/Fasta.h\""))))
- (add-after 'unpack 'adjust-tests
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((bash-tap (assoc-ref inputs "bash-tap")))
- (substitute* (find-files "test/t")
- (("BASH_TAP_ROOT.*")
- (string-append "BASH_TAP_ROOT=" bash-tap "/bin\n"))
- ((".*bash-tap-bootstrap")
- (string-append ". " bash-tap "/bin/bash-tap-bootstrap")))
- (substitute* "test/t/02_vg_construct.t"
- (("../deps/fastahack/fastahack") (which "fastahack"))
- (("../bin/vcf2tsv") (which "vcf2tsv")))
- ;; Lets skip the 9 failing tests for now. They fail with our
- ;; bash-tap and the bundled one.
- (substitute* "test/t/02_vg_construct.t"
- ((".*self-inconsistent.*") "is $(true) \"\" \"\"\n"))
- (substitute* "test/t/07_vg_map.t"
- ;; Change in fasta's output
- (("identity\\) 1 \"") "identity) 1.0 \""))
- (substitute* '("test/t/07_vg_map.t"
- "test/t/33_vg_mpmap.t")
- ((".*node id.*") "is $(true) \"\" \"\"\n"))
- (substitute* "test/t/48_vg_convert.t"
- (("true \"vg.*") "true \"true\"\n"))
- (substitute* "test/t/50_vg_giraffe.t"
- ((".*A long read can.*") "is $(true) \"\" \"\"\n")
- ((".*A long read has.*") "is $(true) \"\" \"\"\n")
- ((".*Long read minimizer.*") "is $(true) \"\" \"\"\n"))
- ;; Don't test the docs, we're not providing npm
- (substitute* "Makefile"
- ((".*test-docs.*") "")))))
- (add-after 'build 'build-manpages
- (lambda* (#:key inputs #:allow-other-keys)
- (when (assoc-ref inputs "asciidoctor")
- (invoke "make" "man"))))
- (replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- (install-file "bin/vg" (string-append out "/bin"))
- ;(install-file "lib/libvg.so" (string-append out "/lib"))
- (for-each
+ (add-after 'unpack 'dont-build-shared-vgio
+ (lambda _
+ ;; vg will link with libvgio and fail the 'validate-runpath phase.
+ (substitute* "deps/libvgio/CMakeLists.txt"
+ (("TARGETS vgio vgio_static") "TARGETS vgio_static"))))
+ (add-after 'unpack 'fix-fastahack-dependency
+ (lambda _
+ (substitute* (append (list "src/aligner.hpp"
+ "src/vg.hpp")
+ (find-files "deps/vcflib/src" "\\.cpp$"))
+ (("Fasta.h") "fastahack/Fasta.h"))
+ (substitute* '("deps/vcflib/src/Variant.h"
+ "src/constructor.hpp"
+ "src/index_registry.cpp")
+ (("<Fasta.h>") "\"fastahack/Fasta.h\""))))
+ (add-after 'unpack 'adjust-tests
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((bash-tap (assoc-ref inputs "bash-tap")))
+ (substitute* (find-files "test/t")
+ (("BASH_TAP_ROOT.*")
+ (string-append "BASH_TAP_ROOT=" bash-tap "/bin\n"))
+ ((".*bash-tap-bootstrap")
+ (string-append ". " bash-tap "/bin/bash-tap-bootstrap")))
+ (substitute* "test/t/02_vg_construct.t"
+ (("../deps/fastahack/fastahack") (which "fastahack"))
+ (("../bin/vcf2tsv") (which "vcf2tsv")))
+ ;; Lets skip the 9 failing tests for now. They fail with our
+ ;; bash-tap and the bundled one.
+ (substitute* "test/t/02_vg_construct.t"
+ ((".*self-inconsistent.*") "is $(true) \"\" \"\"\n"))
+ (substitute* "test/t/07_vg_map.t"
+ ;; Change in fasta's output
+ (("identity\\) 1 \"") "identity) 1.0 \""))
+ (substitute* '("test/t/07_vg_map.t"
+ "test/t/33_vg_mpmap.t")
+ ((".*node id.*") "is $(true) \"\" \"\"\n"))
+ (substitute* "test/t/48_vg_convert.t"
+ (("true \"vg.*") "true \"true\"\n"))
+ (substitute* "test/t/50_vg_giraffe.t"
+ ((".*A long read can.*") "is $(true) \"\" \"\"\n")
+ ((".*A long read has.*") "is $(true) \"\" \"\"\n")
+ ((".*Long read minimizer.*") "is $(true) \"\" \"\"\n"))
+ ;; Don't test the docs, we're not providing npm
+ (substitute* "Makefile"
+ ((".*test-docs.*") "")))))
+ (add-after 'build 'build-manpages
+ (lambda* (#:key inputs #:allow-other-keys)
+ (invoke "make" "man")))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (install-file "bin/vg" (string-append out "/bin"))
+ (install-file "lib/libhandlegraph.so" (string-append out "/lib"))
+ (for-each
(lambda (file)
(install-file file (string-append out "/share/man/man1")))
(find-files "doc/man" "\\.1$"))))))
- #:test-target "test"))
+ #:test-target "test"))
(native-inputs
(append
(if (supported-package? ruby-asciidoctor)
(list ruby-asciidoctor)
'())
- (list bash-tap
+ (list asciidoc
+ bash-tap
bc
cmake-minimal
jq
diff --git a/gn/packages/genenetwork.scm b/gn/packages/genenetwork.scm
index b9024b6..162aaa9 100644
--- a/gn/packages/genenetwork.scm
+++ b/gn/packages/genenetwork.scm
@@ -463,7 +463,8 @@
python-pytest
python-hypothesis))
(propagated-inputs
- (list gunicorn
+ (list gn-libs
+ gunicorn
nss-certs
python-redis
python-flask