diff options
| author | pjotrp | 2026-04-03 13:09:14 +0200 |
|---|---|---|
| committer | pjotrp | 2026-04-03 13:09:14 +0200 |
| commit | 996d9fcd40efce6e69892613c3258862bbf66bea (patch) | |
| tree | 8ea16b7ea7c9d371efc30311cf8aeb82972e95a4 | |
| parent | 16bcb0961fa5a3dc113b126f36be304463a4db6b (diff) | |
| download | guix-bioinformatics-996d9fcd40efce6e69892613c3258862bbf66bea.tar.gz | |
Working on cosigt and odgi (WIP)
| -rw-r--r-- | gn/packages/pangenome.scm | 124 |
1 files changed, 96 insertions, 28 deletions
diff --git a/gn/packages/pangenome.scm b/gn/packages/pangenome.scm index 610d1aa..324019e 100644 --- a/gn/packages/pangenome.scm +++ b/gn/packages/pangenome.scm @@ -7,6 +7,7 @@ #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix gexp) + #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) #:use-module (guix build-system go) #:use-module (gnu packages base) @@ -18,7 +19,13 @@ #:use-module (gnu packages image-processing) #:use-module (gnu packages maths) #:use-module (gnu packages perl) - #:use-module (gnu packages pkg-config)) + #:use-module (gnu packages cmake) + #:use-module (gnu packages datastructures) + #:use-module (gnu packages jemalloc) + #:use-module (gnu packages mpi) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages python) + #:use-module (gnu packages python-xyz)) ;; gfautil has been moved to (gn packages pangenome-rust) @@ -361,33 +368,41 @@ unmapped reads using unique k-mers from pangenome graph alleles.") (license license:expat)))) (define-public cosigt - (package - (name "cosigt") - (version "0.1.7") - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/davidebolo1993/cosigt") - (commit (string-append "v" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "0hcmk520qs3iihdvzdyj46kf2gpqvqdr02klrlzzdjs7z5g1fmq4")))) - (build-system go-build-system) - (arguments - (list #:import-path "github.com/davidebolo1993/cosigt" - #:install-source? #f - #:phases - #~(modify-phases %standard-phases - (add-after 'install 'install-pipeline - (lambda _ - (let ((share (string-append #$output "/share/cosigt"))) - (copy-recursively - "src/github.com/davidebolo1993/cosigt/cosigt_smk" - share))))))) - (inputs (list go-github-com-akamensky-argparse - go-gonum-org-v1-gonum)) - (home-page "https://github.com/davidebolo1993/cosigt") + (let ((commit "a8b8ec2f7b0ec01399a03afc032581bc3bcf4833") + (revision "1")) + (package + (name "cosigt") + (version (git-version "0.1.7" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/pjotrp/cosigt") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0rz2zvkfxi2b35bj019cmdm1vzbvfa1lyqsx7awwx3anr09dych1")))) + (build-system go-build-system) + (arguments + (list #:import-path "github.com/pjotrp/cosigt" + #:install-source? #f + #:phases + #~(modify-phases %standard-phases + (add-after 'install 'install-pipeline + (lambda _ + (let ((share (string-append #$output "/share/cosigt"))) + (copy-recursively + "src/github.com/pjotrp/cosigt/cosigt_smk" + share)))) + (add-after 'install 'install-tests + (lambda _ + (let ((test (string-append #$output "/share/cosigt/test"))) + (copy-recursively + "src/github.com/pjotrp/cosigt/test" + test))))))) + (inputs (list go-github-com-akamensky-argparse + go-gonum-org-v1-gonum)) + (home-page "https://github.com/pjotrp/cosigt") (synopsis "Cosine similarity-based structural haplotype genotyper") (description "Cosigt (COsine SImilarity-based GenoTyper) assigns structural @@ -396,4 +411,57 @@ Snakemake pipeline (@file{share/cosigt/}) and a genotyping binary. Pipeline tools needed at runtime: snakemake, minimap2, samtools, bedtools, bwa-mem2, odgi, gafpack, gfainject, impg, pggb, meryl, kfilt, wally, miniprot, and pangene.") + (license license:expat)))) + +(define-public odgi + (package + (name "odgi") + (version "0.9.0") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/pangenome/odgi/releases" + "/download/v" version + "/odgi-v" version ".tar.gz")) + (sha256 + (base32 "0brg0sz45v1wv4ld3p4jwiab10nyp2f691zfwpiva6g6f71q3cbk")) + (snippet + #~(begin + (use-modules (guix build utils)) + (substitute* "CMakeLists.txt" + (("-march=native") "") + (("-msse4\\.2") "")))))) + (build-system cmake-build-system) + (arguments + (list + #:tests? #f + #:parallel-build? #f ; OOM with parallel build + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'use-gnuinstalldirs-macros + (lambda _ + (substitute* "CMakeLists.txt" + (("project\\(odgi\\)" all) + (string-append all "\ninclude(GNUInstallDirs)")) + (("LIBRARY DESTINATION lib") + "LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}") + (("ARCHIVE DESTINATION lib") + "ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}")))) + (add-after 'unpack 'link-to-libodgi + (lambda _ + (substitute* "CMakeLists.txt" + (("^ \\$<TARGET_OBJECTS:odgi_objs>.*") "") + (("target_link_libraries\\(odgi " all) + (string-append all "libodgi_shared ")))))))) + (native-inputs (list pkg-config)) + (inputs + (list jemalloc + libdivsufsort + openmpi + pybind11 + python + sdsl-lite)) + (home-page "https://github.com/vgteam/odgi") + (synopsis "Optimized Dynamic Genome/Graph Implementation") + (description "odgi provides an efficient and succinct dynamic DNA sequence +graph model, as well as algorithms for pangenome analysis.") (license license:expat))) |
