* [PATCH]: gnu: Add HISAT.
@ 2015-02-09 11:16 Ricardo Wurmus
2015-02-09 23:03 ` Ludovic Courtès
0 siblings, 1 reply; 12+ messages in thread
From: Ricardo Wurmus @ 2015-02-09 11:16 UTC (permalink / raw)
To: Guix-devel
[-- Attachment #1: Type: text/plain, Size: 272 bytes --]
Attached is a patch to add HISAT, another popular read aligner.
I would have really liked to use snippets here for a few static changes
to the sources, but it seems that snippets cannot be used with zip
archives (see my earlier message to the mailing list).
~~ Ricardo
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-HISAT.patch --]
[-- Type: text/x-patch, Size: 4284 bytes --]
From 305768bfef9bf4bc8d57828e27b8439dedd574bd Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Date: Mon, 9 Feb 2015 12:13:26 +0100
Subject: [PATCH] gnu: Add HISAT.
* gnu/packages/bioinformatics.scm (hisat): New variable.
---
gnu/packages/bioinformatics.scm | 77 ++++++++++++++++++++++++++++++++++++++++-
1 file changed, 76 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index c0d1438..425558d 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -29,8 +29,9 @@
#:use-module (gnu packages ncurses)
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
- #:use-module (gnu packages python))
+ #:use-module (gnu packages python)
#:use-module (gnu packages tbb)
+ #:use-module (gnu packages zip))
(define-public bedtools
(package
@@ -181,6 +182,80 @@ supports next-generation sequencing data in fasta/q and csfasta/q format from
Illumina, Roche 454, and the SOLiD platform.")
(license license:gpl3)))
+(define-public hisat
+ (package
+ (name "hisat")
+ (version "0.1.4")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "http://ccb.jhu.edu/software/hisat/downloads/hisat-"
+ version "-beta-source.zip"))
+ (sha256
+ (base32
+ "1k381ydranqxp09yf2y7w1d0chz5d59vb6jchi89hbb0prq19lk5"))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:tests? #f ;no check target
+ #:make-flags '("allall")
+ #:phases
+ (alist-replace
+ 'unpack
+ (lambda* (#:key source #:allow-other-keys)
+ (and (zero? (system* "unzip" source))
+ (chdir "hisat-0.1.4-beta")))
+ (alist-cons-after
+ 'unpack 'patch-sources
+ (lambda _
+ ;; XXX Cannot use snippet because zip files are not supported
+ (substitute* "Makefile"
+ (("^CC = .*$") "CC = gcc")
+ (("^CPP = .*$") "CPP = g++")
+ ;; replace BUILD_HOST and BUILD_TIME for deterministic build
+ (("-DBUILD_HOST=.*") "-DBUILD_HOST=\"\\\"guix\\\"\"")
+ (("-DBUILD_TIME=.*") "-DBUILD_TIME=\"\\\"0\\\"\""))
+ (substitute* '("hisat-build" "hisat-inspect")
+ (("/usr/bin/env") (which "env"))))
+ (alist-replace
+ 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((bin (string-append (assoc-ref outputs "out") "/bin/")))
+ (mkdir-p bin)
+ (for-each (lambda (file)
+ (copy-file file (string-append bin file)))
+ '("hisat"
+ "hisat-build"
+ "hisat-build-s"
+ "hisat-build-l"
+ "hisat-align-s"
+ "hisat-align-l"
+ "hisat-inspect"
+ "hisat-inspect-s"
+ "hisat-inspect-l"
+ "hisat-build-s-debug"
+ "hisat-build-l-debug"
+ "hisat-align-s-debug"
+ "hisat-align-l-debug"
+ "hisat-inspect-s-debug"
+ "hisat-inspect-l-debug"))))
+ (alist-delete 'configure %standard-phases))))))
+ (native-inputs
+ `(("unzip" ,unzip)))
+ (inputs
+ `(("perl" ,perl)
+ ("python" ,python)
+ ("zlib" ,zlib)))
+ (home-page "http://ccb.jhu.edu/software/hisat/index.shtml")
+ (synopsis "Hierarchical indexing for spliced alignment of transcripts")
+ (description
+ "HISAT is a fast and sensitive spliced alignment program for mapping
+RNA-seq reads. In addition to one global FM index that represents a whole
+genome, HISAT uses a large set of small FM indexes that collectively cover the
+whole genome. These small indexes (called local indexes) combined with
+several alignment strategies enable effective alignment of RNA-seq reads, in
+particular, reads spanning multiple exons.")
+ (license license:gpl3)))
+
(define-public samtools
(package
(name "samtools")
--
2.1.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH]: gnu: Add HISAT.
2015-02-09 11:16 [PATCH]: gnu: Add HISAT Ricardo Wurmus
@ 2015-02-09 23:03 ` Ludovic Courtès
2015-02-10 9:42 ` Ricardo Wurmus
2015-02-10 10:24 ` Ricardo Wurmus
0 siblings, 2 replies; 12+ messages in thread
From: Ludovic Courtès @ 2015-02-09 23:03 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: Guix-devel
Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> skribis:
> From 305768bfef9bf4bc8d57828e27b8439dedd574bd Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
> Date: Mon, 9 Feb 2015 12:13:26 +0100
> Subject: [PATCH] gnu: Add HISAT.
>
> * gnu/packages/bioinformatics.scm (hisat): New variable.
Overall looks good to me. A couple of comments:
> + (alist-replace
> + 'install
> + (lambda* (#:key outputs #:allow-other-keys)
> + (let ((bin (string-append (assoc-ref outputs "out") "/bin/")))
> + (mkdir-p bin)
> + (for-each (lambda (file)
> + (copy-file file (string-append bin file)))
> + '("hisat"
> + "hisat-build"
> + "hisat-build-s"
> + "hisat-build-l"
> + "hisat-align-s"
> + "hisat-align-l"
> + "hisat-inspect"
> + "hisat-inspect-s"
> + "hisat-inspect-l"
> + "hisat-build-s-debug"
> + "hisat-build-l-debug"
> + "hisat-align-s-debug"
> + "hisat-align-l-debug"
> + "hisat-inspect-s-debug"
> + "hisat-inspect-l-debug"))))
If it’s possible to avoid the whole list using ‘find-files’ or
‘scandir’, that would be nicer IMO. If it’s not, that’s fine.
> + (license license:gpl3)))
GPLv3-only?
Thanks!
Ludo’.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH]: gnu: Add HISAT.
2015-02-09 23:03 ` Ludovic Courtès
@ 2015-02-10 9:42 ` Ricardo Wurmus
2015-02-10 10:24 ` Ricardo Wurmus
1 sibling, 0 replies; 12+ messages in thread
From: Ricardo Wurmus @ 2015-02-10 9:42 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: Guix-devel
Ludovic Courtès writes:
> If it’s possible to avoid the whole list using ‘find-files’ or
> ‘scandir’, that would be nicer IMO. If it’s not, that’s fine.
>
>> + (license license:gpl3)))
>
> GPLv3-only?
>
> Thanks!
>
> Ludo’.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH]: gnu: Add HISAT.
2015-02-09 23:03 ` Ludovic Courtès
2015-02-10 9:42 ` Ricardo Wurmus
@ 2015-02-10 10:24 ` Ricardo Wurmus
2015-02-10 12:52 ` Ludovic Courtès
2015-02-11 11:15 ` Andreas Enge
1 sibling, 2 replies; 12+ messages in thread
From: Ricardo Wurmus @ 2015-02-10 10:24 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: Guix-devel
[-- Attachment #1: Type: text/plain, Size: 437 bytes --]
Ludovic Courtès writes:
> If it’s possible to avoid the whole list using ‘find-files’ or
> ‘scandir’, that would be nicer IMO. If it’s not, that’s fine.
In the attached patch I used `find-files' instead. The expression is a
bit long, but I think it's still clear enough to be preferable to the
long list.
>> + (license license:gpl3)))
>
> GPLv3-only?
You were right: it's GPLv3+. My apologies.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-HISAT.patch --]
[-- Type: text/x-patch, Size: 3731 bytes --]
From 5696a8227d98d60d38f0ff19b40a21ccb13e53f1 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Date: Mon, 9 Feb 2015 12:13:26 +0100
Subject: [PATCH] gnu: Add HISAT.
* gnu/packages/bioinformatics.scm (hisat): New variable.
---
gnu/packages/bioinformatics.scm | 66 ++++++++++++++++++++++++++++++++++++++++-
1 file changed, 65 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index c0d1438..9219bc2 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -29,8 +29,9 @@
#:use-module (gnu packages ncurses)
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
- #:use-module (gnu packages python))
+ #:use-module (gnu packages python)
#:use-module (gnu packages tbb)
+ #:use-module (gnu packages zip))
(define-public bedtools
(package
@@ -181,6 +182,69 @@ supports next-generation sequencing data in fasta/q and csfasta/q format from
Illumina, Roche 454, and the SOLiD platform.")
(license license:gpl3)))
+(define-public hisat
+ (package
+ (name "hisat")
+ (version "0.1.4")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "http://ccb.jhu.edu/software/hisat/downloads/hisat-"
+ version "-beta-source.zip"))
+ (sha256
+ (base32
+ "1k381ydranqxp09yf2y7w1d0chz5d59vb6jchi89hbb0prq19lk5"))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:tests? #f ;no check target
+ #:make-flags '("allall")
+ #:phases
+ (alist-replace
+ 'unpack
+ (lambda* (#:key source #:allow-other-keys)
+ (and (zero? (system* "unzip" source))
+ (chdir "hisat-0.1.4-beta")))
+ (alist-cons-after
+ 'unpack 'patch-sources
+ (lambda _
+ ;; XXX Cannot use snippet because zip files are not supported
+ (substitute* "Makefile"
+ (("^CC = .*$") "CC = gcc")
+ (("^CPP = .*$") "CPP = g++")
+ ;; replace BUILD_HOST and BUILD_TIME for deterministic build
+ (("-DBUILD_HOST=.*") "-DBUILD_HOST=\"\\\"guix\\\"\"")
+ (("-DBUILD_TIME=.*") "-DBUILD_TIME=\"\\\"0\\\"\""))
+ (substitute* '("hisat-build" "hisat-inspect")
+ (("/usr/bin/env") (which "env"))))
+ (alist-replace
+ 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((bin (string-append (assoc-ref outputs "out") "/bin/")))
+ (mkdir-p bin)
+ (for-each
+ (lambda (file)
+ (copy-file file (string-append bin file)))
+ (find-files
+ "."
+ "hisat(-(build|align|inspect)(-(s|l)(-debug)*)*)*$"))))
+ (alist-delete 'configure %standard-phases))))))
+ (native-inputs
+ `(("unzip" ,unzip)))
+ (inputs
+ `(("perl" ,perl)
+ ("python" ,python)
+ ("zlib" ,zlib)))
+ (home-page "http://ccb.jhu.edu/software/hisat/index.shtml")
+ (synopsis "Hierarchical indexing for spliced alignment of transcripts")
+ (description
+ "HISAT is a fast and sensitive spliced alignment program for mapping
+RNA-seq reads. In addition to one global FM index that represents a whole
+genome, HISAT uses a large set of small FM indexes that collectively cover the
+whole genome. These small indexes (called local indexes) combined with
+several alignment strategies enable effective alignment of RNA-seq reads, in
+particular, reads spanning multiple exons.")
+ (license license:gpl3+)))
+
(define-public samtools
(package
(name "samtools")
--
2.1.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH]: gnu: Add HISAT.
2015-02-10 10:24 ` Ricardo Wurmus
@ 2015-02-10 12:52 ` Ludovic Courtès
2015-02-11 11:15 ` Andreas Enge
1 sibling, 0 replies; 12+ messages in thread
From: Ludovic Courtès @ 2015-02-10 12:52 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: Guix-devel
Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> skribis:
> From 5696a8227d98d60d38f0ff19b40a21ccb13e53f1 Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
> Date: Mon, 9 Feb 2015 12:13:26 +0100
> Subject: [PATCH] gnu: Add HISAT.
>
> * gnu/packages/bioinformatics.scm (hisat): New variable.
LGTM, thanks!
Ludo’.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH]: gnu: Add HISAT.
2015-02-10 10:24 ` Ricardo Wurmus
2015-02-10 12:52 ` Ludovic Courtès
@ 2015-02-11 11:15 ` Andreas Enge
2015-02-11 16:14 ` Ricardo Wurmus
1 sibling, 1 reply; 12+ messages in thread
From: Andreas Enge @ 2015-02-11 11:15 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: Guix-devel
Hello,
the package fails to build on i686:
http://hydra.gnu.org/build/247325
Could you maybe have a look?
Andreas
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH]: gnu: Add HISAT.
2015-02-11 11:15 ` Andreas Enge
@ 2015-02-11 16:14 ` Ricardo Wurmus
2015-02-11 16:23 ` Andreas Enge
2015-02-11 22:40 ` Ludovic Courtès
0 siblings, 2 replies; 12+ messages in thread
From: Ricardo Wurmus @ 2015-02-11 16:14 UTC (permalink / raw)
To: Andreas Enge; +Cc: Guix-devel
Andreas Enge writes:
> the package fails to build on i686:
> http://hydra.gnu.org/build/247325
> Could you maybe have a look?
Thanks for notifying me.
A recurring error is apparently related to embedded assembly
instructions:
~~~~~
...
bt2_idx.h: Assembler messages:
bt2_idx.h:489: Error: invalid instruction suffix for `popcnt'
...
~~~~~
I wrote the author an email to ask whether this can be fixed upstream
for other architectures than x86_64. Until then should I just declare
x86_64 as the only supported architecture?
~~ Ricardo
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH]: gnu: Add HISAT.
2015-02-11 16:14 ` Ricardo Wurmus
@ 2015-02-11 16:23 ` Andreas Enge
2015-02-11 22:40 ` Ludovic Courtès
1 sibling, 0 replies; 12+ messages in thread
From: Andreas Enge @ 2015-02-11 16:23 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: Guix-devel
On Wed, Feb 11, 2015 at 05:14:13PM +0100, Ricardo Wurmus wrote:
> A recurring error is apparently related to embedded assembly
> instructions:
> I wrote the author an email to ask whether this can be fixed upstream
> for other architectures than x86_64. Until then should I just declare
> x86_64 as the only supported architecture?
I would say so. On their homepage, besides the source code they provide
binaries, but only for "Linux x86_64" and "Mac OS X x86_64". I am not
surprised that high performance computing tools require a high performance
platform. Probably it is not interesting anyway to run the code on other
architectures.
Andreas
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH]: gnu: Add HISAT.
2015-02-11 16:14 ` Ricardo Wurmus
2015-02-11 16:23 ` Andreas Enge
@ 2015-02-11 22:40 ` Ludovic Courtès
2015-02-12 11:04 ` Ricardo Wurmus
1 sibling, 1 reply; 12+ messages in thread
From: Ludovic Courtès @ 2015-02-11 22:40 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: Guix-devel
Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> skribis:
> I wrote the author an email to ask whether this can be fixed upstream
> for other architectures than x86_64. Until then should I just declare
> x86_64 as the only supported architecture?
Probably yes, with a comment pointing to this discussion and possibly
the one with the author(s).
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH]: gnu: Add HISAT.
2015-02-11 22:40 ` Ludovic Courtès
@ 2015-02-12 11:04 ` Ricardo Wurmus
2015-02-12 12:51 ` Andreas Enge
2015-02-12 20:39 ` Ludovic Courtès
0 siblings, 2 replies; 12+ messages in thread
From: Ricardo Wurmus @ 2015-02-12 11:04 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: Guix-devel
[-- Attachment #1: Type: text/plain, Size: 672 bytes --]
Ludovic Courtès writes:
> Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> skribis:
>
>> I wrote the author an email to ask whether this can be fixed upstream
>> for other architectures than x86_64. Until then should I just declare
>> x86_64 as the only supported architecture?
>
> Probably yes, with a comment pointing to this discussion and possibly
> the one with the author(s).
This may not even be necessary; the developer replied with a hint and
attached is a patch that should fix the build on non-x86_64
architectures. It builds fine locally with
./pre-inst-env guix build --system=i686-linux hisat
Does this look okay?
~~ Ricardo
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-hisat-fix-build-on-non-x86_64.patch --]
[-- Type: text/x-patch, Size: 1445 bytes --]
From 5a73d260fcff839f5d07ef4ae684c78c4660f3d3 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Date: Thu, 12 Feb 2015 11:58:40 +0100
Subject: [PATCH] gnu: hisat: fix build on non-x86_64.
* gnu/packages/bioinformatics.scm (hisat): Add "POPCNT_CAPABILITY=0" to
make-flags on architectures other than x86_64.
---
gnu/packages/bioinformatics.scm | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 48bb9dd..f384cb8 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -252,8 +252,15 @@ Illumina, Roche 454, and the SOLiD platform.")
"1k381ydranqxp09yf2y7w1d0chz5d59vb6jchi89hbb0prq19lk5"))))
(build-system gnu-build-system)
(arguments
- '(#:tests? #f ;no check target
- #:make-flags '("allall")
+ `(#:tests? #f ;no check target
+ #:make-flags '("allall"
+ ;; Disable unsupported `popcnt' instructions on
+ ;; architectures other than x86_64
+ ,@(if (string-prefix? "x86_64"
+ (or (%current-target-system)
+ (%current-system)))
+ '()
+ '("POPCNT_CAPABILITY=0")))
#:phases
(alist-replace
'unpack
--
2.1.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH]: gnu: Add HISAT.
2015-02-12 11:04 ` Ricardo Wurmus
@ 2015-02-12 12:51 ` Andreas Enge
2015-02-12 20:39 ` Ludovic Courtès
1 sibling, 0 replies; 12+ messages in thread
From: Andreas Enge @ 2015-02-12 12:51 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: Guix-devel
On Thu, Feb 12, 2015 at 12:04:22PM +0100, Ricardo Wurmus wrote:
> This may not even be necessary; the developer replied with a hint and
> attached is a patch that should fix the build on non-x86_64
> architectures. It builds fine locally with
> ./pre-inst-env guix build --system=i686-linux hisat
This looks good, you could push it, and then we can see whether it will
be enough on mips.
Andreas
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH]: gnu: Add HISAT.
2015-02-12 11:04 ` Ricardo Wurmus
2015-02-12 12:51 ` Andreas Enge
@ 2015-02-12 20:39 ` Ludovic Courtès
1 sibling, 0 replies; 12+ messages in thread
From: Ludovic Courtès @ 2015-02-12 20:39 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: Guix-devel
Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> skribis:
> This may not even be necessary; the developer replied with a hint and
> attached is a patch that should fix the build on non-x86_64
> architectures. It builds fine locally with
>
> ./pre-inst-env guix build --system=i686-linux hisat
>
> Does this look okay?
[...]
> From 5a73d260fcff839f5d07ef4ae684c78c4660f3d3 Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
> Date: Thu, 12 Feb 2015 11:58:40 +0100
> Subject: [PATCH] gnu: hisat: fix build on non-x86_64.
>
> * gnu/packages/bioinformatics.scm (hisat): Add "POPCNT_CAPABILITY=0" to
> make-flags on architectures other than x86_64.
Definitely, yes.
Thanks for investigating,
Ludo’.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2015-02-12 20:40 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-09 11:16 [PATCH]: gnu: Add HISAT Ricardo Wurmus
2015-02-09 23:03 ` Ludovic Courtès
2015-02-10 9:42 ` Ricardo Wurmus
2015-02-10 10:24 ` Ricardo Wurmus
2015-02-10 12:52 ` Ludovic Courtès
2015-02-11 11:15 ` Andreas Enge
2015-02-11 16:14 ` Ricardo Wurmus
2015-02-11 16:23 ` Andreas Enge
2015-02-11 22:40 ` Ludovic Courtès
2015-02-12 11:04 ` Ricardo Wurmus
2015-02-12 12:51 ` Andreas Enge
2015-02-12 20: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.