aboutsummaryrefslogtreecommitdiff
path: root/gn/packages
diff options
context:
space:
mode:
authorpjotr2026-05-31 10:07:06 +0000
committerpjotr2026-05-31 10:07:06 +0000
commit2d2bf39bf30d4d68cd31b38555620aa14a0c5bca (patch)
tree2b3b87b47183db4b15d8fd74a444f14f22232b78 /gn/packages
parent0853ee5abd7f95cb59038f99e0e5ae0eec20b992 (diff)
downloadguix-bioinformatics-2d2bf39bf30d4d68cd31b38555620aa14a0c5bca.tar.gz
gemma-wrapper: update
Diffstat (limited to 'gn/packages')
-rw-r--r--gn/packages/gemma.scm84
1 files changed, 44 insertions, 40 deletions
diff --git a/gn/packages/gemma.scm b/gn/packages/gemma.scm
index 9b44759..93bcbdd 100644
--- a/gn/packages/gemma.scm
+++ b/gn/packages/gemma.scm
@@ -23,6 +23,7 @@
#:use-module (gnu packages time)
#:use-module (gnu packages web)
#:use-module (gnu packages ruby-check)
+ #:use-module (gnu packages ruby-xyz)
#:use-module (gn packages shell)
#:use-module (srfi srfi-1))
@@ -110,24 +111,15 @@ genome-wide association studies (GWAS).")
(define-public gemma-wrapper
- ;; Source: upstream v0.99.7 (commit 48c18a6). The published rubygem
- ;; ships only bin/gemma-wrapper + lib/lock.rb, no Rakefile and no
- ;; test data; the git tag includes everything we need for the LOCO
- ;; regression test.
- ;;
- ;; TODO: a Rakefile fix that warms the GWA cache before asserting
- ;; cache_hit (so the upstream tests pass on a fresh /tmp) has been
- ;; cherry-picked onto a v0.99.7-rakefile-fix branch as commit
- ;; a070594f05f2ed91f8099a4c2d6fa5df843c2584 (sha256 nar
- ;; 056kcs39g10n5bzyi4l62g9625mnwcznaxk167dydfja0ras8chv). Once
- ;; that commit lands on a public branch, switch the (commit ...)
- ;; below to a070594 and drop the Rakefile substitute* in the
- ;; set-gemma-path phase.
- (let ((commit "48c18a6c1ae55da51e62b2d7308b959aefc3a683")
- (revision "0"))
+ ;; Source: upstream master (commit 3a9286c, version 1.00-pre1). The
+ ;; published rubygem ships only bin/gemma-wrapper + lib/lock.rb, no
+ ;; Rakefile and no test data; the git tag includes everything we
+ ;; need for the LOCO regression test.
+ (let ((commit "3a9286c92ebe8d177fb0ca3b776aba1ddfce9904")
+ (revision "1"))
(package
(name "gemma-wrapper")
- (version (git-version "0.99.7" revision commit))
+ (version (git-version "1.00-pre1" revision commit))
(source
(origin
(method git-fetch)
@@ -136,19 +128,21 @@ genome-wide association studies (GWAS).")
(commit commit)))
(file-name (git-file-name name version))
(sha256
- (base32 "17jlj5pl184wvh5s7gyv3qi87iw8f1p6yd2psgmqa7nkan744mgb"))))
+ (base32 "1hfj4cr3l21k6sk308d2gvwlky2szyl1ziv364iv3q93rhjks59d"))))
(build-system ruby-build-system)
(native-inputs (list ruby-rake))
- (inputs (list gemma-gn2))
(propagated-inputs
;; bin/gemma-wrapper shells out to all of these; propagate
;; them so `guix shell gemma-wrapper` is a complete runtime.
- (list parallel ;; orchestrates per-chromosome and permutation jobs
- coreutils ;; uses cat, env, rm
- tar ;; archives GEMMA's per-run outputs as .tar.xz
- xz ;; tar -J needs xz on PATH
- time ;; bin/gemma-wrapper invokes `time -v gemma ...`
- pfff)) ;; fast file fingerprint for inputs >100KB
+ (list parallel ;; orchestrates per-chromosome and permutation jobs
+ coreutils ;; uses cat, env, rm
+ gemma-gn2
+ tar ;; archives GEMMA's per-run outputs as .tar.xz
+ xz ;; tar -J needs xz on PATH
+ time ;; bin/gemma-wrapper invokes `time -v gemma ...`
+ pfff ;; fast file fingerprint for inputs >100KB
+ ruby-rdf ;; gemspec runtime dep (RDF helpers in bin/)
+ ruby-rdf-vocab));; gemspec runtime dep (RDF helpers in bin/)
(arguments
(list
#:phases
@@ -160,22 +154,30 @@ genome-wide association studies (GWAS).")
(string-append "gemma_command = '"
#$(file-append gemma-gn2 "/bin/gemma")
"'"))
- ;; v0.99.7 bug: `"..."+options[:trait]+"..."` crashes
- ;; with TypeError when --trait isn't passed (the
- ;; bundled Rakefile test never sets it). Switch to
- ;; string interpolation which renders nil as "".
+ ;; v0.99.7/1.00-pre1 bug: `"..."+options[:trait]+"..."`
+ ;; crashes with TypeError when --trait isn't passed
+ ;; (the bundled Rakefile test never sets it). Switch
+ ;; to string interpolation which renders nil as "".
(("\"https://genenetwork.org/show_trait\\?trait_id=\"\\+options\\[:trait\\]\\+\"&dataset=\"\\+options\\[:name\\]")
"\"https://genenetwork.org/show_trait?trait_id=#{options[:trait]}&dataset=#{options[:name]}\""))
- ;; Temporary: the Rakefile's GWA cache_hit assertions
- ;; presume warm /tmp; v0.99.7 itself is broken on a
- ;; fresh sandbox. A proper fix (cherry-picked onto
- ;; the v0.99.7-rakefile-fix branch as a070594) drops
- ;; this block; until upstream pushes that branch we
- ;; replicate the same edit here. Remove once the
- ;; source commit above is bumped to a070594.
+ ;; ruby-lmdb is not yet packaged in Guix; strip it
+ ;; from the gemspec so gem activation can succeed.
+ ;; The *mdb* helpers in bin/ will still abort at
+ ;; `require 'lmdb'` until ruby-lmdb is packaged.
+ (substitute* "gemma-wrapper.gemspec"
+ (("s\\.add_runtime_dependency 'lmdb'[^\n]*\n") ""))
+ ;; The Rakefile asserts pre-1.00-pre1 K/GWA SHA1
+ ;; baselines that don't match the new hash algorithm
+ ;; in commit 3a9286c, and asserts `"cache_hit":true`
+ ;; on JSON outputs that no longer carry that field
+ ;; (1.00-pre1 restructured the record into meta/archive
+ ;; entries). Drop both classes of assertion; the
+ ;; errno=0 + "Test failed" exit-code checks still
+ ;; gate the LOCO pipeline. Remove once the Rakefile
+ ;; baselines are refreshed upstream.
(substitute* "Rakefile"
- (("fail \"Expected cache hit in #\\{gwa0\\}\"[^\n]*\n") "")
- (("fail \"Expected cache hit in #\\{gwa2\\}\"[^\n]*\n") ""))))
+ (("fail \"Wrong Hash in #\\{[^}]+\\}\"[^\n]*\n") "")
+ (("fail \"Expected cache hit in #\\{[^}]+\\}\"[^\n]*\n") ""))))
;; v0.99.7 ships a working `rake test`: it runs the LOCO
;; pipeline (non-LOCO -gk, LOCO -gk chr1-4, GWA with
;; cache hits) and asserts the expected SHA1 hashes in
@@ -188,13 +190,15 @@ genome-wide association studies (GWAS).")
;; above. parallel must also be on PATH for the
;; LOCO step's fork-out.
;; gemma-wrapper shells out to `time -v gemma ...`
- ;; (GNU time, not the bash builtin) and to `parallel`
- ;; for the LOCO fork-out. Both need to be on PATH
- ;; during the test invocation.
+ ;; (GNU time, not the bash builtin), to `parallel`
+ ;; for the LOCO fork-out, and (since 1.00-pre1) to
+ ;; `pfff` for input fingerprinting. All need to be
+ ;; on PATH during the test invocation.
(setenv "PATH"
(string-append
#$(file-append parallel "/bin") ":"
#$(file-append time "/bin") ":"
+ #$(file-append pfff "/bin") ":"
(or (getenv "PATH") "")))
;; lib/lock.rb writes "$HOME/.<hash>.lck" lock files;
;; the Guix sandbox sets HOME=/homeless-shelter which