diff options
author | Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> | 2017-03-06 12:17:49 +0100 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2017-03-10 10:13:59 +0100 |
commit | 5ded35d89d33a58294956c4a6c86cfb2fc7c7924 (patch) | |
tree | 9b288dc642d8f3bfdab45d1e4d1bfcf85c061c90 | |
parent | fc1428d29522fbaf9d05b79fb3f9a059225f768e (diff) | |
download | guix-5ded35d89d33a58294956c4a6c86cfb2fc7c7924.tar.gz |
gnu: Add sambamba.
* gnu/packages/bioinformatics.scm (htslib-for-sambamba, sambamba): New variables.
-rw-r--r-- | gnu/packages/bioinformatics.scm | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index 7bf39c6b03..b6f753ef0a 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -63,6 +63,7 @@ #:use-module (gnu packages image) #:use-module (gnu packages imagemagick) #:use-module (gnu packages java) + #:use-module (gnu packages ldc) #:use-module (gnu packages linux) #:use-module (gnu packages logging) #:use-module (gnu packages machine-learning) @@ -8574,3 +8575,99 @@ identifications while not exceeding a specified false discovery rate. It also contains a number of utilities to explore the MS/MS results and assess missed and irregular enzymatic cleavages, mass measurement accuracy, etc.") (license license:artistic2.0))) + +(define htslib-for-sambamba + (let ((commit "2f3c3ea7b301f9b45737a793c0b2dcf0240e5ee5")) + (package + (inherit htslib) + (name "htslib-for-sambamba") + (version (string-append "1.3.1-1." (string-take commit 9))) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/lomereiter/htslib.git") + (commit commit))) + (file-name (string-append "htslib-" version "-checkout")) + (sha256 + (base32 + "0g38g8s3npr0gjm9fahlbhiskyfws9l5i0x1ml3rakzj7az5l9c9")))) + (arguments + (substitute-keyword-arguments (package-arguments htslib) + ((#:phases phases) + `(modify-phases ,phases + (add-before 'configure 'bootstrap + (lambda _ + (zero? (system* "autoreconf" "-vif")))))))) + (native-inputs + `(("autoconf" ,autoconf) + ("automake" ,automake) + ,@(package-native-inputs htslib)))))) + +(define-public sambamba + (package + (name "sambamba") + (version "0.6.5") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/lomereiter/sambamba/" + "archive/v" version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "17076gijd65a3f07zns2gvbgahiz5lriwsa6dq353ss3jl85d8vy")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; there is no test target + #:make-flags + '("D_COMPILER=ldc2" + ;; Override "--compiler" flag only. + "D_FLAGS=--compiler=ldc2 -IBioD -g -d" + "sambamba-ldmd2-64") + #:phases + (modify-phases %standard-phases + (delete 'configure) + (add-after 'unpack 'place-biod + (lambda* (#:key inputs #:allow-other-keys) + (copy-recursively (assoc-ref inputs "biod") "BioD") + #t)) + (add-after 'unpack 'unbundle-prerequisites + (lambda _ + (substitute* "Makefile" + ((" htslib-static lz4-static") "")) + #t)) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin"))) + (mkdir-p bin) + (install-file "build/sambamba" bin) + #t)))))) + (native-inputs + `(("ldc" ,ldc) + ("rdmd" ,rdmd) + ("biod" + ,(let ((commit "1248586b54af4bd4dfb28ebfebfc6bf012e7a587")) + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/biod/BioD.git") + (commit commit))) + (file-name (string-append "biod-" + (string-take commit 9) + "-checkout")) + (sha256 + (base32 + "1m8hi1n7x0ri4l6s9i0x6jg4z4v94xrfdzp7mbizdipfag0m17g3"))))))) + (inputs + `(("lz4" ,lz4) + ("htslib" ,htslib-for-sambamba))) + (home-page "http://lomereiter.github.io/sambamba") + (synopsis "Tools for working with SAM/BAM data") + (description "Sambamba is a high performance modern robust and +fast tool (and library), written in the D programming language, for +working with SAM and BAM files. Current parallelised functionality is +an important subset of samtools functionality, including view, index, +sort, markdup, and depth.") + (license license:gpl2+))) |