all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] Add fxtract.
@ 2016-01-06 21:48 Ben Woodcroft
  2016-01-11 21:00 ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: Ben Woodcroft @ 2016-01-06 21:48 UTC (permalink / raw)
  To: guix-devel@gnu.org

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

Thanks in advance for review.
ben

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-fxtract.patch --]
[-- Type: text/x-patch; name="0001-gnu-Add-fxtract.patch", Size: 4155 bytes --]

From acd310d27c457139d3f2fcd2cfc1127167bf2c48 Mon Sep 17 00:00:00 2001
From: Ben Woodcroft <donttrustben@gmail.com>
Date: Thu, 7 Jan 2016 07:44:58 +1000
Subject: [PATCH] gnu: Add fxtract.

* gnu/packages/bioinformatics.scm (fxtract): New variable.
---
 gnu/packages/bioinformatics.scm | 65 ++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 64 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 76a1c17..77fe411 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014, 2015 Ricardo Wurmus <rekado@elephly.net>
-;;; Copyright © 2015 Ben Woodcroft <donttrustben@gmail.com>
+;;; Copyright © 2015, 2016 Ben Woodcroft <donttrustben@gmail.com>
 ;;; Copyright © 2015 Pjotr Prins <pjotr.guix@thebird.nl>
 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
 ;;;
@@ -47,6 +47,7 @@
   #:use-module (gnu packages maths)
   #:use-module (gnu packages mpi)
   #:use-module (gnu packages ncurses)
+  #:use-module (gnu packages pcre)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages popt)
@@ -1436,6 +1437,68 @@ genes in incomplete assemblies or complete genomes.")
     ;; GPL3+ according to private correspondense with the authors.
     (license license:gpl3+)))
 
+(define-public fxtract
+  (let ((util-commit "776ca85a18a47492af3794745efcb4a905113115"))
+    (package
+      (name "fxtract")
+      (version "2.3")
+      (source
+       (origin
+         (method url-fetch)
+         (uri (string-append
+               "https://github.com/ctSkennerton/fxtract/archive/"
+               version ".tar.gz"))
+         (file-name (string-append name "-" version ".tar.gz"))
+         (sha256
+          (base32
+           "0275cfdhis8517hm01is62062swmi06fxzifq7mr3knbbxjlaiwj"))))
+      (build-system gnu-build-system)
+      (arguments
+       `(#:make-flags (list
+                       (string-append "PREFIX=" (assoc-ref %outputs "out"))
+                       "CC=gcc")
+         #:test-target "fxtract_test"
+         #:phases
+         (modify-phases %standard-phases
+           (delete 'configure)
+           (add-before 'build 'copy-util
+             (lambda* (#:key inputs #:allow-other-keys)
+               (rmdir "util")
+               (copy-recursively (assoc-ref inputs "ctskennerton-util") "util")
+               #t))
+           ;; Do not use make install as this requires additional dependencies.
+           (replace 'install
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let* ((out (assoc-ref outputs "out"))
+                      (bin (string-append out"/bin")))
+                 (install-file "fxtract" bin)
+                 #t))))))
+      (inputs
+       `(("pcre" ,pcre)
+         ("zlib" ,zlib)))
+      (native-inputs
+       `(("ctskennerton-util"
+          ,(origin
+             (method git-fetch)
+             (uri (git-reference
+                   (url "https://github.com/ctSkennerton/util.git")
+                   (commit util-commit)))
+             (file-name (string-append
+                         "ctstennerton-util-" util-commit "-checkout"))
+             (sha256
+              (base32
+               "0cls1hd4vgj3f36fpzzg4xc77d6f3hpc60cbpfmn2gdr7ykzzad7"))))))
+      (home-page "https://github.com/ctSkennerton/fxtract")
+      (synopsis "Extract sequences from FASTA and FASTQ files")
+      (description
+       "Fxtract extracts sequences from a protein or nucleotide fastx (FASTA
+or FASTQ) file given a subsequence.  It uses a simple substring search for
+basic tasks but can change to using POSIX regular expressions, PCRE, hash
+lookups or multi-pattern searching as required.  By default fxtract looks in
+the sequence of each record but can also be told to look in the header,
+comment or quality sections.")
+      (license license:gpl3+))))
+
 (define-public grit
   (package
     (name "grit")
-- 
2.6.3


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

* Re: [PATCH] Add fxtract.
  2016-01-06 21:48 [PATCH] Add fxtract Ben Woodcroft
@ 2016-01-11 21:00 ` Ludovic Courtès
  2016-01-11 21:53   ` Ben Woodcroft
  0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2016-01-11 21:00 UTC (permalink / raw)
  To: Ben Woodcroft; +Cc: guix-devel@gnu.org

Ben Woodcroft <b.woodcroft@uq.edu.au> skribis:

> From acd310d27c457139d3f2fcd2cfc1127167bf2c48 Mon Sep 17 00:00:00 2001
> From: Ben Woodcroft <donttrustben@gmail.com>
> Date: Thu, 7 Jan 2016 07:44:58 +1000
> Subject: [PATCH] gnu: Add fxtract.
>
> * gnu/packages/bioinformatics.scm (fxtract): New variable.

[...]

> +       `(("ctskennerton-util"
> +          ,(origin
> +             (method git-fetch)
> +             (uri (git-reference
> +                   (url "https://github.com/ctSkennerton/util.git")
> +                   (commit util-commit)))

This is GPLv2-only.  Could you mention it in a comment?

> +             (file-name (string-append
> +                         "ctstennerton-util-" util-commit "-checkout"))

I would make it:

  (string-append "ctstennerton-util-" (string-take util-commit 7)
                 "-checkout")

> +      (home-page "https://github.com/ctSkennerton/fxtract")
> +      (synopsis "Extract sequences from FASTA and FASTQ files")
> +      (description
> +       "Fxtract extracts sequences from a protein or nucleotide fastx (FASTA
> +or FASTQ) file given a subsequence.  It uses a simple substring search for
> +basic tasks but can change to using POSIX regular expressions, PCRE, hash
> +lookups or multi-pattern searching as required.  By default fxtract looks in
> +the sequence of each record but can also be told to look in the header,
> +comment or quality sections.")
> +      (license license:gpl3+))))

According to the ‘LICENSE’ file, this should be ‘license:expat’.

Otherwise LGTM.

Thanks,
Ludo’.

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

* Re: [PATCH] Add fxtract.
  2016-01-11 21:00 ` Ludovic Courtès
@ 2016-01-11 21:53   ` Ben Woodcroft
  0 siblings, 0 replies; 3+ messages in thread
From: Ben Woodcroft @ 2016-01-11 21:53 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel@gnu.org, Connor Skennerton



On 12/01/16 07:00, Ludovic Courtès wrote:
> Ben Woodcroft <b.woodcroft@uq.edu.au> skribis:
>
>>  From acd310d27c457139d3f2fcd2cfc1127167bf2c48 Mon Sep 17 00:00:00 2001
>> From: Ben Woodcroft <donttrustben@gmail.com>
>> Date: Thu, 7 Jan 2016 07:44:58 +1000
>> Subject: [PATCH] gnu: Add fxtract.
>>
>> * gnu/packages/bioinformatics.scm (fxtract): New variable.
> [...]
>
>> +       `(("ctskennerton-util"
>> +          ,(origin
>> +             (method git-fetch)
>> +             (uri (git-reference
>> +                   (url "https://github.com/ctSkennerton/util.git")
>> +                   (commit util-commit)))
> This is GPLv2-only.  Could you mention it in a comment?
>
>> +             (file-name (string-append
>> +                         "ctstennerton-util-" util-commit "-checkout"))
> I would make it:
>
>    (string-append "ctstennerton-util-" (string-take util-commit 7)
>                   "-checkout")
>
>> +      (home-page "https://github.com/ctSkennerton/fxtract")
>> +      (synopsis "Extract sequences from FASTA and FASTQ files")
>> +      (description
>> +       "Fxtract extracts sequences from a protein or nucleotide fastx (FASTA
>> +or FASTQ) file given a subsequence.  It uses a simple substring search for
>> +basic tasks but can change to using POSIX regular expressions, PCRE, hash
>> +lookups or multi-pattern searching as required.  By default fxtract looks in
>> +the sequence of each record but can also be told to look in the header,
>> +comment or quality sections.")
>> +      (license license:gpl3+))))
> According to the ‘LICENSE’ file, this should be ‘license:expat’.
>
> Otherwise LGTM.

Pushed with these changes. Thanks for picking up the mistakes.

ben

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

end of thread, other threads:[~2016-01-11 21:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-06 21:48 [PATCH] Add fxtract Ben Woodcroft
2016-01-11 21:00 ` Ludovic Courtès
2016-01-11 21:53   ` Ben Woodcroft

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.