* [PATCH] gnu: Add metabat.
@ 2015-07-11 6:51 Ben Woodcroft
2015-07-11 14:21 ` Mark H Weaver
2015-07-12 11:02 ` Ricardo Wurmus
0 siblings, 2 replies; 5+ messages in thread
From: Ben Woodcroft @ 2015-07-11 6:51 UTC (permalink / raw)
To: guix-devel@gnu.org
[-- Attachment #1: Type: text/plain, Size: 70 bytes --]
Thanks for fixing the samtools headers Ricardo, needed that for this.
[-- Attachment #2: 0001-gnu-Add-metabat.patch --]
[-- Type: text/x-patch, Size: 4108 bytes --]
From 3f253f059edee5ee2fdb116e310ab210646acf40 Mon Sep 17 00:00:00 2001
From: Ben Woodcroft <donttrustben@gmail.com>
Date: Sat, 11 Jul 2015 16:49:30 +1000
Subject: [PATCH] gnu: Add metabat.
* gnu/packages/bioinformatics.scm (metabat): New variable.
---
gnu/packages/bioinformatics.scm | 72 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 72 insertions(+)
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index a28832d..a349d39 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -1394,6 +1394,78 @@ resolution of binding sites through combining the information of both
sequencing tag position and orientation.")
(license license:bsd-3)))
+(define-public metabat
+ (package
+ (name "metabat")
+ (version "0.26.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://bitbucket.org/berkeleylab/metabat/get/"
+ version ".tar.bz2"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0vgrhbaxg4dkxyax2kbigak7w0arhqvw0szwp6gd9wmyilc44kfa"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ; tests run as part of build phase
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda* _
+ (substitute* "SConstruct" ; Do not distribute README
+ (("env.Install.idir_prefix, 'README.md'.") ""))
+ #t))
+ (replace 'build
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (substitute* "SConstruct"
+ (("/include/bam/bam.h")
+ "/include/samtools/bam.h"))
+ (substitute* "src/BamUtils.h"
+ (("#include .bam/bam.h.")
+ "#include \"samtools/bam.h\""))
+ (substitute* "src/BamUtils.h"
+ (("#include .bam/sam.h.")
+ "#include \"samtools/sam.h\""))
+ (substitute* "src/KseqReader.h"
+ (("#include \"bam/kseq.h\"")
+ "#include \"samtools/kseq.h\""))
+ (mkdir (assoc-ref outputs "out"))
+ (zero? (system* "scons"
+ (string-append
+ "PREFIX="
+ (assoc-ref outputs "out"))
+ (string-append
+ "HTSLIB_DIR="
+ (assoc-ref inputs "htslib"))
+ (string-append
+ "SAMTOOLS_DIR="
+ (assoc-ref inputs "samtools"))
+ (string-append
+ "BOOST_ROOT="
+ (assoc-ref inputs "boost"))
+ "install"))))
+ (delete 'install))))
+ (inputs
+ `(("zlib" ,zlib)
+ ("perl" ,perl)
+ ("samtools" ,samtools)
+ ("htslib" ,htslib)))
+ (native-inputs
+ `(("boost" ,boost)
+ ("scons" ,scons)))
+ (home-page "https://bitbucket.org/berkeleylab/metabat")
+ (synopsis "Reconstruction of single genomes from complex microbial communities")
+ (description
+ "Grouping large genomic fragments assembled from shotgun metagenomic
+sequences to deconvolute complex microbial communities, or metagenome binning,
+enables the study of individual organisms and their interactions. MetaBAT is
+an automated metagenome binning software, which integrates empirical
+probabilistic distances of genome abundance and tetranucleotide frequency.")
+ (license (license:non-copyleft "file://license.txt"
+ "See LICENSE in the distribution."))))
+
(define-public miso
(package
(name "miso")
--
2.4.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] gnu: Add metabat.
2015-07-11 6:51 [PATCH] gnu: Add metabat Ben Woodcroft
@ 2015-07-11 14:21 ` Mark H Weaver
2015-07-12 11:02 ` Ricardo Wurmus
1 sibling, 0 replies; 5+ messages in thread
From: Mark H Weaver @ 2015-07-11 14:21 UTC (permalink / raw)
To: Ben Woodcroft; +Cc: guix-devel
Ben Woodcroft <b.woodcroft@uq.edu.au> writes:
> From 3f253f059edee5ee2fdb116e310ab210646acf40 Mon Sep 17 00:00:00 2001
> From: Ben Woodcroft <donttrustben@gmail.com>
> Date: Sat, 11 Jul 2015 16:49:30 +1000
> Subject: [PATCH] gnu: Add metabat.
>
> * gnu/packages/bioinformatics.scm (metabat): New variable.
> ---
> gnu/packages/bioinformatics.scm | 72 +++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 72 insertions(+)
>
> diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
> index a28832d..a349d39 100644
> --- a/gnu/packages/bioinformatics.scm
> +++ b/gnu/packages/bioinformatics.scm
> @@ -1394,6 +1394,78 @@ resolution of binding sites through combining the information of both
> sequencing tag position and orientation.")
> (license license:bsd-3)))
>
> +(define-public metabat
> + (package
> + (name "metabat")
> + (version "0.26.1")
> + (source (origin
> + (method url-fetch)
> + (uri (string-append
> + "https://bitbucket.org/berkeleylab/metabat/get/"
> + version ".tar.bz2"))
> + (file-name (string-append name "-" version ".tar.gz"))
The file-name should end with ".bz2", not ".gz".
> + (sha256
> + (base32
> + "0vgrhbaxg4dkxyax2kbigak7w0arhqvw0szwp6gd9wmyilc44kfa"))))
> + (build-system gnu-build-system)
> + (arguments
> + `(#:tests? #f ; tests run as part of build phase
It's a nitpick, but in this case it might be marginally nicer to just
delete the 'check' phase, and to put a comment above the (delete 'check)
and (delete 'install) explaining that the tests and install are both
done as part of the build phase.
> + #:phases
> + (modify-phases %standard-phases
> + (replace 'configure
> + (lambda* _
> + (substitute* "SConstruct" ; Do not distribute README
> + (("env.Install.idir_prefix, 'README.md'.") ""))
"env\\.Install\\(idir_prefix, 'README\\.md'\\)"
> + #t))
> + (replace 'build
> + (lambda* (#:key inputs outputs #:allow-other-keys)
> + (substitute* "SConstruct"
> + (("/include/bam/bam.h")
> + "/include/samtools/bam.h"))
> + (substitute* "src/BamUtils.h"
> + (("#include .bam/bam.h.")
> + "#include \"samtools/bam.h\""))
> + (substitute* "src/BamUtils.h"
> + (("#include .bam/sam.h.")
> + "#include \"samtools/sam.h\""))
> + (substitute* "src/KseqReader.h"
> + (("#include \"bam/kseq.h\"")
> + "#include \"samtools/kseq.h\""))
Please move these to a different phase, maybe named 'fix-includes'.
Also, please use \\. in the patterns to match a literal period, put ^ to
anchor them to the start of a line, and use \" to match the start+end
quotes in the includes. Finally, please combine the two substitute*
calls for "src/BamUtils.h" into a single call. So, maybe something like
this: (untested)
--8<---------------cut here---------------start------------->8---
(add-after 'unpack 'fix-includes
(lambda _
(substitute* "SConstruct"
(("/include/bam/bam\\.h")
"/include/samtools/bam.h"))
(substitute* "src/BamUtils.h"
(("^#include \"bam/bam\\.h\"")
"#include \"samtools/bam.h\"")
(("^#include \"bam/sam\\.h\"")
"#include \"samtools/sam.h\""))
(substitute* "src/KseqReader.h"
(("^#include \"bam/kseq\\.h\"")
"#include \"samtools/kseq.h\""))
#t))
--8<---------------cut here---------------end--------------->8---
> + (delete 'install))))
> + (inputs
> + `(("zlib" ,zlib)
> + ("perl" ,perl)
> + ("samtools" ,samtools)
> + ("htslib" ,htslib)))
> + (native-inputs
> + `(("boost" ,boost)
boost should be in 'inputs', not 'native-inputs'.
> + ("scons" ,scons)))
> + (home-page "https://bitbucket.org/berkeleylab/metabat")
> + (synopsis "Reconstruction of single genomes from complex microbial communities")
Please move the string to the next line, to avoid running over 80
columns.
> + (description
> + "Grouping large genomic fragments assembled from shotgun metagenomic
> +sequences to deconvolute complex microbial communities, or metagenome binning,
> +enables the study of individual organisms and their interactions. MetaBAT is
> +an automated metagenome binning software, which integrates empirical
> +probabilistic distances of genome abundance and tetranucleotide frequency.")
> + (license (license:non-copyleft "file://license.txt"
> + "See LICENSE in the distribution."))))
s/LICENSE/license.txt/
Can you send an updated patch?
Thanks,
Mark
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] gnu: Add metabat.
2015-07-11 6:51 [PATCH] gnu: Add metabat Ben Woodcroft
2015-07-11 14:21 ` Mark H Weaver
@ 2015-07-12 11:02 ` Ricardo Wurmus
2015-07-18 7:40 ` Ben Woodcroft
1 sibling, 1 reply; 5+ messages in thread
From: Ricardo Wurmus @ 2015-07-12 11:02 UTC (permalink / raw)
To: Ben Woodcroft; +Cc: guix-devel@gnu.org
Hi Ben,
in addition to Mark’s comments here is another nitpick:
> + (replace 'configure
> + (lambda* _
> + (substitute* "SConstruct" ; Do not distribute README
> + (("env.Install.idir_prefix, 'README.md'.") ""))
> + #t))
You don’t need ‘lambda*’ here. Regular ‘lambda’ would be just fine.
~~ Ricardo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] gnu: Add metabat.
2015-07-12 11:02 ` Ricardo Wurmus
@ 2015-07-18 7:40 ` Ben Woodcroft
2015-07-19 19:19 ` Mark H Weaver
0 siblings, 1 reply; 5+ messages in thread
From: Ben Woodcroft @ 2015-07-18 7:40 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: guix-devel@gnu.org
[-- Attachment #1: Type: text/plain, Size: 252 bytes --]
On 12/07/15 21:02, Ricardo Wurmus wrote:
> Hi Ben,
>
> in addition to Mark’s comments
Thanks Mark, Ricardo, attached. I wasn't sure whether it was better to
have a different phase for fix-includes and fixing the README, can
combine desired?
[-- Attachment #2: 0001-gnu-Add-metabat.patch --]
[-- Type: text/x-patch, Size: 4345 bytes --]
From f7e3b6e9c5e84423c9be5dac1857289d6866bd0e Mon Sep 17 00:00:00 2001
From: Ben Woodcroft <donttrustben@gmail.com>
Date: Sat, 18 Jul 2015 17:39:05 +1000
Subject: [PATCH] gnu: Add metabat.
* gnu/packages/bioinformatics.scm (metabat): New variable.
---
gnu/packages/bioinformatics.scm | 79 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 79 insertions(+)
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index a28832d..e7eed3a 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -1394,6 +1394,85 @@ resolution of binding sites through combining the information of both
sequencing tag position and orientation.")
(license license:bsd-3)))
+
+(define-public metabat
+ (package
+ (name "metabat")
+ (version "0.26.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://bitbucket.org/berkeleylab/metabat/get/"
+ version ".tar.bz2"))
+ (file-name (string-append name "-" version ".tar.bz2"))
+ (sha256
+ (base32
+ "0vgrhbaxg4dkxyax2kbigak7w0arhqvw0szwp6gd9wmyilc44kfa"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'fix-includes
+ (lambda _
+ (substitute* "SConstruct"
+ (("/include/bam/bam.h")
+ "/include/samtools/bam.h"))
+ (substitute* "src/BamUtils.h"
+ (("^#include \"bam/bam\\.h\"")
+ "#include \"samtools/bam.h\"")
+ (("^#include \"bam/sam\\.h\"")
+ "#include \"samtools/sam.h\""))
+ (substitute* "src/KseqReader.h"
+ (("^#include \"bam/kseq\\.h\"")
+ "#include \"samtools/kseq.h\""))
+ #t))
+ (add-after 'unpack 'fix-scons
+ (lambda _
+ (substitute* "SConstruct" ; Do not distribute README
+ (("^env\\.Install\\(idir_prefix, 'README\\.md'\\)")
+ ""))
+ #t))
+ (delete 'configure)
+ (replace 'build
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (mkdir (assoc-ref outputs "out"))
+ (zero? (system* "scons"
+ (string-append
+ "PREFIX="
+ (assoc-ref outputs "out"))
+ (string-append
+ "HTSLIB_DIR="
+ (assoc-ref inputs "htslib"))
+ (string-append
+ "SAMTOOLS_DIR="
+ (assoc-ref inputs "samtools"))
+ (string-append
+ "BOOST_ROOT="
+ (assoc-ref inputs "boost"))
+ "install"))))
+ ;; check and install carried out during build phase
+ (delete 'check)
+ (delete 'install))))
+ (inputs
+ `(("zlib" ,zlib)
+ ("perl" ,perl)
+ ("samtools" ,samtools)
+ ("htslib" ,htslib)
+ ("boost" ,boost)))
+ (native-inputs
+ `(("scons" ,scons)))
+ (home-page "https://bitbucket.org/berkeleylab/metabat")
+ (synopsis
+ "Reconstruction of single genomes from complex microbial communities")
+ (description
+ "Grouping large genomic fragments assembled from shotgun metagenomic
+sequences to deconvolute complex microbial communities, or metagenome binning,
+enables the study of individual organisms and their interactions. MetaBAT is
+an automated metagenome binning software, which integrates empirical
+probabilistic distances of genome abundance and tetranucleotide frequency.")
+ (license (license:non-copyleft "file://license.txt"
+ "See licence.txt in the distribution."))))
+
(define-public miso
(package
(name "miso")
--
2.4.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] gnu: Add metabat.
2015-07-18 7:40 ` Ben Woodcroft
@ 2015-07-19 19:19 ` Mark H Weaver
0 siblings, 0 replies; 5+ messages in thread
From: Mark H Weaver @ 2015-07-19 19:19 UTC (permalink / raw)
To: Ben Woodcroft; +Cc: guix-devel@gnu.org
Ben Woodcroft <b.woodcroft@uq.edu.au> writes:
> Thanks Mark, Ricardo, attached. I wasn't sure whether it was better to
> have a different phase for fix-includes and fixing the README, can
> combine desired?
Looks good to me. Pushed with two minor changes: (1) fixed the
indentation in the 'fix-includes' phase, and corrected a misspelling in
the license description.
Thanks,
Mark
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-07-19 19:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-11 6:51 [PATCH] gnu: Add metabat Ben Woodcroft
2015-07-11 14:21 ` Mark H Weaver
2015-07-12 11:02 ` Ricardo Wurmus
2015-07-18 7:40 ` Ben Woodcroft
2015-07-19 19:19 ` 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).