all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] gnu: Add bioawk.
@ 2016-03-08 20:10 Roel Janssen
  2016-03-09  1:53 ` Leo Famulari
  2016-03-09  9:43 ` Ricardo Wurmus
  0 siblings, 2 replies; 7+ messages in thread
From: Roel Janssen @ 2016-03-08 20:10 UTC (permalink / raw)
  To: guix-devel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: 0001-gnu-Add-bioawk.patch --]
[-- Type: text/x-patch, Size: 2556 bytes --]

From 990eda92a62dc25d0f5792437a82e119c5e3579f Mon Sep 17 00:00:00 2001
From: Roel Janssen <roel@gnu.org>
Date: Tue, 8 Mar 2016 21:06:53 +0100
Subject: [PATCH] gnu: Add bioawk.

* gnu/packages/bioinformatics.scm (bioawk): 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 5d53dc9..4ceec08 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -37,6 +37,7 @@
   #:use-module (gnu packages algebra)
   #:use-module (gnu packages base)
   #:use-module (gnu packages boost)
+  #:use-module (gnu packages bison)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages cpio)
   #:use-module (gnu packages curl)
@@ -247,6 +248,43 @@ intervals from multiple files in widely-used genomic file formats such as BAM,
 BED, GFF/GTF, VCF.")
     (license license:gpl2)))
 
+(define-public bioawk
+  (package
+    (name "bioawk")
+    (version "1.0")
+    (source (origin
+      (method url-fetch)
+      (uri (string-append "https://github.com/lh3/bioawk/archive/v"
+                          version ".tar.gz"))
+      (file-name (string-append name "-" version ".tar.gz"))
+      (sha256
+       (base32 "1daizxsk17ahi9n58fj8vpgwyhzrzh54bzqhanjanp88kgrz7gjw"))))
+    (build-system gnu-build-system)
+    (propagated-inputs
+     `(("zlib" ,zlib)))
+    (native-inputs
+     `(("bison" ,bison)))
+    (arguments
+     `(#:parallel-build? #f
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (delete 'check)
+         (replace
+          'install
+          (lambda* (#:key outputs #:allow-other-keys)
+            (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
+              (install-file "bioawk" bin)))))))
+    (home-page "https://github.com/lh3/bioawk")
+    (synopsis "AWK with bioinformatics extensions")
+    (description "Bioawk is an extension to Brian Kernighan's awk, adding the
+support of several common biological data formats, including optionally gzip'ed
+BED, GFF, SAM, VCF, FASTA/Q and TAB-delimited formats with column names.  It
+also adds a few built-in functions and an command line option to use TAB as the
+input/output delimiter.  When the new functionality is not used, bioawk is
+intended to behave exactly the same as the original BWK awk.")
+    (license license:x11)))
+
 (define-public python2-pybedtools
   (package
     (name "python2-pybedtools")
-- 
2.5.0


[-- Attachment #2: Type: text/plain, Size: 189 bytes --]

Dear Guix,

Here's a patch to add bioawk -- a version of awk specialized in
biological data formats.

Please let me know when something is wrong with the patch.

Kind regards,
Roel Janssen

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

* Re: [PATCH] gnu: Add bioawk.
  2016-03-08 20:10 [PATCH] gnu: Add bioawk Roel Janssen
@ 2016-03-09  1:53 ` Leo Famulari
  2016-03-09  9:43 ` Ricardo Wurmus
  1 sibling, 0 replies; 7+ messages in thread
From: Leo Famulari @ 2016-03-09  1:53 UTC (permalink / raw)
  To: Roel Janssen; +Cc: guix-devel

On Tue, Mar 08, 2016 at 09:10:14PM +0100, Roel Janssen wrote:
> From 990eda92a62dc25d0f5792437a82e119c5e3579f Mon Sep 17 00:00:00 2001
> From: Roel Janssen <roel@gnu.org>
> Date: Tue, 8 Mar 2016 21:06:53 +0100
> Subject: [PATCH] gnu: Add bioawk.
> 
> * gnu/packages/bioinformatics.scm (bioawk): New variable.

Thanks for the patch!

[...]

> +    (propagated-inputs
> +     `(("zlib" ,zlib)))

I changed this to a plain input, and then checked the references of the
resulting build, and zlib is referenced. Considering that, does it need
to be propagated into the user's profile? Propagated inputs should be
avoided if possible.

> +    (native-inputs
> +     `(("bison" ,bison)))
> +    (arguments
> +     `(#:parallel-build? #f
> +       #:phases
> +       (modify-phases %standard-phases
> +         (delete 'configure)
> +         (delete 'check)

Can you say why tests are disabled? It can be as simple as "no test
suite" if that is accurate.

> +         (replace
> +          'install
> +          (lambda* (#:key outputs #:allow-other-keys)
> +            (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
> +              (install-file "bioawk" bin)))))))

The git repo includes a manpage 'awk.1'. Can you send an updated patch
that installs that as well?

> +    (home-page "https://github.com/lh3/bioawk")
> +    (synopsis "AWK with bioinformatics extensions")
> +    (description "Bioawk is an extension to Brian Kernighan's awk, adding the
> +support of several common biological data formats, including optionally gzip'ed
> +BED, GFF, SAM, VCF, FASTA/Q and TAB-delimited formats with column names.  It
> +also adds a few built-in functions and an command line option to use TAB as the
> +input/output delimiter.  When the new functionality is not used, bioawk is
> +intended to behave exactly the same as the original BWK awk.")
> +    (license license:x11)))
> +
>  (define-public python2-pybedtools
>    (package
>      (name "python2-pybedtools")
> -- 
> 2.5.0
> 

> Dear Guix,
> 
> Here's a patch to add bioawk -- a version of awk specialized in
> biological data formats.
> 
> Please let me know when something is wrong with the patch.
> 
> Kind regards,
> Roel Janssen

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

* Re: [PATCH] gnu: Add bioawk.
  2016-03-08 20:10 [PATCH] gnu: Add bioawk Roel Janssen
  2016-03-09  1:53 ` Leo Famulari
@ 2016-03-09  9:43 ` Ricardo Wurmus
  2016-03-10 23:00   ` Roel Janssen
  1 sibling, 1 reply; 7+ messages in thread
From: Ricardo Wurmus @ 2016-03-09  9:43 UTC (permalink / raw)
  To: Roel Janssen; +Cc: guix-devel


Roel Janssen <roel@gnu.org> writes:

> Please let me know when something is wrong with the patch.

In addition to Leo’s comments here are mine:

> +    (arguments
> +     `(#:parallel-build? #f

Why is parallel-build disabled?  Could you add a comment?

> +       #:phases
> +       (modify-phases %standard-phases
> +         (delete 'configure)
> +         (delete 'check)

We usually just do “#:tests? #f” with a comment, instead of deleting the
“check” phase.

> +         (replace
> +          'install

Please put “'install” on the same line as “(replace”.

> +          (lambda* (#:key outputs #:allow-other-keys)
> +            (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
> +              (install-file "bioawk" bin)))))))
> +    (home-page "https://github.com/lh3/bioawk")
> +    (synopsis "AWK with bioinformatics extensions")
> +    (description "Bioawk is an extension to Brian Kernighan's awk, adding the
> +support of several common biological data formats, including optionally gzip'ed
> +BED, GFF, SAM, VCF, FASTA/Q and TAB-delimited formats with column names.  It
> +also adds a few built-in functions and an command line option to use TAB as the

“a command-line option”, not “an”

Thanks!

~~ Ricardo

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

* Re: [PATCH] gnu: Add bioawk.
  2016-03-09  9:43 ` Ricardo Wurmus
@ 2016-03-10 23:00   ` Roel Janssen
  2016-03-10 23:38     ` Leo Famulari
  2016-03-11 13:35     ` Ricardo Wurmus
  0 siblings, 2 replies; 7+ messages in thread
From: Roel Janssen @ 2016-03-10 23:00 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: 0001-gnu-Add-bioawk.patch --]
[-- Type: text/x-patch, Size: 2858 bytes --]

From ec580c06e33de844f6f6cb7c4fc3b44691e141fd Mon Sep 17 00:00:00 2001
From: Roel Janssen <roel@gnu.org>
Date: Thu, 10 Mar 2016 23:54:31 +0100
Subject: [PATCH] gnu: Add bioawk.

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

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 5d53dc9..d15e99d 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -36,6 +36,7 @@
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages algebra)
   #:use-module (gnu packages base)
+  #:use-module (gnu packages bison)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages cpio)
@@ -247,6 +248,47 @@ intervals from multiple files in widely-used genomic file formats such as BAM,
 BED, GFF/GTF, VCF.")
     (license license:gpl2)))
 
+(define-public bioawk
+  (package
+    (name "bioawk")
+    (version "1.0")
+    (source (origin
+      (method url-fetch)
+      (uri (string-append "https://github.com/lh3/bioawk/archive/v"
+                          version ".tar.gz"))
+      (file-name (string-append name "-" version ".tar.gz"))
+      (sha256
+       (base32 "1daizxsk17ahi9n58fj8vpgwyhzrzh54bzqhanjanp88kgrz7gjw"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("zlib" ,zlib)))
+    (native-inputs
+     `(("bison" ,bison)))
+    (arguments
+     `(#:tests? #f ; There are no tests to run.
+       ;; Bison must generate files, before other targets can build.
+       #:parallel-build? #f
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure) ; There is no configure phase.
+         (replace 'install
+          (lambda* (#:key outputs #:allow-other-keys)
+            (let* ((out (assoc-ref outputs "out"))
+                   (bin  (string-append out "/bin"))
+                   (man (string-append out "/share/man/man1")))
+              (mkdir-p man)
+              (copy-file "awk.1" (string-append man "/bioawk.1"))
+              (install-file "bioawk" bin)))))))
+    (home-page "https://github.com/lh3/bioawk")
+    (synopsis "AWK with bioinformatics extensions")
+    (description "Bioawk is an extension to Brian Kernighan's awk, adding the
+support of several common biological data formats, including optionally gzip'ed
+BED, GFF, SAM, VCF, FASTA/Q and TAB-delimited formats with column names.  It
+also adds a few built-in functions and a command line option to use TAB as the
+input/output delimiter.  When the new functionality is not used, bioawk is
+intended to behave exactly the same as the original BWK awk.")
+    (license license:x11)))
+
 (define-public python2-pybedtools
   (package
     (name "python2-pybedtools")
-- 
2.5.0


[-- Attachment #2: Type: text/plain, Size: 3312 bytes --]

Dear Leo and Ricardo,

Thank you for reviewing this patch.  I hope it is fine now.

Leo Famulari writes:

> On Tue, Mar 08, 2016 at 09:10:14PM +0100, Roel Janssen wrote:
>> From 990eda92a62dc25d0f5792437a82e119c5e3579f Mon Sep 17 00:00:00 2001
>> From: Roel Janssen <roel@gnu.org>
>> Date: Tue, 8 Mar 2016 21:06:53 +0100
>> Subject: [PATCH] gnu: Add bioawk.
>> 
>> * gnu/packages/bioinformatics.scm (bioawk): New variable.
>
> Thanks for the patch!
>
> [...]
>
>> +    (propagated-inputs
>> +     `(("zlib" ,zlib)))
>
> I changed this to a plain input, and then checked the references of the
> resulting build, and zlib is referenced. Considering that, does it need
> to be propagated into the user's profile? Propagated inputs should be
> avoided if possible.

You're right.  I simply get confused about inputs, native-inputs and
propagated-inputs.

I made it an input in my new patch.

>> +    (native-inputs
>> +     `(("bison" ,bison)))
>> +    (arguments
>> +     `(#:parallel-build? #f
>> +       #:phases
>> +       (modify-phases %standard-phases
>> +         (delete 'configure)
>> +         (delete 'check)
>
> Can you say why tests are disabled? It can be as simple as "no test
> suite" if that is accurate.

Sure.

>> +         (replace
>> +          'install
>> +          (lambda* (#:key outputs #:allow-other-keys)
>> +            (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
>> +              (install-file "bioawk" bin)))))))
>
> The git repo includes a manpage 'awk.1'. Can you send an updated patch
> that installs that as well?

I added it as bioawk.1 instead, to avoid confusion with awk.
Good catch!


Ricardo Wurmus writes:

> Roel Janssen <roel@gnu.org> writes:
>
>> Please let me know when something is wrong with the patch.
>
> In addition to Leo’s comments here are mine:
>
>> +    (arguments
>> +     `(#:parallel-build? #f
>
> Why is parallel-build disabled?  Could you add a comment?

Sure.

>> +       #:phases
>> +       (modify-phases %standard-phases
>> +         (delete 'configure)
>> +         (delete 'check)
>
> We usually just do “#:tests? #f” with a comment, instead of deleting the
> “check” phase.

Sorry for the redundancy.  I submitted two patches before receiving
comments about this.  Fixed in my new patch, and I'll apply this in
future patches as well.

>> +         (replace
>> +          'install
>
> Please put “'install” on the same line as “(replace”.

Should I do this for other (replace ...) as well?  If I want to replace
the build phase, should I put it on the same line as well?

>> +          (lambda* (#:key outputs #:allow-other-keys)
>> +            (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
>> +              (install-file "bioawk" bin)))))))
>> +    (home-page "https://github.com/lh3/bioawk")
>> +    (synopsis "AWK with bioinformatics extensions")
>> +    (description "Bioawk is an extension to Brian Kernighan's awk, adding the
>> +support of several common biological data formats, including optionally gzip'ed
>> +BED, GFF, SAM, VCF, FASTA/Q and TAB-delimited formats with column names.  It
>> +also adds a few built-in functions and an command line option to use TAB as the
>
> “a command-line option”, not “an”

Good catch!  Fixed in my new patch.

Kind regards,
Roel Janssen

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

* Re: [PATCH] gnu: Add bioawk.
  2016-03-10 23:00   ` Roel Janssen
@ 2016-03-10 23:38     ` Leo Famulari
  2016-03-11 13:35     ` Ricardo Wurmus
  1 sibling, 0 replies; 7+ messages in thread
From: Leo Famulari @ 2016-03-10 23:38 UTC (permalink / raw)
  To: Roel Janssen; +Cc: guix-devel

On Fri, Mar 11, 2016 at 12:00:11AM +0100, Roel Janssen wrote:
> Thank you for reviewing this patch.  I hope it is fine now.

Thanks for the revised patch!

Pushed as a0a71439fa3, adding a copyright line for you.

> > The git repo includes a manpage 'awk.1'. Can you send an updated patch
> > that installs that as well?
> 
> I added it as bioawk.1 instead, to avoid confusion with awk.
> Good catch!

A good catch on your part as well!

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

* Re: [PATCH] gnu: Add bioawk.
  2016-03-10 23:00   ` Roel Janssen
  2016-03-10 23:38     ` Leo Famulari
@ 2016-03-11 13:35     ` Ricardo Wurmus
  2016-03-11 15:27       ` Roel Janssen
  1 sibling, 1 reply; 7+ messages in thread
From: Ricardo Wurmus @ 2016-03-11 13:35 UTC (permalink / raw)
  To: Roel Janssen; +Cc: guix-devel


Roel Janssen <roel@gnu.org> writes:


>>> +         (replace
>>> +          'install
>>
>> Please put “'install” on the same line as “(replace”.
>
> Should I do this for other (replace ...) as well?  If I want to replace
> the build phase, should I put it on the same line as well?

Yes, the phase name(s) should always be on the same line as the “verb”.

~~ Ricardo

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

* Re: [PATCH] gnu: Add bioawk.
  2016-03-11 13:35     ` Ricardo Wurmus
@ 2016-03-11 15:27       ` Roel Janssen
  0 siblings, 0 replies; 7+ messages in thread
From: Roel Janssen @ 2016-03-11 15:27 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel


Ricardo Wurmus writes:

> Roel Janssen <roel@gnu.org> writes:
>
>
>>>> +         (replace
>>>> +          'install
>>>
>>> Please put “'install” on the same line as “(replace”.
>>
>> Should I do this for other (replace ...) as well?  If I want to replace
>> the build phase, should I put it on the same line as well?
>
> Yes, the phase name(s) should always be on the same line as the “verb”.

I will do this in future patches.

Thanks.

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

end of thread, other threads:[~2016-03-11 15:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-08 20:10 [PATCH] gnu: Add bioawk Roel Janssen
2016-03-09  1:53 ` Leo Famulari
2016-03-09  9:43 ` Ricardo Wurmus
2016-03-10 23:00   ` Roel Janssen
2016-03-10 23:38     ` Leo Famulari
2016-03-11 13:35     ` Ricardo Wurmus
2016-03-11 15:27       ` Roel Janssen

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.