gnu: bismark: Update to 0.20.1.

* gnu/packages/bioinformatics.scm (bismark): Update to 0.20.1.
[source]: Remove obsolete snippet.
[arguments]: Add build phase "replace-plotly.js" and add requried modules;
adjust "install" phase.
[inputs]: Add perl-carp and perl-getopt-long.
[native-inputs]: Add plotly.js and uglify-js.
This commit is contained in:
Ricardo Wurmus 2019-03-06 16:24:41 +01:00
parent 1564e0fefa
commit 38502a7d13
No known key found for this signature in database
GPG Key ID: 197A5888235FACAC

View File

@ -84,6 +84,7 @@
#:use-module (gnu packages jemalloc) #:use-module (gnu packages jemalloc)
#:use-module (gnu packages dlang) #:use-module (gnu packages dlang)
#:use-module (gnu packages linux) #:use-module (gnu packages linux)
#:use-module (gnu packages lisp)
#:use-module (gnu packages logging) #:use-module (gnu packages logging)
#:use-module (gnu packages machine-learning) #:use-module (gnu packages machine-learning)
#:use-module (gnu packages man) #:use-module (gnu packages man)
@ -11673,7 +11674,7 @@ Browser.")
(define-public bismark (define-public bismark
(package (package
(name "bismark") (name "bismark")
(version "0.19.1") (version "0.20.1")
(source (source
(origin (origin
(method git-fetch) (method git-fetch)
@ -11683,18 +11684,25 @@ Browser.")
(file-name (string-append name "-" version "-checkout")) (file-name (string-append name "-" version "-checkout"))
(sha256 (sha256
(base32 (base32
"0yb5l36slwg02fp4b1jdlplgljcsxgqfzvzihzdnphd87dghcc84")) "0xchm3rgilj6vfjnyzfzzymfd7djr64sbrmrvs3njbwi66jqbzw9"))))
(snippet
'(begin
;; highcharts.js is non-free software. The code is available under
;; CC-BY-NC or proprietary licenses only.
(delete-file "bismark_sitrep/highcharts.js")
#t))))
(build-system perl-build-system) (build-system perl-build-system)
(arguments (arguments
`(#:tests? #f ; there are no tests `(#:tests? #f ; there are no tests
#:modules ((guix build utils)
(ice-9 popen)
(srfi srfi-26)
(guix build perl-build-system))
#:phases #:phases
(modify-phases %standard-phases (modify-phases %standard-phases
;; The bundled plotly.js is minified.
(add-after 'unpack 'replace-plotly.js
(lambda* (#:key inputs #:allow-other-keys)
(let* ((file (assoc-ref inputs "plotly.js"))
(installed "plotly/plotly.js"))
(let ((minified (open-pipe* OPEN_READ "uglify-js" file)))
(call-with-output-file installed
(cut dump-port minified <>))))
#t))
(delete 'configure) (delete 'configure)
(delete 'build) (delete 'build)
(replace 'install (replace 'install
@ -11713,10 +11721,11 @@ Browser.")
"deduplicate_bismark" "deduplicate_bismark"
"filter_non_conversion" "filter_non_conversion"
"bam2nuc" "bam2nuc"
"bismark2summary"))) "bismark2summary"
"NOMe_filtering")))
(substitute* "bismark2report" (substitute* "bismark2report"
(("\\$RealBin/bismark_sitrep") (("\\$RealBin/plotly")
(string-append share "/bismark_sitrep"))) (string-append share "/plotly")))
(mkdir-p share) (mkdir-p share)
(mkdir-p docdir) (mkdir-p docdir)
(mkdir-p bin) (mkdir-p bin)
@ -11725,8 +11734,8 @@ Browser.")
(for-each (lambda (file) (install-file file docdir)) (for-each (lambda (file) (install-file file docdir))
docs) docs)
(copy-recursively "Docs/Images" (string-append docdir "/Images")) (copy-recursively "Docs/Images" (string-append docdir "/Images"))
(copy-recursively "bismark_sitrep" (copy-recursively "plotly"
(string-append share "/bismark_sitrep")) (string-append share "/plotly"))
;; Fix references to gunzip ;; Fix references to gunzip
(substitute* (map (lambda (file) (substitute* (map (lambda (file)
@ -11737,7 +11746,18 @@ Browser.")
"/bin/gunzip -c"))) "/bin/gunzip -c")))
#t)))))) #t))))))
(inputs (inputs
`(("gzip" ,gzip))) `(("gzip" ,gzip)
("perl-carp" ,perl-carp)
("perl-getopt-long" ,perl-getopt-long)))
(native-inputs
`(("plotly.js"
,(origin
(method url-fetch)
(uri (string-append "https://raw.githubusercontent.com/plotly/plotly.js/"
"v1.39.4/dist/plotly.js"))
(sha256
(base32 "138mwsr4nf5qif4mrxx286mpnagxd1xwl6k8aidrjgknaqg88zyr"))))
("uglify-js" ,uglify-js)))
(home-page "http://www.bioinformatics.babraham.ac.uk/projects/bismark/") (home-page "http://www.bioinformatics.babraham.ac.uk/projects/bismark/")
(synopsis "Map bisulfite treated sequence reads and analyze methylation") (synopsis "Map bisulfite treated sequence reads and analyze methylation")
(description "Bismark is a program to map bisulfite treated sequencing (description "Bismark is a program to map bisulfite treated sequencing