about summary refs log tree commit diff
diff options
context:
space:
mode:
authorpjotrp2026-04-03 17:43:30 +0200
committerpjotrp2026-04-03 17:43:30 +0200
commit27dd15f8f0ada7670019f683d0cd76dd61bdda0f (patch)
treec843cb07baa105973dc36567de2b606bfe2b2e5d
parent05b1a2bab0867b31ad740d15a5d52528c463a461 (diff)
downloadguix-bioinformatics-27dd15f8f0ada7670019f683d0cd76dd61bdda0f.tar.gz
Add wfmash recent
-rw-r--r--gn/packages/pangenome.scm43
1 files changed, 42 insertions, 1 deletions
diff --git a/gn/packages/pangenome.scm b/gn/packages/pangenome.scm
index f253458..c82b988 100644
--- a/gn/packages/pangenome.scm
+++ b/gn/packages/pangenome.scm
@@ -666,6 +666,22 @@ The path-guided stochastic gradient descent based 1D sort implemented in
             (lambda _
               (substitute* (find-files "scripts" "\\.py$")
                 (("/usr/bin/python") "/usr/bin/python3"))))
+          (add-after 'unpack 'fix-wfmash-flags
+            (lambda _
+              ;; wfmash 0.24 renamed/changed flags:
+              ;; --approx-map -> --approx-mapping
+              ;; -H (was hg-filter threshold) -> removed, use --hg-filter=
+              ;; --hg-filter-ani-diff N -> --hg-filter=N,0.0,99.9
+              ;; -Y DELIM (exclude-delim) -> -YDELIM (group-prefix, inline)
+              ;; --invert-filtering -> removed
+              (substitute* "pggb"
+                (("--approx-map\\b") "--approx-mapping")
+                (("-H \\$mash_kmer_thres") "")
+                (("--hg-filter-ani-diff \\$hg_filter_ani_diff")
+                 "--hg-filter=$hg_filter_ani_diff,0.0,99.9")
+                (("exclude_cmd=\"-Y \"\\$exclude_delim")
+                 "exclude_cmd=\"-Y\"$exclude_delim")
+                (("--invert-filtering") ""))))
           (add-after 'install 'wrap-scripts
             (lambda* (#:key inputs outputs #:allow-other-keys)
               (let ((out (assoc-ref outputs "out")))
@@ -704,9 +720,34 @@ The path-guided stochastic gradient descent based 1D sort implemented in
            seqwish
            smoothxg
            time
-           wfmash))
+           wfmash-0.24))
     (home-page "https://doi.org/10.1101/2023.04.05.535718")
     (synopsis "PanGenome Graph Builder")
     (description "pggb builds pangenome variation graphs from a set of input
 sequences using wfmash, seqwish, smoothxg, and gfaffix.")
     (license license:expat)))
+
+(define-public wfmash-0.24
+  (package
+    (inherit wfmash)
+    (name "wfmash")
+    (version "0.24.2")
+    (arguments
+     (list
+       #:tests? #f
+       #:configure-flags
+       #~(list "-DCMAKE_C_FLAGS=-mcx16"
+               "-DCMAKE_CXX_FLAGS=-mcx16")))
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/waveygang/wfmash/releases"
+                                  "/download/v" version
+                                  "/wfmash-v" version ".tar.gz"))
+              (sha256
+               (base32 "083nanyz0ywhh4klgymap0zjn1jyh0j7k7gxhsd03zrq4nlf91nv"))
+              (snippet
+               #~(begin
+                   (use-modules (guix build utils))
+                   (substitute* (find-files "." "CMakeLists.txt")
+                     (("-mcx16") "")
+                     (("-march=native") ""))))))))