gnu: Add sambamba.

* gnu/packages/bioinformatics.scm (htslib-for-sambamba, sambamba): New
variables.
master
Ricardo Wurmus 2017-03-06 12:17:49 +01:00 committed by Ricardo Wurmus
parent fc1428d295
commit 5ded35d89d
No known key found for this signature in database
GPG Key ID: 197A5888235FACAC
1 changed files with 97 additions and 0 deletions

View File

@ -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+)))