diff options
-rw-r--r-- | gn/packages/bioinformatics.scm | 594 | ||||
-rw-r--r-- | gn/packages/genenetwork.scm | 41 | ||||
-rw-r--r-- | gn/packages/guile.scm | 100 | ||||
-rw-r--r-- | gn/services/databases.scm | 6 |
4 files changed, 390 insertions, 351 deletions
diff --git a/gn/packages/bioinformatics.scm b/gn/packages/bioinformatics.scm index 397b38f..a0d9c5d 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) @@ -1898,14 +1899,13 @@ The path-guided stochastic gradient descent based 1D sort implemented in (define-public graphaligner (package (name "graphaligner") - (version "1.0.19") + (version "1.0.20") (source (origin (method url-fetch) - (uri (string-append "https://github.com/maickrau/GraphAligner/files/" - "14037134/GraphAligner.tar.gz")) + (uri "https://github.com/user-attachments/files/17976913/GraphAligner.tar.gz") (file-name (string-append name "-" version ".tar.gz")) (sha256 - (base32 "1z1rxvl2pmiqbh670phkx7vma36w90ylp27wyadlbzf32pa2cpdn")))) + (base32 "1gs6jds4lazljb1s7s8f1vp0l4j8jvqy6qhb9sck7x66z8157ndm")))) (build-system gnu-build-system) (arguments (list @@ -1917,16 +1917,17 @@ The path-guided stochastic gradient descent based 1D sort implemented in (delete 'configure) ; no configure phase (add-after 'unpack 'patch-source (lambda* (#:key inputs #:allow-other-keys) - (let ((concurrentqueue (assoc-ref inputs "concurrentqueue"))) - (delete-file-recursively "concurrentqueue") - (substitute* "makefile" - (("-Iconcurrentqueue") - (string-append "-I" concurrentqueue "/include/concurrentqueue")) - (("^JEMALLOCFLAGS.*") - "JEMALLOCFLAGS= `pkg-config --libs jemalloc`\n") - ;; No need to build statically. - (("-Wl,-Bstatic") "") - (("-static-libstdc\\+\\+") ""))))) + (delete-file-recursively "concurrentqueue") + (substitute* "makefile" + (("-Iconcurrentqueue") + (string-append "-I" (search-input-directory inputs "/include/concurrentqueue"))) + (("^JEMALLOCFLAGS.*") + "JEMALLOCFLAGS= `pkg-config --libs jemalloc`\n") + (("`pkg-config --cflags zlib`/bamtools") + (string-append "-I " (search-input-directory inputs "include/bamtools"))) + ;; No need to build statically. + (("-Wl,-Bstatic") "") + (("-static-libstdc\\+\\+") "")))) (replace 'install (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) @@ -1943,7 +1944,8 @@ The path-guided stochastic gradient descent based 1D sort implemented in pkg-config sparsehash)) (inputs - (list boost + (list bamtools + boost concurrentqueue jemalloc libdivsufsort @@ -2161,6 +2163,7 @@ suitable for long reads, but works also well with short reads.") (build-system cmake-build-system) (arguments (list + #:tests? #f ;; FIXME: tests are broken #:phases #~(modify-phases %standard-phases (add-after 'unpack 'use-gnuinstalldirs-macros @@ -2335,14 +2338,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 +2356,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 @@ -2599,120 +2582,111 @@ multiple sequence alignment.") license:boost1.0)))) ; catch.hpp (define-public pggb - (let ((commit "9ebff27320382e470ed38a85b4448402e1e7c353") - (revision "1")) - (package - (name "pggb") - (version (git-version "0.5.1" revision commit)) - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/pangenome/pggb") - (commit commit))) - (file-name (git-file-name name version)) - (sha256 - (base32 "0rgpj52q3ai7f1saqbilgx5gz4f403x3427wq649qwv84ivmi1sf")))) - (build-system copy-build-system) - (arguments - (list - #:install-plan - #~'(("pggb" "bin/") - ("partition-before-pggb" "bin/") - ("scripts/" "bin/") - ("scripts" "bin/scripts")) - #:phases - #~(modify-phases %standard-phases - (add-after 'unpack 'force-python3 - (lambda _ - (substitute* (find-files "scripts" "\\.py$") - (("/usr/bin/python") "/usr/bin/python3")))) - (add-before 'install 'patch-and-wrap-scripts - (lambda* (#:key inputs #:allow-other-keys) - (substitute* "scripts/vcf_preprocess.sh" - (("bcftools ") - (string-append (search-input-file inputs "/bin/bcftools") " "))) - (wrap-script "scripts/net2communities.py" - `("GUIX_PYTHONPATH" ":" prefix - (,(getenv "GUIX_PYTHONPATH")))))) - (add-after 'install 'wrap-scripts - (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (for-each - (lambda (file) - (wrap-script file - `("R_LIBS_SITE" ":" prefix - (,(getenv "R_LIBS_SITE"))) - `("PATH" ":" prefix - ,(map (lambda (input) (string-append input "/bin")) - '#$(map (lambda (label) - (or (this-package-input (string-append label "-hwcaps")) - (this-package-input label))) - (list "bc" - "bcftools" - "bedtools" - "gfaffix" - "htslib" - "fastix" - "multiqc" - "mummer" - "odgi" - "pafplot" - "parallel" - "pigz" - "python" - "r-data-table" - "r-minimal" - "rtg-tools" - "samtools" - "seqwish" - "smoothxg" - "time" - "vcfbub" - "vcflib" - "vg" - "wfmash")))))) - (list (string-append out "/bin/pggb") - (string-append out "/bin/partition-before-pggb") - (string-append out "/bin/gfa2evaluation.sh") - (string-append out "/bin/scripts/gfa2evaluation.sh")))))) - (add-after 'install 'substitute-file-paths - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (substitute* (string-append out "/bin/gfa2evaluation.sh") - (("/usr/local/bin/vcf_preprocess.sh") - (string-append out "/bin/vcf_preprocess.sh")) - (("/usr/local/bin/nucmer2vcf.R") - (string-append out "/bin/nucmer2vcf.R"))))))))) - (inputs - (list bc - bcftools - bedtools - gfaffix - guile-3.0 ; for wrap-script - htslib ; tabix - fastix - multiqc - mummer - odgi - pafplot - parallel - pigz - python - python-igraph - r-data-table - r-minimal - rtg-tools - samtools - seqwish - smoothxg - time - vcfbub - vcflib - vg - wfmash)) - (home-page "https://doi.org/10.1101/2023.04.05.535718") - (synopsis "PanGenome Graph Builder") - (description "@command{pggb} builds + (package + (name "pggb") + (version "0.7.2") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/pangenome/pggb") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1k3ffl5h5jqnz9k9y5cjqr8z6hh0gyjfj4szggz11lncp5wkskgv")))) + (build-system copy-build-system) + (arguments + (list + #:install-plan + #~'(("pggb" "bin/") + ("partition-before-pggb" "bin/") + ("scripts/" "bin/") + ("scripts" "bin/scripts")) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'force-python3 + (lambda _ + (substitute* (find-files "scripts" "\\.py$") + (("/usr/bin/python") "/usr/bin/python3")))) + (add-before 'install 'patch-and-wrap-scripts + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "scripts/vcf_preprocess.sh" + (("bcftools ") + (string-append (search-input-file inputs "/bin/bcftools") " "))) + (wrap-script "scripts/net2communities.py" + `("GUIX_PYTHONPATH" ":" prefix + (,(getenv "GUIX_PYTHONPATH")))))) + (add-after 'install 'wrap-scripts + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (for-each + (lambda (file) + (wrap-script file + `("R_LIBS_SITE" ":" prefix + (,(getenv "R_LIBS_SITE"))) + `("PATH" ":" prefix + ,(map (lambda (input) (string-append input "/bin")) + '#$(map (lambda (label) + (or (this-package-input (string-append label "-hwcaps")) + (this-package-input label))) + (list "bc" + "bcftools" + "bedtools" + "gfaffix" + "htslib" + "multiqc" + "odgi" + "parallel" + "pigz" + "python" + "r-data-table" + "r-minimal" + "rtg-tools" + "samtools" + "seqwish" + "smoothxg" + "time" + "vcfbub" + "vg" + "wfmash")))))) + (list (string-append out "/bin/pggb") + (string-append out "/bin/partition-before-pggb") + (string-append out "/bin/gfa2evaluation.sh") + (string-append out "/bin/scripts/gfa2evaluation.sh")))))) + (add-after 'install 'substitute-file-paths + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (substitute* (string-append out "/bin/gfa2evaluation.sh") + (("/usr/local/bin/vcf_preprocess.sh") + (string-append out "/bin/vcf_preprocess.sh")) + (("/usr/local/bin/nucmer2vcf.R") + (string-append out "/bin/nucmer2vcf.R"))))))))) + (inputs + (list bc + bcftools + bedtools + gfaffix + guile-3.0 ; for wrap-script + htslib ; tabix + multiqc + odgi + parallel + pigz + python + python-igraph + r-data-table + r-minimal + rtg-tools + samtools + seqwish + smoothxg + time + vcfbub + vg + wfmash)) + (home-page "https://doi.org/10.1101/2023.04.05.535718") + (synopsis "PanGenome Graph Builder") + (description "@command{pggb} builds @url{https://doi.org/10.1146%2Fannurev-genom-120219-080406, pangenome} @url{https://doi.org/10.1038/nbt.4227, variation graphs} from a set of input sequences. @@ -2737,7 +2711,7 @@ such as the @url{https://github.com/vgteam/vg, vg} and @command{pggb} has been tested at scale in the @acronym{Human Pangenome Reference Consortium, HPRC} as a method to build a graph from the @url{https://doi.org/10.1101/2022.07.09.499321, draft human pangenome}.") - (license license:expat)))) + (license license:expat))) (define use-glibc-hwcaps (package-input-rewriting/spec @@ -4463,7 +4437,7 @@ automatically vectorize for different architectures without adapting the code.") (define-public r-rrbgen (package - (name "r-stitch") + (name "r-rrbgen") (version "0.0.6") (source (origin diff --git a/gn/packages/genenetwork.scm b/gn/packages/genenetwork.scm index 6e0c540..637ed10 100644 --- a/gn/packages/genenetwork.scm +++ b/gn/packages/genenetwork.scm @@ -115,7 +115,7 @@ ((#:tests? _ #f) #f))))) (define-public genenetwork3 - (let ((commit "5ea318ef0dc5e0e54801d5d27aa9d55c168cabb0") + (let ((commit "0d902ec267d96b87648669a7a43b699c8a22a3de") (revision "5")) (package (name "genenetwork3") @@ -129,7 +129,7 @@ (file-name (git-file-name name version)) (sha256 (base32 - "14b8jzmwbjjrkhh6ajvp6xc7c8fsl918swjj7j6imy2pv7d9dcb3")))) + "159f6h2jcc6ydb8xwnjaqksbp52ycjwnf10bcy6fd2zvh1g8bjad")))) (inputs (list python-click)) (native-inputs @@ -138,7 +138,9 @@ python-mypy-extensions python-pylint)) (propagated-inputs - (list csvdiff + (list gn-libs + csvdiff + coreutils-minimal diffutils nss-certs gemma-wrapper @@ -190,7 +192,7 @@ (license license:agpl3+)))) (define-public genenetwork2 - (let ((commit "32140f60183c008830294a9fd2f4a0477b29f3b7") + (let ((commit "4f9a46e05570668485265448289b505266c162be") (revision "4")) (package (name "genenetwork2") @@ -203,11 +205,12 @@ (file-name (string-append name "-" version)) (sha256 (base32 - "15vfwjq0y8g0kyk2qfsdisxw1k747mnbmskfisyvdgzjw5hlg184")))) + "0msyx0s75xcmh8bh0mjg3vl9w58fc00k39cwyjsxbnxdwj39ammk")))) (native-inputs (list graphviz)) (propagated-inputs - (list genenetwork3 + (list gn-libs + genenetwork3 coreutils nss-certs gemma @@ -433,8 +436,8 @@ )))))) (define-public gn-uploader - (let ((commit "60fde66e02dba842b20fa126ff3b2ed9ec2638e6") - (version "0.0.1")) + (let ((commit "d8b58c3bf6fb98fa1e8842a5e59c290e11e8b3c3") + (version "0.1.0")) (package (name "gn-uploader") (version (string-append version "-" (string-take commit 8))) @@ -447,7 +450,7 @@ (hash (content-hash (base32 - "1q04viyf7d0q30k3424hrzsh9wxhhgs7hywlhzl3m68jki4zq1i7"))))) + "067ihcnz72fxvb94pc9fvx9skl15nm1jscyprwz2mw5rwfaxidmb"))))) (build-system python-build-system) (arguments (list @@ -463,7 +466,8 @@ python-pytest python-hypothesis)) (propagated-inputs - (list gunicorn + (list gn-libs + gunicorn nss-certs python-redis python-flask @@ -475,6 +479,7 @@ python-flask-session javascript-jquery javascript-bootstrap + javascript-datatables node-resumablejs)) (synopsis "GeneNetwork Quality Control Application") (description @@ -485,7 +490,7 @@ (license license:agpl3+)))) (define-public gn-auth - (let ((commit "4c21d0e43cf0de1084d0e0a243e441c6e72236eb") + (let ((commit "8e64f7f8a392b8743a4f36c497cd2ec339fcfebc") (revision "01")) (package (name "gn-auth") @@ -499,7 +504,7 @@ (hash (content-hash (base32 - "0z9qpgn0j9idzi975ykh04bq2r4pz5d0pppk2zvxiyhxxgxjydrx"))))) + "0wwy3w5npdygrkkk9svnq78syfidhgqczygnrgwy28r6q8igp6pp"))))) (build-system python-build-system) (arguments (list @@ -517,7 +522,8 @@ python-pytest python-pytest-mock)) (propagated-inputs - (list gunicorn + (list gn-libs + gunicorn nss-certs python-blinker python-argon2-cffi @@ -536,7 +542,7 @@ (define-public gn-libs - (let ((commit "eb99148991a5869cf10c241aeff6c47708986a3a") + (let ((commit "72a95f8ffa5401649f70978e863dd3f21900a611") (revision "01")) (package (name "gn-libs") @@ -550,7 +556,7 @@ (hash (content-hash (base32 - "1lbvpn0ddsbj8xvnkzs352n7dg8drpvgx4j9xsxb24ny1f2ij323"))))) + "1jvlz85pn10cx2icjxk0klz1g8k8vn1f8vp6kb4xyjskb1228yrx"))))) (build-system pyproject-build-system) (arguments (list @@ -565,7 +571,10 @@ python-pylint python-pytest)) (propagated-inputs - (list python-mysqlclient)) + (list python-authlib + python-pymonad + python-requests + python-mysqlclient)) (home-page "https://github.com/genenetwork/gn-libs") (synopsis "Tools/utilities for GeneNetwork projects.") (description "A collection of tools and utilities used across multiple diff --git a/gn/packages/guile.scm b/gn/packages/guile.scm index beed3d5..8d5f2b9 100644 --- a/gn/packages/guile.scm +++ b/gn/packages/guile.scm @@ -6,10 +6,12 @@ #:use-module (guix build-system guile) #:use-module (guix build-system gnu) #:use-module ((gnu packages autotools) #:select (libltdl autoconf automake libtool)) + #:use-module ((gnu packages bash) #:select (bash-minimal)) #:use-module ((gnu packages databases) #:select (mariadb)) #:use-module ((gnu packages compression) #:select (zlib)) #:use-module ((gnu packages perl) #:select (perl)) #:use-module ((gnu packages texinfo) #:select (texinfo)) + #:use-module ((gnu packages version-control) #:select (git-minimal)) #:use-module (guix utils) #:use-module (gnu packages build-tools) #:use-module (gnu packages package-management) @@ -117,7 +119,7 @@ for MySQL.") (license license:gpl2+))) (define-public gn-guile - (let ((commit "7af301caa7d8a5f01e7e3be007e4ba53dc482eee") + (let ((commit "99cf7800246f6af0df8407f7595641933891ad85") (revision "0")) (package (name "gn-guile") @@ -130,35 +132,89 @@ for MySQL.") (file-name (string-append name "-" version)) (sha256 (base32 - "0j6nf9k5rdanx5r74dw1rcw7rvyjhzvsv1l5s86jkgkhvrpbb82c")))) + "0sxg3cd69g2sik1x4di20b4da2qn64d82ikmfkas5w2x1nq3r6pj")))) (build-system guile-build-system) + (native-inputs (list guile-3.0)) (propagated-inputs (list guile-3.0 guile3-dbi guile3-dbd-mysql guile-fibers guile-gnutls guile-readline guile-commonmark guile-redis openssl nss-certs gemma parallel guile-hashing - guile-json-4)) + guile-json-4 bash-minimal git-minimal)) (arguments (list + #:not-compiled-file-regexp "(guix|guix/.*)[.]scm$" + #:modules '((srfi srfi-1) + (ice-9 popen) + (guix build guile-build-system) + (guix build utils)) #:phases #~(modify-phases %standard-phases - ;; When using the guile-build-system, guild doesn't - ;; correctly set the GUILE_LOAD_PATH for the various guile - ;; packages in the build phase leading to build failures. - (add-before 'build 'augment-GUILE_LOAD_PATH - (lambda* (#:key outputs #:allow-other-keys) - (let* ((guile-version (target-guile-effective-version))) - ;; guild uses this: "\\.(scm|sls)$" regexp to try and - ;; compile all scm files in this repository. We don't - ;; need to compile guix.scm and manifest.scm. - (delete-file "guix.scm") - (setenv "GUILE_LOAD_PATH" - (string-append - (format - #f "~{~a:~}" - (map (lambda (package) - (format #f "~a/share/guile/site/~a" - package guile-version)) - (list #$guile3-dbi #$guile-fibers #$guile-commonmark #$guile-json-4 #$guile-hashing))) - #$(getenv "GUILE_LOAD_PATH"))))))))) + (add-after 'unpack 'patch-git + (lambda* (#:key inputs #:allow-other-keys) + (let ((git (assoc-ref inputs "git-minimal"))) + (substitute* "web/view/markdown.scm" + (("\"git\"") (string-append "\"" git "/bin/git" "\"")) + (("git -C") (string-append git "/bin/git -C")))))) + (add-after 'build 'install-script + (lambda* _ + (let* ((bash #$(this-package-input "bash-minimal")) + (bash (string-append bash "/bin/bash")) + (guile #$(this-package-input "guile")) + (guile (string-append guile "/bin/guile")) + (build-guile #$(this-package-native-input "guile")) + (build-guile (string-append build-guile "/bin/guile")) + (guile3-dbi #$(this-package-input "guile3-dbi")) + (guile3-dbd-mysql #$(this-package-input "guile3-dbd-mysql")) + (guile-fibers #$(this-package-input "guile-fibers")) + (guile-gnutls #$(this-package-input "guile-gnutls")) + (guile-readline #$(this-package-input "guile-readline")) + (guile-commonmark #$(this-package-input "guile-commonmark")) + (guile-redis #$(this-package-input "guile-redis")) + (guile-hashing #$(this-package-input "guile-hashing")) + (guile-json-4 #$(this-package-input "guile-json")) + (out #$output) + (bin (string-append out "/bin")) + (effective (read + (open-pipe* OPEN_READ + build-guile "-c" + "(write (effective-version))"))) + (path (list (string-append guile "/bin"))) + (webserver (string-append + out + "/share/guile/site/" + effective + "/web/webserver.scm")) + (scm-dir (string-append "/share/guile/site/" effective)) + (guile-inputs (list guile3-dbi + guile3-dbd-mysql + guile-fibers + guile-gnutls + guile-readline + guile-commonmark + guile-redis + guile-hashing + guile-json-4)) + (scm-path + (map (lambda (x) (string-append x scm-dir)) + (cons* out guile-inputs))) + (go-dir (string-append "/lib/guile/" effective + "/site-ccache/")) + (go-path + (map (lambda (x) (string-append x go-dir)) + (cons* out guile-inputs)))) + (mkdir-p "bin") + (copy-file "gn-guile.sh" "bin/gn-guile") + (substitute* "bin/gn-guile" + (("@SHELL@") bash) + (("guile") guile) + (("web/webserver.scm") webserver)) + (chmod "bin/gn-guile" #o755) + (install-file "bin/gn-guile" bin) + (wrap-script + (string-append out "/bin/gn-guile") + `("PATH" ":" prefix ,path) + `("GUILE_AUTO_COMPILE" ":" = ("0")) + `("GUILE_LOAD_PATH" ":" prefix ,scm-path) + `("GUILE_LOAD_COMPILED_PATH" ":" prefix ,go-path)))))))) (home-page "https://git.genenetwork.com/gn-guile") (synopsis "Next generation GN code in guile") (description "Use of guile.") diff --git a/gn/services/databases.scm b/gn/services/databases.scm index 91ac166..4cbbb5e 100644 --- a/gn/services/databases.scm +++ b/gn/services/databases.scm @@ -34,7 +34,7 @@ (server-port virtuoso-configuration-server-port (default 1111)) (dirs-allowed virtuoso-dirs-allowed - (default "/var/genenetwork/virtuoso-data")) + (default (list "/var/genenetwork/virtuoso-data"))) (number-of-buffers virtuoso-configuration-number-of-buffers (default #f)) (maximum-dirty-buffers virtuoso-configuration-maximum-dirty-buffers @@ -100,9 +100,9 @@ (format port "ServerPort = ~a:~a~%" #$(virtuoso-configuration-server-ip config) #$(virtuoso-configuration-server-port config))) - (when #$(virtuoso-dirs-allowed config) + (when #$(>= (length (virtuoso-dirs-allowed config)) 1) (format port "DirsAllowed = ~a~%" - #$(virtuoso-dirs-allowed config))) + #$(string-join (virtuoso-dirs-allowed config) ","))) (when #$(virtuoso-configuration-number-of-buffers config) (format port "NumberOfBuffers = ~a~%" #$(virtuoso-configuration-number-of-buffers config))) |