diff options
| author | Ricardo Wurmus <rekado@elephly.net> | 2024-01-25 12:59:55 +0100 |
|---|---|---|
| committer | Ricardo Wurmus <rekado@elephly.net> | 2024-01-25 13:00:22 +0100 |
| commit | 4a6093ca3b0f1d43ff9a470d29cc2cab4a1dbd06 (patch) | |
| tree | 469fa7df55d379e0d3460971bf203cad4e164ff1 | |
| parent | b287b3be1da40ccf61559d0575ddc1958f60c625 (diff) | |
bioinformatics: Add rsat.
* guix-science/packages/bioinformatics.scm (rsat): New variable.
| -rw-r--r-- | guix-science/packages/bioinformatics.scm | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/guix-science/packages/bioinformatics.scm b/guix-science/packages/bioinformatics.scm index cbdb356..a56e921 100644 --- a/guix-science/packages/bioinformatics.scm +++ b/guix-science/packages/bioinformatics.scm | |||
| @@ -511,6 +511,100 @@ communication (CCC). It achieves this without requiring subsampling | |||
| 511 | or aggregation.") | 511 | or aggregation.") |
| 512 | (license license:expat)))) | 512 | (license license:expat)))) |
| 513 | 513 | ||
| 514 | ;; This package contains some minified JavaScript. | ||
| 515 | (define-public rsat | ||
| 516 | (package | ||
| 517 | (name "rsat") | ||
| 518 | (version "2022-06-26") | ||
| 519 | (source (origin | ||
| 520 | (method git-fetch) | ||
| 521 | (uri (git-reference | ||
| 522 | (url "https://github.com/rsa-tools/rsat-code") | ||
| 523 | (commit version))) | ||
| 524 | (file-name (git-file-name name version)) | ||
| 525 | (sha256 | ||
| 526 | (base32 | ||
| 527 | "1ks5bsnbvxv0w77s9zc0hrp6m0g8mdyc07xa4xv58dxs5p6krh4c")))) | ||
| 528 | (build-system gnu-build-system) | ||
| 529 | (arguments | ||
| 530 | (list | ||
| 531 | #:tests? #false ;no test target | ||
| 532 | #:imported-modules `(,@%gnu-build-system-modules | ||
| 533 | (guix build python-build-system)) | ||
| 534 | #:modules '((guix build gnu-build-system) | ||
| 535 | ((guix build python-build-system) #:prefix python:) | ||
| 536 | (guix build utils)) | ||
| 537 | #:phases | ||
| 538 | #~(modify-phases %standard-phases | ||
| 539 | (replace 'configure | ||
| 540 | (lambda _ | ||
| 541 | (let ((share (string-append #$output "/share/rsat"))) | ||
| 542 | ;; Ensure that we can override the target directory | ||
| 543 | (substitute* "perl-scripts/configure_rsat.pl" | ||
| 544 | (("\\$rsat_parent_path = .*;") | ||
| 545 | (string-append "$rsat_parent_path = \"" | ||
| 546 | (dirname share) "\";"))) | ||
| 547 | ;; Patch CFLAGS | ||
| 548 | (substitute* '("contrib/compare-matrices-quick/makefile" | ||
| 549 | "contrib/count-words/Makefile" | ||
| 550 | "contrib/purgatory_c/REA/Makefile" | ||
| 551 | "contrib/purgatory_c/kwalks/src/Makefile" | ||
| 552 | "contrib/retrieve-variation-seq/Makefile" | ||
| 553 | "contrib/variation-scan/Makefile" | ||
| 554 | "src/word-analysis/Makefile") | ||
| 555 | (("CFLAGS ?=") | ||
| 556 | "CFLAGS = -fcommon ")) | ||
| 557 | ;; Don't include the C stuff | ||
| 558 | (substitute* "contrib/count-words/main.c" | ||
| 559 | (("#include \"(count|main|utils).c\"") | ||
| 560 | "")) | ||
| 561 | ;; Override the target directory | ||
| 562 | (setenv "RSAT" share) | ||
| 563 | |||
| 564 | ;; Remove symlinks that would lead us to | ||
| 565 | ;; $out/share/rsat/share/rsat. | ||
| 566 | (for-each delete-file | ||
| 567 | '("share/rsat/perl-scripts" | ||
| 568 | "share/rsat/python-scripts" | ||
| 569 | "share/rsat/bin")) | ||
| 570 | (rename-file "share/rsat/rsat.yaml" "rsat.yaml") | ||
| 571 | |||
| 572 | ;; Target directory must exist | ||
| 573 | (mkdir-p share) | ||
| 574 | (copy-recursively "." share) | ||
| 575 | (invoke "perl" "perl-scripts/configure_rsat.pl")))) | ||
| 576 | (replace 'build | ||
| 577 | (lambda _ | ||
| 578 | (let ((share (string-append #$output "/share/rsat"))) | ||
| 579 | ;; FIXME: this first step is pretty useless, because it | ||
| 580 | ;; creates directories not in the install location but in | ||
| 581 | ;; the build directory. | ||
| 582 | (with-directory-excursion share | ||
| 583 | (invoke "make" "-f" "makefiles/init_rsat.mk" "init") | ||
| 584 | (invoke "make" "-f" "makefiles/init_rsat.mk" "compile_all"))))) | ||
| 585 | (replace 'install | ||
| 586 | (lambda _ | ||
| 587 | (copy-recursively "bin" (string-append #$output "/bin")))) | ||
| 588 | (add-after 'install 'wrap-programs | ||
| 589 | (lambda* (#:key inputs outputs #:allow-other-keys) | ||
| 590 | (let* ((site (python:site-packages inputs outputs)) | ||
| 591 | (pythonpath (getenv "GUIX_PYTHONPATH")) | ||
| 592 | (script (string-append #$output "/bin/rsat"))) | ||
| 593 | (chmod script #o555) | ||
| 594 | (wrap-program script | ||
| 595 | `("GUIX_PYTHONPATH" ":" prefix (,site ,pythonpath))))))))) | ||
| 596 | (inputs | ||
| 597 | (list perl | ||
| 598 | python | ||
| 599 | python-pyyaml)) | ||
| 600 | (native-inputs | ||
| 601 | (list perl rsync)) | ||
| 602 | (home-page "https://rsat.france-bioinformatique.fr/teaching/RSAT_portal.html") | ||
| 603 | (synopsis "Regulatory sequence analysis tools") | ||
| 604 | (description "This package provides a subset of the Regulatory | ||
| 605 | Sequence Analysis Tools (RSAT).") | ||
| 606 | (license license:agpl3+))) | ||
| 607 | |||
| 514 | ;; Seqan 3.0.3 removed a few deprecated features. | 608 | ;; Seqan 3.0.3 removed a few deprecated features. |
| 515 | (define-public seqan-3.0.2 | 609 | (define-public seqan-3.0.2 |
| 516 | (package | 610 | (package |
