unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] Add diamond
@ 2015-06-17  1:56 Ben Woodcroft
  2015-06-17  4:13 ` Mark H Weaver
  2015-06-17  4:54 ` Mark H Weaver
  0 siblings, 2 replies; 5+ messages in thread
From: Ben Woodcroft @ 2015-06-17  1:56 UTC (permalink / raw)
  To: guix-devel@gnu.org

[-- Attachment #1: Type: text/plain, Size: 3820 bytes --]

Hi,

I'm quite new, so I strongly suspect there might be fixups required, but 
it works on my box. Well, it works on my setup in an isolated .scm file, 
but I wasn't sure how to test after I had patched bioinformatics.scm 
i.e. I expected the following to work. Thanks, there's a couple more 
patches (and questions..) to submit once I've learned from this one.

ben@u:~/git/guix$ GUIX_PACKAGE_PATH=/home/ben/git/guix guix package -i 
diamond --verbose -K
warning: failed to install locale: Invalid argument
;;; note: source file /home/ben/git/guix/gnu/packages/base.scm
;;;       newer than compiled 
/home/ben/.config/guix/latest/gnu/packages/base.go
;;; note: source file /home/ben/git/guix/gnu/packages/acl.scm
;;;       newer than compiled 
/home/ben/.config/guix/latest/gnu/packages/acl.go
...
guix package: warning: failed to load '(build-aux build-self)':
ERROR: no code for module (build-aux build-self)
guix package: warning: failed to load '(build-aux 
check-available-binaries)': exception thrown: #<condition &message 
[message: "python-disable-ssl-test.patch: patch not found"] 23501e0>
checking final inputs for 'x86_64-linux'...
substitute: warning: failed to install locale: Invalid argument
checking final inputs for 'i686-linux'...
checking final inputs for 'mips64el-linux'...
guix package: warning: failed to load '(build-aux 
check-final-inputs-self-contained)':
ERROR: no code for module (build-aux check-final-inputs-self-contained)
guix package: warning: failed to load '(build-aux download)':
guix package: warning: failed to load '(build-aux build-self)':
ERROR: Wrong number of arguments to #<procedure display-error (_ _ _ _ _ _)>
guix package: warning: failed to load '(build-aux 
check-available-binaries)': exception thrown: #<condition &message 
[message: "python-disable-ssl-test.patch: patch not found"] 689fda0>
guix package: warning: failed to load '(build-aux 
check-final-inputs-self-contained)':
ERROR: no code for module (build-aux check-final-inputs-self-contained)
guix package: warning: failed to load '(build-aux download)':
Backtrace:
In ice-9/boot-9.scm:
1724: 19 [%start-stack load-stack ...]
1729: 18 [#<procedure 13aeea0 ()>]
In unknown file:
    ?: 17 [primitive-load "/usr/local/bin/guix"]
In guix/ui.scm:
1015: 16 [run-guix-command package "-i" "diamond" "--verbose" "-K"]
In ice-9/boot-9.scm:
  157: 15 [catch srfi-34 #<procedure 404b3a0 at guix/ui.scm:377:2 ()> ...]
  157: 14 [catch system-error ...]
In guix/scripts/package.scm:
1045: 13 [#<procedure 4378f30 at guix/scripts/package.scm:1034:4 ()>]
  904: 12 [process-actions (# # # # ...)]
  656: 11 [options->installable (# # # # ...) #<<manifest> entries: #>]
In srfi/srfi-1.scm:
  664: 10 [filter-map #<procedure 40432a0 at 
guix/scripts/package.scm:656:16 (expr)> ...]
In guix/scripts/package.scm:
  662: 9 [#<procedure 40432a0 at guix/scripts/package.scm:656:16 (expr)> #]
  347: 8 [specification->package+output "diamond" "out"]
In gnu/packages.scm:
  259: 7 [find-best-packages-by-name "diamond" #f]
In guix/utils.scm:
  428: 6 [#<procedure 1d80ba0 at guix/utils.scm:424:4 args>]
In gnu/packages.scm:
  208: 5 [fold-packages #<procedure 1ac62a0 at gnu/packages.scm:241:20 
(p r)> #]
In srfi/srfi-1.scm:
  481: 4 [fold-right #<procedure 1ac6740 at gnu/packages.scm:179:14 
(spec result)> ...]
In gnu/packages.scm:
  182: 3 [#<procedure 1ac6740 at gnu/packages.scm:179:14 (spec result)> 
"/home/ben/git/guix" ...]
In srfi/srfi-1.scm:
  664: 2 [filter-map #<procedure 28823a0 at gnu/packages.scm:162:14 
(file)> #]
In gnu/packages.scm:
  170: 1 [#<procedure 68bea80 at gnu/packages.scm:168:20 args> 
match-error ...]
In unknown file:
    ?: 0 [display-error #f #<output: file /dev/pts/20> ...]

ERROR: In procedure display-error:
ERROR: Wrong number of arguments to #<procedure display-error (_ _ _ _ _ _)>


[-- Attachment #2: 0001-gnu-Add-diamond.patch --]
[-- Type: text/x-patch, Size: 2732 bytes --]

From e24f4de21ee3c367c38e431626f4796795eb9e18 Mon Sep 17 00:00:00 2001
From: Ben Woodcroft <donttrustben@gmail.com>
Date: Wed, 17 Jun 2015 11:49:27 +1000
Subject: [PATCH] gnu: Add diamond.

* gnu/packages/bioinformatics.scm (diamond): New variable.
---
 gnu/packages/bioinformatics.scm | 46 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 0d8a6d5..94db812 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -28,6 +28,7 @@
   #:use-module (guix build-system python)
   #:use-module (guix build-system trivial)
   #:use-module (gnu packages)
+  #:use-module (gnu packages algebra)
   #:use-module (gnu packages base)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages compression)
@@ -615,6 +616,51 @@ file formats including SAM/BAM, Wiggle/BigWig, BED, GFF/GTF, VCF.")
 other types of unwanted sequence from high-throughput sequencing reads.")
     (license license:expat)))
 
+(define-public diamond
+  (package
+    (name "diamond")
+    (version "0.7.9")
+    (source (origin
+              (method url-fetch)
+              (uri
+               (string-append
+                "https://github.com/bbuchfink/diamond/archive/v" version ".tar.gz"))
+              (sha256
+               (base32
+                "0hfkcfv9f76h5brbyw9fyvmc0l9cmbsxrcdqk0fa9xv82zj47p15"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:tests? #f ;no "check" target
+		#:phases
+		(alist-cons-after
+		 'unpack 'enter-source-dir
+		 (lambda _ (chdir "src"))
+		 (alist-replace
+		  'install
+		  (lambda* (#:key outputs #:allow-other-keys)
+			   (let ((bin (string-append
+				       (assoc-ref outputs "out") "/bin")))
+			     (mkdir-p bin)
+			     (copy-file "../bin/diamond" (string-append bin "/diamond"))))
+		  (alist-delete 'configure %standard-phases)))))
+    (native-inputs
+     `(("bc" ,bc)))
+    (inputs
+     `(("boost" ,boost)
+       ("zlib" ,zlib)))
+    (home-page "https://github.com/bbuchfink/diamond")
+    (synopsis "Accelerated BLAST compatible local sequence aligner")
+    (description
+     "DIAMOND is a BLAST-compatible local aligner for mapping protein and
+translated DNA query sequences against a protein reference database (BLASTP
+and BLASTX alignment mode). The speedup over BLAST is up to 20,000 on short
+reads at a typical sensitivity of 90-99% relative to BLAST depending on the
+data and settings.")
+    (license (license:non-copyleft (string-append "https://github.com/bbuchfink"
+						  "/diamond/blob/v"
+						  version
+						  "/src/COPYING")))))
+
 (define-public edirect
   (package
     (name "edirect")
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-06-17 23:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-17  1:56 [PATCH] Add diamond Ben Woodcroft
2015-06-17  4:13 ` Mark H Weaver
2015-06-17  4:54 ` Mark H Weaver
2015-06-17  9:25   ` Ben Woodcroft
2015-06-17 23:48     ` Mark H Weaver

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).