diff options
author | Efraim Flashner | 2021-07-11 16:50:29 +0300 |
---|---|---|
committer | Efraim Flashner | 2021-07-11 16:52:59 +0300 |
commit | 6b7394db635356894b563ed1300f9be5184a661b (patch) | |
tree | ba0b7b34ce5fab113b8d85f957a65f1424d81bd4 | |
parent | ac3535858a2447a92b024835415060947be83252 (diff) | |
download | guix-bioinformatics-6b7394db635356894b563ed1300f9be5184a661b.tar.gz |
gn: Add rtg-tools
* gn/packages/java.scm (rtg-tools): New variable.
* gn/packages/bioinformatics (hap.py)[native-inputs]: Remove field.
[inputs]: Add rtg-tools.
[arguments]: Replace rtg-tools implementation.
-rw-r--r-- | gn/packages/bioinformatics.scm | 32 | ||||
-rw-r--r-- | gn/packages/java.scm | 81 |
2 files changed, 86 insertions, 27 deletions
diff --git a/gn/packages/bioinformatics.scm b/gn/packages/bioinformatics.scm index 9e63a26..bb11987 100644 --- a/gn/packages/bioinformatics.scm +++ b/gn/packages/bioinformatics.scm @@ -15,6 +15,7 @@ #:use-module (guix build-system trivial) #:use-module (guix build-system waf) #:use-module (gnu packages) + #:use-module (gn packages java) #:use-module (gn packages python) #:use-module (gn packages twint) #:use-module (gnu packages algebra) @@ -2060,20 +2061,12 @@ cases include: #t))) (add-after 'fix-build 'insert-rtg-tools (lambda* (#:key inputs #:allow-other-keys) - (let ((rtg-tools (assoc-ref inputs "rtg-tools"))) - (mkdir "external/libexec") - (invoke "unzip" "-j" rtg-tools - "rtg-tools-3.12.1/rtg" - "rtg-tools-3.12.1/RTG.jar" - "rtg-tools-3.12.1/README.txt" - "rtg-tools-3.12.1/LICENSE.txt" - "rtg-tools-3.12.1/third-party/gzipfix.jar" - "-d" "external/libexec/rtg-tools-install") - (mkdir "external/libexec/rtg-tools-install/third-party") - (rename-file "external/libexec/rtg-tools-install/gzipfix.jar" - "external/libexec/rtg-tools-install/third-party/gzipfix.jar") + (let ((rtg-tools (assoc-ref inputs "rtg-tools")) + (dest "external/libexec/rtg-tools-install")) + (mkdir-p dest) + (copy-recursively rtg-tools dest) (copy-file "external/rtg.cfg" - "external/libexec/rtg-tools-install/rtg.cfg") + (string-append dest "/rtg.cfg")) #t))) (replace 'configure (lambda* (#:key outputs (configure-flags '()) (out-of-source? #t) @@ -2155,18 +2148,6 @@ cases include: ,(string-append samtools "/bin"))))) (find-files (string-append out "/bin") "\\.py$")) #t)))))) - (native-inputs - `(("rtg-tools" - ;; When updating this package also update the insert-rtg-tools phase. - ;; This bundled software is bsd-2 licensed. - ,(origin - (method url-fetch) - (uri (string-append "https://github.com/RealTimeGenomics/rtg-tools" - "/releases/download/3.12.1" - "/rtg-tools-3.12.1-nojre.zip")) - (sha256 - (base32 "1an4axkrj28br09xpj9g0a6k5hrx1cx4wcldrryvj6a0ljqqrz2y")))) - ("unzip" ,unzip))) (inputs `(("bcftools" ,bcftools) ("boost" ,boost-static) ; has to be boost-static @@ -2179,6 +2160,7 @@ cases include: ("python2-pandas" ,python2-pandas) ("python2-pysam" ,python2-pysam) ("python2-scipy" ,python2-scipy) + ("rtg-tools" ,rtg-tools) ("samtools" ,samtools) ("zlib" ,zlib))) (home-page "https://github.com/Illumina/hap.py") diff --git a/gn/packages/java.scm b/gn/packages/java.scm index 6d835b1..23b59be 100644 --- a/gn/packages/java.scm +++ b/gn/packages/java.scm @@ -28,12 +28,14 @@ #:use-module (gnu packages) #:use-module (gnu packages autotools) #:use-module (gnu packages bioinformatics) + #:use-module (gnu packages certs) #:use-module (gnu packages compression) #:use-module (gnu packages gcc) + #:use-module (gnu packages icu4c) #:use-module (gnu packages java) + #:use-module (gnu packages java-compression) #:use-module (gnu packages perl) - #:use-module (gnu packages certs) - ) + #:use-module (srfi srfi-1)) ;; ---------------------------------------------------------------------------- ;; WORKING PACKAGES @@ -297,3 +299,78 @@ comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project's build, reporting and documentation from a central piece of information.") (license license:asl2.0))) + +;; TODO: Remove bundled jars from buildLib, lib, testLib and javascript +(define-public rtg-tools + (package + (name "rtg-tools") + (version "3.11") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/RealTimeGenomics/rtg-tools") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "13fjhhcjgnynxscaymkn3rpdciplbg2m2qmihc7fxsylgn4m6gxk")))) + (build-system ant-build-system) + (arguments + `(#:build-target "zip-nojre" + #:test-target "runalltests" + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'adjust-source + (lambda _ + (substitute* "build.xml" + (("\"git\"") "\"echo\"") + (("\\$\\{vcs\\.cmd\\.out\\}") "${product.version}") + (("\\$\\{build\\.time\\}") "1970-01-01") + (("-\\$\\{rtg\\.vcs\\.commit\\.revision\\}") "")) + #t)) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (pkg (string-append ,name "-" ,version))) + (install-file (string-append "dist/" pkg "-nojre.zip") + out) + (with-directory-excursion out + (invoke "unzip" (string-append pkg "-nojre.zip")) + (copy-recursively (string-append pkg "/") ".") + (delete-file-recursively pkg) + (delete-file (string-append pkg "-nojre.zip"))) + #t))) + (delete 'generate-jar-indices)))) ; manually installed + (inputs + `(("java-commons-collections" ,java-commons-collections) + ("java-commons-compress" ,java-commons-compress) + ("java-commons-lang" ,java-commons-lang) + ;("java-graal-sdk" ,java-graal-sdk) + ;("java-gzipfix" ,java-gzipfix) + ;("java-htsjdk" ,java-sam-rtg) + ("java-icu4j" ,java-icu4j) + ;("java-js" ,java-js) + ;("java-js-scriptengine" ,java-js-scriptengine) + ;("java-json-simple" ,java-json-simple) + ;("java-regex" ,java-regex) + ;("java-rplot" ,java-rplot) + ("java-snappy" ,java-snappy) + ;("java-truffle-api" ,java-truffle-api) + ;("java-velocity" ,java-velocity) + ;("java-velocity-tools-generic" ,java-velocity-tools-generic) + )) + (native-inputs + `(;("java-findbugs-annotations" ,java-findbugs-annotations) + ;("java-findbugs-jsr305" ,java-findbugs-jsr305) + ;("java-jumble-annotations" ,java-jumble-annotations) + ;; for tests + ("java-hamcrest-core" ,java-hamcrest-core) + ("java-junit" ,java-junit) + ;("java-spelling" ,java-spelling) + ("unzip" ,unzip))) + (home-page "https://github.com/RealTimeGenomics/rtg-tools/") + (synopsis "Utilities for accurate VCF comparison and manipulation") + (description "RTG Tools is a subset of RTG Core that includes several useful +utilities for dealing with VCF files and sequence data. Probably the most +interesting is the @code{vcfeval} command which performs sophisticated +comparison of VCF files.") + (license license:bsd-2))) |