about summary refs log tree commit diff
diff options
context:
space:
mode:
authorpjotrp2026-04-16 08:34:51 +0200
committerpjotrp2026-04-16 08:34:51 +0200
commit455c9469b95ad43d643765b1031394d3efdd6098 (patch)
tree159d55ccd0bee392d5235ee381bae19b84dadecc
parent8dad81db51d55fc1681366fe78646927bec4e3d9 (diff)
downloadguix-bioinformatics-455c9469b95ad43d643765b1031394d3efdd6098.tar.gz
Added (pangenomes) rtg-tools
-rw-r--r--gn/packages/pangenome.scm59
1 files changed, 59 insertions, 0 deletions
diff --git a/gn/packages/pangenome.scm b/gn/packages/pangenome.scm
index 4d99cf5..b83455b 100644
--- a/gn/packages/pangenome.scm
+++ b/gn/packages/pangenome.scm
@@ -7,6 +7,7 @@
   #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module (guix gexp)
+  #:use-module (guix build-system ant)
   #:use-module (guix build-system cargo)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system copy)
@@ -43,6 +44,7 @@
   #:use-module (gnu packages elf)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages haskell-xyz)
+  #:use-module (gnu packages java)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages protobuf)
   #:use-module (gnu packages qt)
@@ -1234,6 +1236,62 @@ supporting pangenomic applications following the PanSN hierarchical naming
 specification.")
     (license license:expat))))
 
+(define-public rtg-tools
+  (package
+    (name "rtg-tools")
+    (version "3.13")
+    (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 "0smykfqd82zacxhpc16g4vlw4lm4jrakjnkzka811s6p16pcmz5w"))))
+    (build-system ant-build-system)
+    (inputs
+     `(("bash-minimal" ,bash-minimal)
+       ("jdk" ,openjdk11)))
+    (arguments
+     (list
+      #:jdk openjdk11
+      #:build-target "rtg-tools.jar"
+      #:make-flags
+      #~(list (string-append "-Drtg.vcs.commit.revision=" #$version))
+      #:tests? #f  ; tests require internet access and are slow
+      #:phases
+      #~(modify-phases %standard-phases
+          ;; RPlot.jar is corrupt/old format and fails jar indexing
+          (delete 'generate-jar-indices)
+          (replace 'install
+            (lambda _
+              (let* ((out #$output)
+                     (share (string-append out "/share/java/rtg-tools"))
+                     (bin (string-append out "/bin"))
+                     (bash #$(this-package-input "bash-minimal"))
+                     (jdk #$(this-package-input "jdk")))
+                (mkdir-p share)
+                (mkdir-p bin)
+                ;; Install the main jar
+                (install-file "build/rtg-tools.jar" share)
+                ;; Install bundled jar dependencies
+                (for-each (lambda (jar) (install-file jar share))
+                          (find-files "lib" "\\.jar$"))
+                ;; Install a wrapper script
+                (call-with-output-file (string-append bin "/rtg")
+                  (lambda (port)
+                    (format port "#!~a/bin/bash
+CLASSPATH=\"~a/*\"
+exec ~a/bin/java -cp \"$CLASSPATH\" com.rtg.RtgTools \"$@\"
+" bash share jdk)))
+                (chmod (string-append bin "/rtg") #o755)))))))
+    (home-page "https://github.com/RealTimeGenomics/rtg-tools")
+    (synopsis "Tools for VCF file manipulation and comparison")
+    (description "RTG Tools includes utilities for dealing with VCF files and
+sequence data including @code{vcfeval} for variant comparison, sequence data
+simulators, and format conversion utilities.")
+    (license license:bsd-2)))
+
 (define-public gfalook
   (let ((commit "5199d77ecc4980b181177c16b94f6e56c0d06e4c")
         (revision "1"))
@@ -1371,6 +1429,7 @@ kfilt, miniprot, pangene, wally, and vcfbub.")
            python
            python-igraph
            python-pycairo
+           rtg-tools
            r-minimal
            r-ape
            r-data-table