* bug? also [PATCH] Add snap-aligner.
@ 2015-12-10 11:33 Ben Woodcroft
2015-12-10 15:54 ` Ricardo Wurmus
2015-12-11 9:39 ` Ludovic Courtès
0 siblings, 2 replies; 5+ messages in thread
From: Ben Woodcroft @ 2015-12-10 11:33 UTC (permalink / raw)
To: guix-devel@gnu.org
[-- Attachment #1: Type: text/plain, Size: 420 bytes --]
Hey,
I tried doing the check for reproducibility
$ ./pre-inst-env guix build --rounds=3 snap-aligner
but it only built once.
$ ./pre-inst-env guix build --check snap-aligner
;;; note: source file /home/ben/git/guix/gnu/packages/bioinformatics.scm
;;; newer than compiled
/home/ben/git/guix/gnu/packages/bioinformatics.go
guix build: error: build failed: unsupported build mode
Did I mess that up?
Thanks,
ben
[-- Attachment #2: 0001-gnu-Add-snap-aligner.patch --]
[-- Type: text/x-patch, Size: 2345 bytes --]
From 6dd854282c75c30b8ae8eb922a2bc65a5be599c0 Mon Sep 17 00:00:00 2001
From: Ben Woodcroft <donttrustben@gmail.com>
Date: Thu, 10 Dec 2015 20:56:52 +1000
Subject: [PATCH] gnu: Add snap-aligner.
* gnu/packages/bioinformatics.scm (snap-aligner): New variable.
---
gnu/packages/bioinformatics.scm | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 35cec1e..836b4fa 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -2792,6 +2792,44 @@ BioPython in a convenient way. Instead of having a big mess of scripts, there
is one that takes arguments.")
(license license:gpl3)))
+(define-public snap-aligner
+ (package
+ (name "snap-aligner")
+ (version "1.0beta.18")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/amplab/snap/archive/v"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1vnsjwv007k1fl1q7d681kbwn6bc66cgw6h16hym6gvyy71qv2ly"))
+ (file-name (string-append name "-" version ".tar.gz"))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (replace 'check (lambda _ (zero? (system* "./unit_tests"))))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin")))
+ (mkdir-p bin)
+ (copy-file "snap-aligner"
+ (string-append bin "/snap-aligner"))
+ (copy-file "SNAPCommand"
+ (string-append bin "/SNAPCommand"))))))))
+ (native-inputs
+ `(("zlib" ,zlib)))
+ (home-page "http://snap.cs.berkeley.edu/")
+ (synopsis "Short read DNA sequence aligner")
+ (description
+ "SNAP is a fast and accurate aligner for short DNA reads. It is
+optimized for modern read lengths of 100 bases or higher, and takes advantage
+of these reads to align data quickly through a hash-based indexing scheme.")
+ (license license:asl2.0)))
+
(define-public star
(package
(name "star")
--
2.5.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: bug? also [PATCH] Add snap-aligner.
2015-12-10 11:33 bug? also [PATCH] Add snap-aligner Ben Woodcroft
@ 2015-12-10 15:54 ` Ricardo Wurmus
2015-12-10 23:41 ` Ben Woodcroft
2015-12-11 9:39 ` Ludovic Courtès
1 sibling, 1 reply; 5+ messages in thread
From: Ricardo Wurmus @ 2015-12-10 15:54 UTC (permalink / raw)
To: Ben Woodcroft; +Cc: guix-devel@gnu.org
Ben Woodcroft <b.woodcroft@uq.edu.au> writes:
> I tried doing the check for reproducibility
> $ ./pre-inst-env guix build --rounds=3 snap-aligner
> but it only built once.
>
> $ ./pre-inst-env guix build --check snap-aligner
> ;;; note: source file /home/ben/git/guix/gnu/packages/bioinformatics.scm
> ;;; newer than compiled
> /home/ben/git/guix/gnu/packages/bioinformatics.go
> guix build: error: build failed: unsupported build mode
>
> Did I mess that up?
Have you restarted the daemon? Is it the latest version of the daemon?
It works for me after restarting the daemon.
> +(define-public snap-aligner
> + (package
> + (name "snap-aligner")
> + (version "1.0beta.18")
> + (source (origin
> + (method url-fetch)
> + (uri (string-append
> + "https://github.com/amplab/snap/archive/v"
> + version ".tar.gz"))
> + (sha256
> + (base32
> + "1vnsjwv007k1fl1q7d681kbwn6bc66cgw6h16hym6gvyy71qv2ly"))
> + (file-name (string-append name "-" version ".tar.gz"))))
Nit pick: I think it’s nicer to have “file-name” right after the
offending “uri” expression.
> + (build-system gnu-build-system)
> + (arguments
> + '(#:phases
> + (modify-phases %standard-phases
> + (delete 'configure)
> + (replace 'check (lambda _ (zero? (system* "./unit_tests"))))
> + (replace 'install
> + (lambda* (#:key outputs #:allow-other-keys)
> + (let* ((out (assoc-ref outputs "out"))
> + (bin (string-append out "/bin")))
> + (mkdir-p bin)
> + (copy-file "snap-aligner"
> + (string-append bin "/snap-aligner"))
> + (copy-file "SNAPCommand"
> + (string-append bin "/SNAPCommand"))))))))
Instead of “copy-file” (which requires repeating the target file name)
you can use this:
(install-file "SNAPCommand" bin)
> + (native-inputs
> + `(("zlib" ,zlib)))
> + (home-page "http://snap.cs.berkeley.edu/")
> + (synopsis "Short read DNA sequence aligner")
> + (description
> + "SNAP is a fast and accurate aligner for short DNA reads. It is
> +optimized for modern read lengths of 100 bases or higher, and takes advantage
> +of these reads to align data quickly through a hash-based indexing scheme.")
> + (license license:asl2.0)))
> +
The rest looks good to me. Thanks!
~~ Ricardo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: bug? also [PATCH] Add snap-aligner.
2015-12-10 15:54 ` Ricardo Wurmus
@ 2015-12-10 23:41 ` Ben Woodcroft
2015-12-11 13:35 ` Ricardo Wurmus
0 siblings, 1 reply; 5+ messages in thread
From: Ben Woodcroft @ 2015-12-10 23:41 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: guix-devel@gnu.org
[-- Attachment #1: Type: text/plain, Size: 1291 bytes --]
Thanks Ricardo.
On 11/12/15 01:54, Ricardo Wurmus wrote:
> Ben Woodcroft <b.woodcroft@uq.edu.au> writes:
>
>> I tried doing the check for reproducibility
>> $ ./pre-inst-env guix build --rounds=3 snap-aligner
>> but it only built once.
>>
>> $ ./pre-inst-env guix build --check snap-aligner
>> ;;; note: source file /home/ben/git/guix/gnu/packages/bioinformatics.scm
>> ;;; newer than compiled
>> /home/ben/git/guix/gnu/packages/bioinformatics.go
>> guix build: error: build failed: unsupported build mode
>>
>> Did I mess that up?
> Have you restarted the daemon? Is it the latest version of the daemon?
> It works for me after restarting the daemon.
I hadn't before, so I thought you were right, but that seems not to make
any difference. I'm now running this daemon version, which I did using
./pre-inst-env make install, then updating the root's profile. I also
had to chown root:root /var/guix/profiles/per-user/root
root@u:~# ls -lh /root/.guix-profile/bin/guix-daemon
lrwxrwxrwx 2 root guix-builder 78 Jan 1 1970
/root/.guix-profile/bin/guix-daemon ->
/gnu/store/9da6v59j0lb9rf7fc559g5f1q1qn8qxg-guix-0.9.0.5c36edc/bin/guix-daemon
I got the same errors as before. Any ideas?
> The rest looks good to me. Thanks!
Thanks for the comments, updated patch attached.
ben
[-- Attachment #2: 0001-gnu-Add-snap-aligner.patch --]
[-- Type: text/x-patch, Size: 2232 bytes --]
From d6ed5bb4ed94c999ba579aa015fa93d970b2f398 Mon Sep 17 00:00:00 2001
From: Ben Woodcroft <donttrustben@gmail.com>
Date: Thu, 10 Dec 2015 20:56:52 +1000
Subject: [PATCH] gnu: Add snap-aligner.
* gnu/packages/bioinformatics.scm (snap-aligner): New variable.
---
gnu/packages/bioinformatics.scm | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 35cec1e..be8b65b 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -2792,6 +2792,42 @@ BioPython in a convenient way. Instead of having a big mess of scripts, there
is one that takes arguments.")
(license license:gpl3)))
+(define-public snap-aligner
+ (package
+ (name "snap-aligner")
+ (version "1.0beta.18")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/amplab/snap/archive/v"
+ version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1vnsjwv007k1fl1q7d681kbwn6bc66cgw6h16hym6gvyy71qv2ly"))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (replace 'check (lambda _ (zero? (system* "./unit_tests"))))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin")))
+ (mkdir-p bin)
+ (install-file "snap-aligner" bin)
+ (install-file "SNAPCommand" bin)))))))
+ (native-inputs
+ `(("zlib" ,zlib)))
+ (home-page "http://snap.cs.berkeley.edu/")
+ (synopsis "Short read DNA sequence aligner")
+ (description
+ "SNAP is a fast and accurate aligner for short DNA reads. It is
+optimized for modern read lengths of 100 bases or higher, and takes advantage
+of these reads to align data quickly through a hash-based indexing scheme.")
+ (license license:asl2.0)))
+
(define-public star
(package
(name "star")
--
2.5.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: bug? also [PATCH] Add snap-aligner.
2015-12-10 11:33 bug? also [PATCH] Add snap-aligner Ben Woodcroft
2015-12-10 15:54 ` Ricardo Wurmus
@ 2015-12-11 9:39 ` Ludovic Courtès
1 sibling, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2015-12-11 9:39 UTC (permalink / raw)
To: Ben Woodcroft; +Cc: guix-devel@gnu.org
Ben Woodcroft <b.woodcroft@uq.edu.au> skribis:
> $ ./pre-inst-env guix build --check snap-aligner
> ;;; note: source file /home/ben/git/guix/gnu/packages/bioinformatics.scm
> ;;; newer than compiled
> /home/ben/git/guix/gnu/packages/bioinformatics.go
> guix build: error: build failed: unsupported build mode
This error indicates that the daemon ‘guix build’ is talking to is too
“old” (that is, more than a week old ;-)) and doesn’t support this build
mode.
It comes from:
http://git.savannah.gnu.org/cgit/guix.git/tree/guix/store.scm#n667
The solution is to build, install, and run the daemon from current
‘master’.
HTH!
Ludo’.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: bug? also [PATCH] Add snap-aligner.
2015-12-10 23:41 ` Ben Woodcroft
@ 2015-12-11 13:35 ` Ricardo Wurmus
0 siblings, 0 replies; 5+ messages in thread
From: Ricardo Wurmus @ 2015-12-11 13:35 UTC (permalink / raw)
To: Ben Woodcroft; +Cc: guix-devel@gnu.org
Ben Woodcroft <b.woodcroft@uq.edu.au> writes:
> Thanks for the comments, updated patch attached.
I made a tiny modification (ended the install phase with #t) and
pushed. Thanks!
~~ Ricardo
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-12-11 13:36 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-10 11:33 bug? also [PATCH] Add snap-aligner Ben Woodcroft
2015-12-10 15:54 ` Ricardo Wurmus
2015-12-10 23:41 ` Ben Woodcroft
2015-12-11 13:35 ` Ricardo Wurmus
2015-12-11 9:39 ` Ludovic Courtès
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.