diff options
Diffstat (limited to 'gn/packages/bioinformatics.scm')
| -rw-r--r-- | gn/packages/bioinformatics.scm | 902 |
1 files changed, 478 insertions, 424 deletions
diff --git a/gn/packages/bioinformatics.scm b/gn/packages/bioinformatics.scm index ed6d4d4..e6ca5db 100644 --- a/gn/packages/bioinformatics.scm +++ b/gn/packages/bioinformatics.scm @@ -41,12 +41,12 @@ #:use-module (gnu packages compression) #:use-module (gnu packages cpp) #:use-module (gnu packages cran) - #:use-module (gnu packages crates-io) - #:use-module (gnu packages crates-graphics) + #:use-module (past-crates packages crates-io) #:use-module (gnu packages curl) #: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) @@ -54,6 +54,7 @@ #:use-module (gnu packages graph) #:use-module (gnu packages gtk) #:use-module (gnu packages guile) + #:use-module (gnu packages haskell-xyz) #:use-module (gnu packages image) #:use-module (gnu packages imagemagick) #:use-module (gnu packages java) @@ -73,11 +74,13 @@ #:use-module (gnu packages python-build) #:use-module (gnu packages python-science) #:use-module (gnu packages python-web) - #:use-module ((gnu packages python-xyz) #:hide (python2-six)) + #:use-module (gnu packages python-xyz) + #:use-module (gnu packages python-check) #:use-module (gnu packages rdf) #:use-module (gnu packages readline) #:use-module (gnu packages rsync) #:use-module (gnu packages ruby) + #:use-module (gnu packages ruby-xyz) #:use-module (gnu packages rust) #:use-module (gnu packages serialization) #:use-module (gnu packages shells) @@ -1601,7 +1604,7 @@ runApp(launch.browser=0, port=4208)~%\n" (define-public seqwish (package (name "seqwish") - (version "0.7.9") + (version "0.7.11") (source (origin (method git-fetch) (uri (git-reference @@ -1610,7 +1613,7 @@ runApp(launch.browser=0, port=4208)~%\n" (recursive? #t))) (file-name (git-file-name name version)) (sha256 - (base32 "0xnv40kjlb610bk67n4xdqz5dfsjhrqld5bxzblji57k6bb4n66x")) + (base32 "18wsrvqf0nsfk29v3ggdq2r4q15d4n4sq8v228qq1jsybbjlkgsa")) (patches (search-patches "seqwish-paryfor-riscv.diff" "seqwish-shared-library.diff")) (snippet @@ -1810,14 +1813,14 @@ dictionaries to record a queryable version of the graph.") (define-public smoothxg (package (name "smoothxg") - (version "0.7.2") + (version "0.8.0") (source (origin (method url-fetch) (uri (string-append "https://github.com/pangenome/smoothxg" "/releases/download/v" version "/smoothxg-v" version ".tar.gz")) (sha256 - (base32 "1px8b5aaa23z85i7ximdamk2jj7wk5hb7bpbrgxsvkxc69zlwy38")) + (base32 "1gl4dskj81hlma7wsjrwwg77hgzk7dc9iaqqnf2wzrf2f4ll1cdj")) (snippet #~(begin (use-modules (guix build utils)) @@ -1855,7 +1858,8 @@ dictionaries to record a queryable version of the graph.") (with-directory-excursion (string-append "../smoothxg-v" #$version "/deps/abPOA") (substitute* "Makefile" - (("-march=native") "")) + (("-march=native") "") + (("-march=armv8-a\\+simd") "")) (apply invoke "make" "libabpoa" make-flags))))))) (inputs (list jemalloc @@ -1897,14 +1901,13 @@ The path-guided stochastic gradient descent based 1D sort implemented in (define-public graphaligner (package (name "graphaligner") - (version "1.0.14") + (version "1.0.20") (source (origin (method url-fetch) - (uri (string-append "https://github.com/maickrau/GraphAligner/files/" - "7813545/GraphAligner.tar.gz")) + (uri "https://github.com/user-attachments/files/17976913/GraphAligner.tar.gz") (file-name (string-append name "-" version ".tar.gz")) (sha256 - (base32 "1y4vwp03fl2ck6bnyn0sc97vgvdb8i0yfzjk5mv5gk0bc7a4f0n1")))) + (base32 "1gs6jds4lazljb1s7s8f1vp0l4j8jvqy6qhb9sck7x66z8157ndm")))) (build-system gnu-build-system) (arguments (list @@ -1916,16 +1919,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"))) @@ -1938,17 +1942,19 @@ The path-guided stochastic gradient descent based 1D sort implemented in (install-file header (string-append out "/include"))) (find-files "src" "\\.h(pp)?$")))))))) (native-inputs - `(("pkg-config" ,pkg-config) - ("sparsehash" ,sparsehash))) + (list (list jemalloc "bin") + pkg-config + sparsehash)) (inputs - `(("boost" ,boost) - ("concurrentqueue" ,concurrentqueue) - ("jemalloc" ,jemalloc) - ("libdivsufsort" ,libdivsufsort) - ("mummer" ,mummer) - ("protobuf" ,protobuf) - ("sdsl-lite" ,sdsl-lite) - ("zlib" ,zlib))) + (list bamtools + boost + concurrentqueue + jemalloc + libdivsufsort + mummer + protobuf + sdsl-lite + zlib)) (home-page "https://github.com/maickrau/GraphAligner") (synopsis "Seed-and-extend program for aligning genome graphs") (description "Seed-and-extend program for aligning long error-prone reads to @@ -2141,7 +2147,7 @@ suitable for long reads, but works also well with short reads.") (define-public odgi (package (name "odgi") - (version "0.8.3") + (version "0.9.0") (outputs '("out" "static")) (source (origin (method url-fetch) @@ -2149,7 +2155,7 @@ suitable for long reads, but works also well with short reads.") "/download/v" version "/odgi-v" version ".tar.gz")) (sha256 - (base32 "1gw1xdb945z25rar6pba6kq5xdx8l7fkhxjyrvc1z1brva53p9hk")) + (base32 "0brg0sz45v1wv4ld3p4jwiab10nyp2f691zfwpiva6g6f71q3cbk")) (snippet #~(begin (use-modules (guix build utils)) @@ -2159,6 +2165,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 @@ -2333,14 +2340,14 @@ in-memory footprint at the cost of packing and unpacking.") (define-public vg (package (name "vg") - (version "1.50.0") + (version "1.65.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 "022wiz0rs1x90nk9zaxcf8szhma8kzygnbfhciq9166kjysd0pc6")) (snippet #~(begin (use-modules (guix build utils)) @@ -2351,199 +2358,184 @@ 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 make-flags #:allow-other-keys) + ;; vg is not in PATH. Replace it with full path. + (substitute* "doc/vgmanmd.py" + (("'vg'") "'./bin/vg'")) + (apply invoke "make" "man" make-flags))) + (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 + ghc-pandoc jq perl pkg-config + python samtools util-linux which @@ -2596,121 +2588,159 @@ multiple sequence alignment.") license:zlib ; deps/sonLib/externalTools/cutest license:boost1.0)))) ; catch.hpp +(define-public wfmash-0.14 + (package + (inherit wfmash) + (version "0.14.0") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/waveygang/wfmash/releases/download/v" + version "/wfmash-v" version ".tar.gz")) + (sha256 + (base32 + "1mk3jschn3hdr45glds65g3hxk7v6nc3plkvxmfbd5pr4kyzlf13")) + (snippet + #~(begin + (use-modules (guix build utils)) + ;; Unbundle atomic-queue. + (delete-file-recursively "src/common/atomic_queue") + (substitute* "src/align/include/computeAlignments.hpp" + (("\"common/atomic_queue/atomic_queue.h\"") + "<atomic_queue/atomic_queue.h>")) + ;; Remove compiler optimizations. + (substitute* (find-files "." "CMakeLists\\.txt") + (("-march=native ") "")))))) + (arguments + (substitute-keyword-arguments (package-arguments wfmash) + ((#:tests? tests? #f) #f) + ((#:phases phases #~%standard-phases) + #~(modify-phases #$phases + (replace 'build-check-prerequisites + (lambda _ + (let ((wfa2-lib #$(string-append "../wfmash-v" + version + "/src/common/wflign/deps/WFA2-lib"))) + (substitute* (string-append wfa2-lib "/Makefile") + ;; Remove architecture-specific flags. + (("-march=x86-64-v3") "")) + (substitute* (string-append wfa2-lib "/tests/wfa.utest.sh") + ;; Fix time command. + (("\\\\time -v") "time")) + ;; Build wfa2-lib. + (invoke "make" "-C" wfa2-lib + #$(string-append "CC=" (cc-for-target)))))))))) + (inputs + (modify-inputs (package-inputs wfmash) + (prepend jemalloc) + (delete "libdeflate"))))) + (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-0.14)) + (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. @@ -2735,7 +2765,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 @@ -3548,36 +3578,37 @@ protein alignments and syntenic genomic alignments.") (define-public pplacer (let ((commit "807f6f3")) - (build-with-ocaml4.07 - (package - (name "pplacer") - ;; The commit should be updated with each version change. - (version "1.1.alpha19") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/matsen/pplacer") - (commit (string-append "v" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 "11ppbbbx20p2g9wj3ff64dhnarb12q79v7qh4rk0gj6lkbz4n7cn")))) - (build-system ocaml-build-system) - (arguments - `(#:modules ((guix build ocaml-build-system) - (guix build utils) - (ice-9 ftw)) + (build-with-ocaml4.07 + (package + (name "pplacer") + ;; The commit should be updated with each version change. + (version "1.1.alpha19") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/matsen/pplacer") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "11ppbbbx20p2g9wj3ff64dhnarb12q79v7qh4rk0gj6lkbz4n7cn")))) + (build-system ocaml-build-system) + (arguments + (list + #:modules '((guix build ocaml-build-system) + (guix build utils) + (ice-9 ftw)) #:phases - (modify-phases %standard-phases - (delete 'configure) - (add-after 'unpack 'fix-build-with-latest-ocaml - (lambda _ - (substitute* "myocamlbuild.ml" - (("dep \\[\"c_pam\"\\]" m) - (string-append "flag [\"ocaml\"; \"compile\"] (A \"-unsafe-string\");\n" - m)) - (("let run_and_read" m) - (string-append " + #~(modify-phases %standard-phases + (delete 'configure) + (add-after 'unpack 'fix-build-with-latest-ocaml + (lambda _ + (substitute* "myocamlbuild.ml" + (("dep \\[\"c_pam\"\\]" m) + (string-append "flag [\"ocaml\"; \"compile\"] (A \"-unsafe-string\");\n" + m)) + (("let run_and_read" m) + (string-append " let split s ch = let x = ref [] in let rec go s = @@ -3593,76 +3624,72 @@ let before_space s = with Not_found -> s " m)) - (("run_and_read \"ocamlfind list \\| cut -d' ' -f1\"" m) - (string-append "List.map before_space (split_nl & " m ")")) - ((" blank_sep_strings &") "") - ((" Lexing.from_string &") "")) - #t)) - (add-after 'unpack 'replace-bundled-cddlib - (lambda* (#:key inputs #:allow-other-keys) - (let* ((cddlib-src (assoc-ref inputs "cddlib-src")) - (local-dir "cddlib_guix")) - (mkdir local-dir) - (with-directory-excursion local-dir - (invoke "tar" "xvf" cddlib-src)) - (let ((cddlib-src-folder - (string-append local-dir "/" - (list-ref (scandir local-dir) 2) - "/lib-src"))) - (for-each make-file-writable (find-files "cdd_src" ".*")) - (for-each - (lambda (file) - (copy-file file - (string-append "cdd_src/" (basename file)))) - (find-files cddlib-src-folder ".*[ch]$"))) - #t))) - (add-after 'unpack 'fix-makefile - (lambda _ - ;; Remove system calls to 'git'. - (substitute* "Makefile" - (("^DESCRIPT:=pplacer-.*") - (string-append - "DESCRIPT:=pplacer-$(shell uname)-v" ,version "\n"))) - (substitute* "myocamlbuild.ml" - (("git describe --tags --long .*\\\" with") - (string-append - "echo -n v" ,version "-" ,commit "\" with"))) - #t)) - (replace 'install - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (bin (string-append out "/bin"))) - (copy-recursively "bin" bin)) - #t))) - #:ocaml ,ocaml-4.07 - #:findlib ,ocaml4.07-findlib)) - (inputs - `(("zlib" ,zlib "static") - ("gsl" ,gsl-static) - ("ocaml-ounit" ,(package-with-ocaml4.07 ocaml-ounit)) - ("ocaml-batteries" ,(package-with-ocaml4.07 ocaml-batteries)) - ("ocaml-camlzip" ,(package-with-ocaml4.07 camlzip)) - ("ocaml-csv" ,(package-with-ocaml4.07 ocaml-csv)) - ("ocaml-sqlite3" ,(package-with-ocaml4.07 ocaml-sqlite3)) - ("ocaml-xmlm" ,(package-with-ocaml4.07 ocaml-xmlm)) - ("ocaml-mcl" ,(package-with-ocaml4.07 ocaml-mcl)) - ("ocaml-gsl" ,ocaml4.07-gsl-1) - ("sqlite:static" ,sqlite "static"))) - (native-inputs - `(("cddlib-src" ,(package-source cddlib)) - ("ocamlbuild" ,(package-with-ocaml4.07 ocamlbuild)) - ("pkg-config" ,pkg-config))) - (propagated-inputs - (list pplacer-scripts)) - (synopsis "Phylogenetic placement of biological sequences") - (description - "Pplacer places query sequences on a fixed reference phylogenetic tree + (("run_and_read \"ocamlfind list \\| cut -d' ' -f1\"" m) + (string-append "List.map before_space (split_nl & " m ")")) + ((" blank_sep_strings &") "") + ((" Lexing.from_string &") "")))) + (add-after 'unpack 'replace-bundled-cddlib + (lambda* (#:key inputs #:allow-other-keys) + (let* ((cddlib-src (assoc-ref inputs "cddlib-src")) + (local-dir "cddlib_guix")) + (mkdir local-dir) + (with-directory-excursion local-dir + (invoke "tar" "xvf" cddlib-src)) + (let ((cddlib-src-folder + (string-append local-dir "/" + (list-ref (scandir local-dir) 2) + "/lib-src"))) + (for-each make-file-writable (find-files "cdd_src" ".*")) + (for-each + (lambda (file) + (copy-file file + (string-append "cdd_src/" (basename file)))) + (find-files cddlib-src-folder ".*[ch]$")))))) + (add-after 'unpack 'fix-makefile + (lambda _ + ;; Remove system calls to 'git'. + (substitute* "Makefile" + (("^DESCRIPT:=pplacer-.*") + (string-append + "DESCRIPT:=pplacer-$(shell uname)-v" ,version "\n"))) + (substitute* "myocamlbuild.ml" + (("git describe --tags --long .*\\\" with") + (string-append + "echo -n v" ,version "-" ,commit "\" with"))))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin"))) + (copy-recursively "bin" bin))))) + #:ocaml ocaml-4.07 + #:findlib ocaml4.07-findlib)) + (inputs + (list (list zlib "static") + (list gsl "static") + (package-with-ocaml4.07 ocaml-ounit) + (package-with-ocaml4.07 ocaml-batteries) + (package-with-ocaml4.07 camlzip) + (package-with-ocaml4.07 ocaml-csv) + (package-with-ocaml4.07 ocaml-sqlite3) + (package-with-ocaml4.07 ocaml-xmlm) + (package-with-ocaml4.07 ocaml-mcl) + ocaml4.07-gsl-1 + (list sqlite "static"))) + (native-inputs + (list (package-source cddlib) + (package-with-ocaml4.07 ocamlbuild) + pkg-config)) + (propagated-inputs + (list pplacer-scripts)) + (synopsis "Phylogenetic placement of biological sequences") + (description + "Pplacer places query sequences on a fixed reference phylogenetic tree to maximize phylogenetic likelihood or posterior probability according to a reference alignment. Pplacer is designed to be fast, to give useful information about uncertainty, and to offer advanced visualization and downstream analysis.") - (home-page "https://matsen.fhcrc.org/pplacer/") - (license license:gpl3))))) + (home-page "https://matsen.fhcrc.org/pplacer/") + (license license:gpl3))))) (define-public python2-biopython (python2-package python-biopython)) @@ -4464,7 +4491,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 @@ -4573,6 +4600,33 @@ interface to the basic htslib. It can be easily included in a C++ program for scripting high-performance genomic analyses.") (license license:asl2.0))) +(define-public r-genio + (package + (name "r-genio") + (version "1.1.2") + (source + (origin + (method url-fetch) + (uri (cran-uri "genio" version)) + (sha256 + (base32 "0izx8yv8mvnfxdqnqpnp2ldw1hzs6ggxi7jgmjlgxkgmm4vngbgl")))) + (properties `((upstream-name . "genio"))) + (build-system r-build-system) + (propagated-inputs (list r-dplyr r-rcpp r-readr r-tibble)) + (native-inputs (list r-knitr r-testthat)) + (home-page "https://github.com/OchoaLab/genio") + (synopsis "Genetics Input/Output Functions") + (description "@code{r-genio} implements readers and writers for file formats +associated with genetics data. Reading and writing Plink BED/BIM/FAM +and GCTA binary GRM formats is fully supported, including a +lightning-fast BED reader and writer implementations. Other functions +are readr wrappers that are more constrained, user-friendly, and +efficient for these particular applications; handles Plink and +Eigenstrat tables (FAM, BIM, IND, and SNP files). There are also make +functions for FAM and BIM tables with default values to go with +simulated genotype data.") + (license license:gpl3))) + (define-public r-stitch (package (name "r-stitch") |
