From: Ben Woodcroft <donttrustben@gmail.com>
To: Guix-devel@gnu.org
Subject: [PATCH] gnu: Add krona-tools.
Date: Mon, 25 Apr 2016 13:23:06 +1000 [thread overview]
Message-ID: <1461554586-17735-2-git-send-email-donttrustben@gmail.com> (raw)
In-Reply-To: <1461554586-17735-1-git-send-email-donttrustben@gmail.com>
* gnu/packages/web.scm (krona-tools): New variable.
---
gnu/packages/web.scm | 96 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 96 insertions(+)
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 58de65c..a6279c8 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -10,6 +10,7 @@
;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
;;; Copyright © 2016 Jelle Licht <jlicht@fsfe.org>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -52,6 +53,7 @@
#:use-module (gnu packages icu4c)
#:use-module (gnu packages lua)
#:use-module (gnu packages base)
+ #:use-module (gnu packages perl)
#:use-module (gnu packages python)
#:use-module (gnu packages pcre)
#:use-module (gnu packages pkg-config)
@@ -270,6 +272,100 @@ easily construct JSON objects in C, output them as JSON formatted strings and
parse JSON formatted strings back into the C representation of JSON objects.")
(license l:x11)))
+(define-public krona-tools
+ (package
+ (name "krona-tools")
+ (version "2.6.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/marbl/Krona/releases/download/v"
+ version "/KronaTools-" version ".tar"))
+ (sha256
+ (base32
+ "1fj5mf6wbwz7v74n2safbw7fpw32fik19vf0wdbc2srn82i8fiwz"))))
+ (build-system perl-build-system)
+ (arguments
+ `(#:tests? #f ; no tests
+ #:phases
+ (modify-phases %standard-phases
+ ;; There is no configure or build steps.
+ (delete 'configure)
+ (replace 'build
+ ;; Remove 'use lib' statements from scripts as PERL5LIB is set
+ ;; correctly during installation.
+ (lambda _
+ (for-each
+ (lambda (executable)
+ (display executable)(display "\n")
+ (substitute* executable
+ (("use lib \\(`ktGetLibPath`\\);") "")))
+ (find-files "scripts/" ".*"))
+ #t))
+ ;; Install script "install.pl" expects the build directory to remain
+ ;; after installation, creating symlinks etc., so re-implement it
+ ;; here.
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((bin (string-append (assoc-ref outputs "out") "/bin"))
+ (perl (string-append (assoc-ref outputs "out")
+ "/lib/perl5/site_perl"))
+ (share (string-append
+ (assoc-ref outputs "out") "/share/krona-tools")))
+ (mkdir-p bin)
+ (for-each
+ (lambda (script)
+ (let* ((executable (string-append "scripts/" script ".pl")))
+ ;; Prefix executables with 'kt' as install script does.
+ (copy-file executable (string-append bin "/kt" script))))
+ '("ClassifyBLAST"
+ "GetContigMagnitudes"
+ "GetTaxIDFromGI"
+ "ImportBLAST"
+ "ImportDiskUsage"
+ "ImportEC"
+ "ImportFCP"
+ "ImportGalaxy"
+ "ImportKrona"
+ "ImportMETAREP-BLAST"
+ "ImportMETAREP-EC"
+ "ImportMGRAST"
+ "ImportPhymmBL"
+ "ImportRDP"
+ "ImportRDPComparison"
+ "ImportTaxonomy" ;
+ "ImportText"
+ "ImportXML"))
+ (mkdir-p share)
+ (copy-recursively "data" (string-append share "/data"))
+ (copy-recursively "img" (string-append share "/img"))
+ (copy-recursively "taxonomy" (string-append share "/taxonomy"))
+ (substitute* '("lib/KronaTools.pm")
+ (("taxonomyDir = \".libPath/../taxonomy\"")
+ (string-append "taxonomyDir = \"" share "/taxonomy\"")))
+ (install-file "lib/KronaTools.pm" perl))))
+ (add-after 'install 'wrap-program
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (path (getenv "PERL5LIB")))
+ (for-each
+ (lambda (executable)
+ (wrap-program executable
+ `("PERL5LIB" ":" prefix
+ (,(string-append out "/lib/perl5/site_perl")))))
+ (find-files (string-append out "/bin/") ".*"))))))))
+ (inputs
+ `(("perl" ,perl)))
+ (home-page "https://github.com/marbl/Krona/wiki")
+ (synopsis "Hierarchical data exploration with zoomable HTML5 pie charts")
+ (description
+ "Krona is a flexible tool for exploring the relative proportions of
+hierarchical data, such as metagenomic classifications, using a radial,
+space-filling display. It is implemented using HTML5 and JavaScript, allowing
+charts to be explored locally or served over the Internet, requiring only a
+current version of any major web browser.")
+ (license l:bsd-3)))
+
(define-public rapidjson
(package
(name "rapidjson")
--
2.5.0
next prev parent reply other threads:[~2016-04-25 3:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-25 3:23 [PATCH] Add krona-tools Ben Woodcroft
2016-04-25 3:23 ` Ben Woodcroft [this message]
2016-04-25 15:18 ` Thompson, David
2016-04-26 9:58 ` Ludovic Courtès
2016-05-18 12:29 ` Ben Woodcroft
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1461554586-17735-2-git-send-email-donttrustben@gmail.com \
--to=donttrustben@gmail.com \
--cc=Guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).