diff options
| author | pjotrp | 2026-04-17 07:56:33 +0200 |
|---|---|---|
| committer | pjotrp | 2026-04-17 07:56:33 +0200 |
| commit | 034763cf8a82818259b68bd46bf57e3144488816 (patch) | |
| tree | d8327d5ba9404522f85666409031b0d06552a03b | |
| parent | 0641f30786328de7c18b354744d602e3c4d6aa2a (diff) | |
| download | guix-bioinformatics-034763cf8a82818259b68bd46bf57e3144488816.tar.gz | |
- cigzip (binary, 0.1.0-b7cc0ed) -- successfully packaged and added to pangenomes
- tracepoints -- library-only Rust crate, already available as rust-tracepoints-0.1.0.66a5511 in pangenome-rust.scm for dependency use; cigzip exposes its functionality as a CLI
| -rw-r--r-- | gn/packages/pangenome-rust.scm | 394 | ||||
| -rw-r--r-- | gn/packages/pangenome.scm | 112 |
2 files changed, 505 insertions, 1 deletions
diff --git a/gn/packages/pangenome-rust.scm b/gn/packages/pangenome-rust.scm index fffd077..9f5ba8e 100644 --- a/gn/packages/pangenome-rust.scm +++ b/gn/packages/pangenome-rust.scm @@ -2333,6 +2333,190 @@ (crate-source "vcf" "0.6.1" "0dc0p00a19rpmhrqcshrn2qg5l716b5s1fy8vpd3p32bw77vpbs0")) +;; cigzip-specific crates +(define rust-cc-1.2.60 + (crate-source "cc" "1.2.60" + "084a8ziprdlyrj865f3303qr0b7aaggilkl18slncss6m4yp1ia3")) + + +(define rust-icu-collections-2.2.0 + (crate-source "icu_collections" "2.2.0" + "070r7xd0pynm0hnc1v2jzlbxka6wf50f81wybf9xg0y82v6x3119")) + + +(define rust-icu-locale-core-2.2.0 + (crate-source "icu_locale_core" "2.2.0" + "0a9cmin5w1x3bg941dlmgszn33qgq428k7qiqn5did72ndi9n8cj")) + + +(define rust-icu-normalizer-2.2.0 + (crate-source "icu_normalizer" "2.2.0" + "1d7krxr0xpc4x9635k1100a24nh0nrc59n65j6yk6gbfkplmwvn5")) + +(define rust-icu-normalizer-data-2.2.0 + (crate-source "icu_normalizer_data" "2.2.0" + "0f5d5d5fhhr9937m2z6z38fzh6agf14z24kwlr6lyczafypf0fys")) + + + +(define rust-icu-properties-2.2.0 + (crate-source "icu_properties" "2.2.0" + "1pkh3s837808cbwxvfagwc28cvwrz2d9h5rl02jwrhm51ryvdqxy")) + +(define rust-icu-properties-data-2.2.0 + (crate-source "icu_properties_data" "2.2.0" + "052awny0qwkbcbpd5jg2cd7vl5ry26pq4hz1nfsgf10c3qhbnawf")) + + + +(define rust-icu-provider-2.2.0 + (crate-source "icu_provider" "2.2.0" + "08dl8pxbwr8zsz4c5vphqb7xw0hykkznwi4rw7bk6pwb3krlr70k")) + + +(define rust-js-sys-0.3.95 + ;; TODO REVIEW: Check bundled sources. + (crate-source "js-sys" "0.3.95" + "1jhj3kgxxgwm0cpdjiz7i2qapqr7ya9qswadmr63dhwx3lnyjr19")) + + +(define rust-lib-wfa2-0.1.0.8859b6a + ;; TODO REVIEW: Define standalone package if this is a workspace. + (origin + (method git-fetch) + (uri (git-reference (url "https://github.com/AndreaGuarracino/lib_wfa2") + (commit "8859b6a214141968f37d9bcb22552408318adda0"))) + (file-name (git-file-name "rust-lib-wfa2" "0.1.0.8859b6a")) + (sha256 (base32 "08hfx5pzcmvk7pnxhjg6nvf77ng9rjrnysynj0qf6n6xd4n02qxa")))) + + +(define rust-libz-sys-1.1.28 + ;; TODO REVIEW: Check bundled sources. + (crate-source "libz-sys" "1.1.28" + "08hyf9v85zifl3353xc7i5wr53v9b3scri856cmphl3gaxp24fpw")) + + +(define rust-litemap-0.8.2 + (crate-source "litemap" "0.8.2" + "1w7628bc7wwcxc4n4s5kw0610xk06710nh2hn5kwwk2wa91z9nlj")) + + +(define rust-pkg-config-0.3.33 + (crate-source "pkg-config" "0.3.33" + "17jnqmcbxsnwhg9gjf0nh6dj5k0x3hgwi3mb9krjnmfa9v435w8r")) + + +(define rust-portable-atomic-util-0.2.7 + (crate-source "portable-atomic-util" "0.2.7" + "0616j0fhy6y71hyxg3n86f6hng0fmsc269s3wp4gl8ww4p8hd8f2")) + + +(define rust-potential-utf-0.1.5 + (crate-source "potential_utf" "0.1.5" + "0r0518fr32xbkgzqap509s3r60cr0iancsg9j1jgf37cyz7b20q1")) + + +(define rust-ragc-common-0.1.1.40e5cad + ;; TODO REVIEW: Define standalone package if this is a workspace. + (origin + (method git-fetch) + (uri (git-reference (url "https://github.com/ekg/ragc") + (commit "40e5cad11cab7d4df07a72d6b16d68c2d60b0742"))) + (file-name (git-file-name "rust-ragc-common" "0.1.1.40e5cad")) + (sha256 (base32 "1p71jj02ppcvkrvnbs4y0yf00cslzqhlx4idscx8fk4lhmip4kla")))) + + +(define rust-ragc-core-0.1.1.40e5cad + ;; TODO REVIEW: Define standalone package if this is a workspace. + (origin + (method git-fetch) + (uri (git-reference (url "https://github.com/ekg/ragc") + (commit "40e5cad11cab7d4df07a72d6b16d68c2d60b0742"))) + (file-name (git-file-name "rust-ragc-core" "0.1.1.40e5cad")) + (sha256 (base32 "1p71jj02ppcvkrvnbs4y0yf00cslzqhlx4idscx8fk4lhmip4kla")))) + + +(define rust-tinystr-0.8.3 + (crate-source "tinystr" "0.8.3" + "0vfr8x285w6zsqhna0a9jyhylwiafb2kc8pj2qaqaahw48236cn8")) + + +(define rust-wasm-bindgen-0.2.118 + (crate-source "wasm-bindgen" "0.2.118" + "129s5r14fx4v4xrzpx2c6l860nkxpl48j50y7kl6j16bpah3iy8b")) + +(define rust-wasm-bindgen-macro-0.2.118 + (crate-source "wasm-bindgen-macro" "0.2.118" + "1v98r8vs17cj8918qsg0xx4nlg4nxk1g0jd4nwnyrh1687w29zzf")) + +(define rust-wasm-bindgen-macro-support-0.2.118 + (crate-source "wasm-bindgen-macro-support" "0.2.118" + "0169jr0q469hfx5zqxfyywf2h2f4aj17vn4zly02nfwqmxghc24x")) + +(define rust-wasm-bindgen-shared-0.2.118 + (crate-source "wasm-bindgen-shared" "0.2.118" + "0ag1vvdzi4334jlzilsy14y3nyzwddf1ndn62fyhf6bg62g4vl2z")) + + + + + +(define rust-web-sys-0.3.95 + ;; TODO REVIEW: Check bundled sources. + (crate-source "web-sys" "0.3.95" + "0zfr2jy5bpkkggl88i43yy37p538hg20i56kwn421yj9g6qznbag")) + + +(define rust-writeable-0.6.3 + (crate-source "writeable" "0.6.3" + "1i54d13h9bpap2hf13xcry1s4lxh7ap3923g8f3c0grd7c9fbyhz")) + + +(define rust-yoke-0.8.2 + (crate-source "yoke" "0.8.2" + "1jprcs7a98a5whvfs6r3jvfh1nnfp6zyijl7y4ywmn88lzywbs5b")) + +(define rust-yoke-derive-0.8.2 + (crate-source "yoke-derive" "0.8.2" + "13l5y5sz4lqm7rmyakjbh6vwgikxiql51xfff9hq2j485hk4r16y")) + + + +(define rust-zerocopy-0.8.48 + (crate-source "zerocopy" "0.8.48" + "1sb8plax8jbrsng1jdval7bdhk7hhrx40dz3hwh074k6knzkgm7f")) + +(define rust-zerocopy-derive-0.8.48 + (crate-source "zerocopy-derive" "0.8.48" + "1m5s0g92cxggqc74j83k1priz24k3z93sj5gadppd20p9c4cvqvh")) + + + +(define rust-zerofrom-0.1.7 + (crate-source "zerofrom" "0.1.7" + "1py40in4rirc9q8w36q67pld0zk8ssg024xhh0cncxgal7ra3yk9")) + +(define rust-zerofrom-derive-0.1.7 + (crate-source "zerofrom-derive" "0.1.7" + "18c4wsnznhdxx6m80piil1lbyszdiwsshgjrybqcm4b6qic22lqi")) + + + +(define rust-zerotrie-0.2.4 + (crate-source "zerotrie" "0.2.4" + "1gr0pkcn3qsr6in6iixqyp0vbzwf2j1jzyvh7yl2yydh3p9m548g")) + + +(define rust-zerovec-0.11.6 + (crate-source "zerovec" "0.11.6" + "0fdjsy6b31q9i0d73sl7xjd12xadbwi45lkpfgqnmasrqg5i3ych")) + +(define rust-zerovec-derive-0.11.3 + (crate-source "zerovec-derive" "0.11.3" + "0m85qj92mmfvhjra6ziqky5b1p4kcmp5069k7kfadp5hr8jw8pb2")) + + + ;; pafplot-specific crates (define rust-boomphf-0.6.0 (crate-source "boomphf" "0.6.0" @@ -3511,7 +3695,215 @@ rust-utf8parse-0.2.2 rust-version-check-0.9.5 rust-windows-link-0.2.1 - rust-windows-sys-0.61.2))) + rust-windows-sys-0.61.2)) + (cigzip => + (list rust-adler2-2.0.1 + rust-ahash-0.8.12 + rust-aho-corasick-1.1.4 + rust-allocator-api2-0.2.21 + rust-anes-0.1.6 + rust-anstream-1.0.0 + rust-anstyle-1.0.14 + rust-anstyle-parse-1.0.0 + rust-anstyle-query-1.1.5 + rust-anstyle-wincon-3.0.11 + rust-anyhow-1.0.102 + rust-arbitrary-chunks-0.4.1 + rust-autocfg-1.5.0 + rust-bgzip-0.3.1 + rust-bincode-1.3.3 + rust-bindgen-0.69.5 + rust-bio-types-1.0.4 + rust-bitflags-2.11.1 + rust-block-buffer-0.10.4 + rust-block-pseudorand-0.1.2 + rust-bumpalo-3.20.2 + rust-byteorder-1.5.0 + rust-bytes-1.11.1 + rust-cast-0.3.0 + rust-cc-1.2.60 + rust-cexpr-0.6.0 + rust-cfg-if-1.0.4 + rust-chiapos-chacha8-0.1.0 + rust-ciborium-0.2.2 + rust-ciborium-io-0.2.2 + rust-ciborium-ll-0.2.2 + rust-clang-sys-1.8.1 + rust-clap-4.6.1 + rust-clap-builder-4.6.0 + rust-clap-derive-4.6.1 + rust-clap-lex-1.1.0 + rust-cmake-0.1.58 + rust-colorchoice-1.0.5 + rust-console-0.16.3 + rust-cpufeatures-0.2.17 + rust-crc32fast-1.5.0 + rust-criterion-0.5.1 + rust-criterion-plot-0.5.0 + rust-crossbeam-0.8.4 + rust-crossbeam-channel-0.5.15 + rust-crossbeam-deque-0.8.6 + rust-crossbeam-epoch-0.9.18 + rust-crossbeam-queue-0.3.12 + rust-crossbeam-utils-0.8.21 + rust-crunchy-0.2.4 + rust-crypto-common-0.1.7 + rust-custom-derive-0.1.7 + rust-dashmap-6.1.0 + rust-derive-new-0.6.0 + rust-derive-new-0.7.0 + rust-digest-0.10.7 + rust-displaydoc-0.2.5 + rust-either-1.15.0 + rust-encode-unicode-1.0.0 + rust-env-filter-1.0.1 + rust-env-logger-0.11.10 + rust-find-msvc-tools-0.1.9 + rust-flate2-1.1.9 + rust-form-urlencoded-1.2.2 + rust-fs-utils-1.1.4 + rust-generic-array-0.14.7 + rust-getrandom-0.3.4 + rust-glob-0.3.3 + rust-half-2.7.1 + rust-hashbrown-0.14.5 + rust-heck-0.5.0 + rust-hermit-abi-0.5.2 + rust-hts-sys-2.2.0 + rust-icu-collections-2.2.0 + rust-icu-locale-core-2.2.0 + rust-icu-normalizer-2.2.0 + rust-icu-normalizer-data-2.2.0 + rust-icu-properties-2.2.0 + rust-icu-properties-data-2.2.0 + rust-icu-provider-2.2.0 + rust-idna-1.1.0 + rust-idna-adapter-1.2.1 + rust-ieee754-0.2.6 + rust-indicatif-0.18.4 + rust-is-terminal-0.4.17 + rust-is-terminal-polyfill-1.70.2 + rust-itertools-0.10.5 + rust-itertools-0.12.1 + rust-itoa-1.0.18 + rust-jiff-0.2.23 + rust-jiff-static-0.2.23 + rust-jobserver-0.1.34 + rust-js-sys-0.3.95 + rust-lazy-static-1.5.0 + rust-lazycell-1.3.0 + rust-lib-wfa2-0.1.0.8859b6a + rust-libc-0.2.185 + rust-libdeflate-sys-1.25.2 + rust-libloading-0.8.9 + rust-libz-sys-1.1.28 + rust-linear-map-1.2.0 + rust-litemap-0.8.2 + rust-lock-api-0.4.14 + rust-log-0.4.29 + rust-memchr-2.8.0 + rust-minimal-lexical-0.2.1 + rust-miniz-oxide-0.8.9 + rust-nanorand-0.6.1 + rust-newtype-derive-0.1.6 + rust-nom-7.1.3 + rust-noodles-0.100.0 + rust-noodles-bgzf-0.42.0 + rust-num-traits-0.2.19 + rust-num-cpus-1.17.0 + rust-once-cell-1.21.4 + rust-once-cell-polyfill-1.70.2 + rust-oorandom-11.1.5 + rust-parking-lot-core-0.9.12 + rust-partition-0.1.2 + rust-percent-encoding-2.3.2 + rust-pkg-config-0.3.33 + rust-plotters-0.3.7 + rust-plotters-backend-0.3.7 + rust-plotters-svg-0.3.7 + rust-portable-atomic-1.13.1 + rust-portable-atomic-util-0.2.7 + rust-potential-utf-0.1.5 + rust-proc-macro2-1.0.106 + rust-quick-error-1.2.3 + rust-quote-1.0.45 + rust-r-efi-5.3.0 + rust-ragc-common-0.1.1.40e5cad + rust-ragc-core-0.1.1.40e5cad + rust-rayon-1.12.0 + rust-rayon-core-1.13.0 + rust-rdst-0.20.14 + rust-redox-syscall-0.5.18 + rust-regex-1.12.3 + rust-regex-automata-0.4.14 + rust-regex-syntax-0.8.10 + rust-rust-htslib-1.0.0 + rust-rustc-hash-1.1.0 + rust-rustc-version-0.1.7 + rust-rustversion-1.0.22 + rust-same-file-1.0.6 + rust-scopeguard-1.2.0 + rust-semver-0.1.20 + rust-serde-1.0.228 + rust-serde-core-1.0.228 + rust-serde-derive-1.0.228 + rust-serde-json-1.0.149 + rust-sha2-0.10.9 + rust-shlex-1.3.0 + rust-simd-adler32-0.3.9 + rust-smallvec-1.15.1 + rust-stable-deref-trait-1.2.1 + rust-strsim-0.11.1 + rust-strum-macros-0.26.4 + rust-syn-2.0.117 + rust-synstructure-0.13.2 + rust-thiserror-1.0.69 + rust-thiserror-2.0.18 + rust-thiserror-impl-1.0.69 + rust-thiserror-impl-2.0.18 + rust-tikv-jemalloc-sys-0.5.4+5.3.0-patched + rust-tikv-jemallocator-0.5.4 + rust-tinystr-0.8.3 + rust-tinytemplate-1.2.1 + rust-tpa-0.1.0.49f1801 + rust-tracepoints-0.1.0.66a5511 + rust-typenum-1.19.0 + rust-unicode-ident-1.0.24 + rust-unicode-width-0.2.2 + rust-unit-prefix-0.5.2 + rust-url-2.5.8 + rust-utf8-iter-1.0.4 + rust-utf8parse-0.2.2 + rust-vcpkg-0.2.15 + rust-version-check-0.9.5 + rust-voracious-radix-sort-1.2.0 + rust-walkdir-2.5.0 + rust-wasip2-1.0.2+wasi-0.2.9 + rust-wasm-bindgen-0.2.118 + rust-wasm-bindgen-macro-0.2.118 + rust-wasm-bindgen-macro-support-0.2.118 + rust-wasm-bindgen-shared-0.2.118 + rust-web-sys-0.3.95 + rust-web-time-1.1.0 + rust-winapi-util-0.1.11 + rust-windows-link-0.2.1 + rust-windows-sys-0.61.2 + rust-wit-bindgen-0.51.0 + rust-writeable-0.6.3 + rust-yoke-0.8.2 + rust-yoke-derive-0.8.2 + rust-zerocopy-0.8.48 + rust-zerocopy-derive-0.8.48 + rust-zerofrom-0.1.7 + rust-zerofrom-derive-0.1.7 + rust-zerotrie-0.2.4 + rust-zerovec-0.11.6 + rust-zerovec-derive-0.11.3 + rust-zlib-rs-0.6.3 + rust-zmij-1.0.21 + rust-zstd-0.13.3 + rust-zstd-safe-7.2.4 + rust-zstd-sys-2.0.16+zstd.1.5.7))) ;;; ;;; Main package. diff --git a/gn/packages/pangenome.scm b/gn/packages/pangenome.scm index 78b2014..5150ed9 100644 --- a/gn/packages/pangenome.scm +++ b/gn/packages/pangenome.scm @@ -45,6 +45,7 @@ #:use-module (gnu packages gtk) #:use-module (gnu packages haskell-xyz) #:use-module (gnu packages java) + #:use-module (gnu packages llvm) #:use-module (gnu packages ncurses) #:use-module (gnu packages protobuf) #:use-module (gnu packages qt) @@ -1293,6 +1294,116 @@ sequence data including @code{vcfeval} for variant comparison, sequence data simulators, and format conversion utilities.") (license license:bsd-2))) +;; tracepoints is a library-only Rust crate (no CLI binary); its +;; functionality is exposed via the cigzip tool below. The crate source +;; is available as rust-tracepoints-0.1.0.66a5511 in pangenome-rust.scm +;; for use as a dependency. + +(define-public cigzip + (let ((commit "b7cc0ed6abb6515a8ad231d47ef90a06a3a491e8") + (revision "1")) + (package + (name "cigzip") + (version (git-version "0.1.0" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/AndreaGuarracino/cigzip") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0kmpwkxk86428z3iva2wx0x0aavqqnx0m2sblpvw5mdd4102xjhx")))) + (build-system cargo-build-system) + (arguments + (list #:install-source? #f + ;; Tests require WFA2 C library built in OUT_DIR via build.rs + #:tests? #f + #:phases + #~(modify-phases %standard-phases + (add-before 'build 'copy-ragc-workspace + (lambda* (#:key inputs #:allow-other-keys) + ;; ragc has a workspace Cargo.toml; copy it locally and + ;; point dependents to the ragc-core subdir. + (let ((ragc (assoc-ref inputs + "rust-ragc-core-0.1.1.40e5cad-checkout"))) + (copy-recursively ragc "ragc-workspace")))) + (add-before 'build 'fix-dependency-sources + (lambda _ + ;; Rewrite all git deps of cigzip and its vendored + ;; transitive deps to use guix-vendor local paths. + (let ((cargo-tomls + (list "Cargo.toml" + "guix-vendor/rust-tpa-0.1.0.49f1801-checkout/Cargo.toml" + "guix-vendor/rust-tracepoints-0.1.0.66a5511-checkout/Cargo.toml"))) + (for-each + (lambda (file) + (when (file-exists? file) + (substitute* file + (("git = \"https://github.com/AndreaGuarracino/lib_wfa2\"[^,}]*(, rev = \"[0-9a-f]*\")?") + "path = \"../rust-lib-wfa2-0.1.0.8859b6a-checkout\", version = \"0.1.0\"") + (("git = \"https://github.com/AndreaGuarracino/tracepoints\"[^,}]*(, rev = \"[0-9a-f]*\")?") + "path = \"../rust-tracepoints-0.1.0.66a5511-checkout\", version = \"0.1.0\"") + (("git = \"https://github.com/AndreaGuarracino/tpa\"[^,}]*(, rev = \"[0-9a-f]*\")?") + "path = \"../rust-tpa-0.1.0.49f1801-checkout\", version = \"0.1.0\"") + (("git = \"https://github.com/ekg/ragc\", rev = \"40e5cad\"") + "path = \"ragc-workspace/ragc-core\", version = \"0.1.1\"")))) + cargo-tomls) + ;; The top-level Cargo.toml uses "ragc-workspace/ragc-core" + ;; (relative to package root), but vendored Cargo.tomls + ;; have sibling paths via ../ + (substitute* "Cargo.toml" + (("path = \"\\.\\./rust-lib-wfa2-0.1.0.8859b6a-checkout\"") + "path = \"guix-vendor/rust-lib-wfa2-0.1.0.8859b6a-checkout\"") + (("path = \"\\.\\./rust-tracepoints-0.1.0.66a5511-checkout\"") + "path = \"guix-vendor/rust-tracepoints-0.1.0.66a5511-checkout\"") + (("path = \"\\.\\./rust-tpa-0.1.0.49f1801-checkout\"") + "path = \"guix-vendor/rust-tpa-0.1.0.49f1801-checkout\""))))) + (add-before 'build 'patch-lib-wfa2-use-system + ;; Replace lib_wfa2 build.rs to link against system + ;; wfa2-lib-static instead of building from submodule. + (lambda _ + (let ((wfa2-build "guix-vendor/rust-lib-wfa2-0.1.0.8859b6a-checkout/build.rs")) + (chmod wfa2-build #o644) + (call-with-output-file wfa2-build + (lambda (port) + (display + (string-append + "fn main() {\n" + " println!(\"cargo:rustc-link-lib=static=wfa\");\n" + " println!(\"cargo:rustc-link-lib=gomp\");\n" + " println!(\"cargo:rustc-link-search=native=" + #$(file-append wfa2-lib-static "/lib") "\");\n" + "}\n") + port)))) + ;; Patch bindings_wfa.rs: cast_signed/cast_unsigned are + ;; unstable until Rust 1.87. + (substitute* + "guix-vendor/rust-lib-wfa2-0.1.0.8859b6a-checkout/src/bindings_wfa.rs" + (("u32::cast_signed\\(self\\._bitfield_1\\.get\\(0usize, 24u8\\) as u32\\)") + "((self._bitfield_1.get(0usize, 24u8) as u32) as i32)") + (("u32::cast_signed\\(<") + "((<") + ((" \\) as u32\\)") + " ) as u32) as i32)") + (("i32::cast_unsigned\\(val\\)") + "(val as u32)") + (("i32::cast_unsigned\\(_flags2\\)") + "(_flags2 as u32)"))))))) + (native-inputs (list pkg-config cmake-minimal clang)) + (inputs (cons* htslib + wfa2-lib-static + zlib + libdeflate + (list zstd "lib") + (cargo-inputs 'cigzip + #:module '(gn packages pangenome-rust)))) + (home-page "https://github.com/AndreaGuarracino/cigzip") + (synopsis "Compressed alignment representation using tracepoints") + (description "cigzip converts between CIGAR strings and tracepoint +representations for efficient alignment storage, using adaptive tracepoints +that segment based on local alignment complexity.") + (license license:expat)))) + (define-public gfalook (let ((commit "5199d77ecc4980b181177c16b94f6e56c0d06e4c") (revision "1")) @@ -1371,6 +1482,7 @@ between sequences.") (list bandage-ng bedtools bwa-mem2 + cigzip cosigt fastga-rs gafpack |
