all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Marius Bakke <mbakke@fastmail.com>
To: Ben Woodcroft <donttrustben@gmail.com>, guix-devel@gnu.org
Subject: Re: [PATCH 4/4] gnu: Add prokka.
Date: Sat, 03 Dec 2016 20:47:32 +0100	[thread overview]
Message-ID: <87pol8bxrf.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me> (raw)
In-Reply-To: <20161203103901.27770-4-donttrustben@gmail.com>

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

Ben Woodcroft <donttrustben@gmail.com> writes:

> * gnu/packages/bioinformatics.scm (prokka): New variable.
> ---
>  gnu/packages/bioinformatics.scm | 110 ++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 110 insertions(+)
>
> diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
> index 4541791..c4f421c 100644
> --- a/gnu/packages/bioinformatics.scm
> +++ b/gnu/packages/bioinformatics.scm
> @@ -62,6 +62,7 @@
>    #:use-module (gnu packages image)
>    #:use-module (gnu packages imagemagick)
>    #:use-module (gnu packages java)
> +  #:use-module (gnu packages less)
>    #:use-module (gnu packages linux)
>    #:use-module (gnu packages logging)
>    #:use-module (gnu packages machine-learning)
> @@ -3743,6 +3744,115 @@ for sequences to be aligned and then, simultaneously with the alignment,
>  predicts the locations of structural units in the sequences.")
>      (license license:gpl2+)))
>  
> +(define-public prokka
> +  ;; There has been many commits since the last released version 1.11 so we
> +  ;; package from git.
> +  (let ((commit "1caf2394850998f89a3782cc8846dc51978faac2"))
> +    (package
> +      (name "prokka")
> +      (version (string-append "1.11-1." (string-take commit 8)))
> +      (source
> +       (origin
> +         (method git-fetch)
> +         (uri (git-reference
> +               (url "https://github.com/tseemann/prokka.git")
> +               (commit commit)))
> +         (file-name (string-append name "-" version "-checkout"))
> +         (sha256
> +          (base32
> +           "1h8dpmrcfw5z3w9sydgv4439v1wdidyq4nx247fyqahvn88rfsnj"))
> +         (modules '((guix build utils)))
> +         ;; Remove bundled code.
> +         (snippet '(begin
> +                     (delete-file-recursively "binaries")
> +                     (delete-file-recursively "perl5")
> +                     #t))))
> +      (build-system gnu-build-system)
> +      (arguments
> +       `(#:phases
> +         (modify-phases %standard-phases
> +           (delete 'configure)
> +           (replace 'build
> +             (lambda _
> +               (zero? (system* "bin/prokka" "--setupdb"))))
> +           (replace 'install
> +             (lambda* (#:key outputs #:allow-other-keys)
> +               ;; Set the path to the 'db' to refer to the share directory.
> +               (substitute* "bin/prokka"
> +                 (("^my \\$DBDIR = .*")
> +                  (string-append "my $DBDIR = '"
> +                                 (assoc-ref outputs "out")
> +                                 "/share/prokka/db';\n")))
> +               (let* ((out (assoc-ref outputs "out"))
> +                      (bin (string-append out "/bin"))
> +                      (prokka (string-append bin "/prokka"))
> +                      (share (string-append out "/share/prokka"))
> +                      (path (getenv "PATH"))
> +                      (perl5lib (getenv "PERL5LIB")))
> +                 (mkdir-p share)
> +                 (copy-recursively "db" (string-append share "/db"))
> +                 (install-file "bin/prokka" bin)
> +                 (install-file "bin/prokka-genbank_to_fasta_db" bin)
> +                 (wrap-program prokka
> +                   `("PATH" ":" prefix
> +                     (,(string-append path ":" out "/bin"))))
> +                 (for-each
> +                  (lambda (binary)
> +                    (wrap-program binary
> +                      `("PERL5LIB" ":" prefix
> +                        (,(string-append perl5lib ":" out
> +                                         "/lib/perl5/site_perl")))))
> +                  (list prokka (string-append
> +                                bin "/prokka-genbank_to_fasta_db"))))
> +               #t))
> +           (delete 'check)
> +           (add-after 'install 'post-install-check
> +             (lambda* (#:key inputs #:allow-other-keys)
> +               ;; There are no tests, instead we run a sanity check on an
> +               ;; entire genome.
> +               (zero? (system* "bin/prokka"
> +                               "--noanno"
> +                               "--outdir" "example-out"
> +                               (assoc-ref inputs "example-genome"))))))))
> +      (native-inputs
> +       `(("example-genome"
> +          ,(origin
> +             (method url-fetch)
> +             (uri "http://www.ebi.ac.uk/ena/data/view/CP002565&display=fasta")
> +             (file-name (string-append "ena-genome-CP002565.fasta"))
> +             (sha256
> +              (base32
> +               "0dv3m29kgyssjc96zbmb5khkrk7cy7a66bsjk2ricwc302g5hgfy"))))))
> +      (inputs
> +       `(("perl" ,perl)
> +         ("bioperl" ,bioperl-minimal)
> +         ("blast+" ,blast+)
> +         ("hmmer" ,hmmer)
> +         ("aragorn" ,aragorn)
> +         ("prodigal" ,prodigal)
> +         ("parallel" ,parallel)
> +         ("infernal" ,infernal)
> +         ("barrnap" ,barrnap)
> +         ("minced" ,minced)
> +         ("tbl2asn" ,ncbi-tools)
> +         ("grep" ,grep)
> +         ("sed" ,sed)
> +         ("less" ,less)
> +         ("perl-time-piece" ,perl-time-piece)
> +         ("perl-xml-simple" ,perl-xml-simple)
> +         ("perl-digest-md5" ,perl-digest-md5)))
> +      (home-page "http://www.vicbioinformatics.com/software.prokka.shtml")
> +      (synopsis "Rapid prokaryotic genome annotation")
> +      (description
> +       "Prokka is a software tool for the rapid annotation of prokaryotic
> +genomes.  It produces GFF3, GBK and SQN files that are ready for editing in
> +Sequin and ultimately submitted to Genbank/DDJB/ENA. ")
> +      (license (list license:gpl2
> +                     ;; Available under various licenses.
> +                     (license:non-copyleft
> +                      "file://doc"
> +                      "See license files in the doc directory."))))))

Wow, how much did Torsten pay you to package these ;)
It looks fine, but there are few enough licenses to list explicitly.
Prokka is GPL3+, Rfam and Pfam are CC0, while Uniprot and HAMAP can be
covered by a non-copyleft procedure mentioning the CC
Attribution-Noderivs license.

Thanks for this!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

  reply	other threads:[~2016-12-03 19:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-03 10:38 [PATCH 1/4] gnu: Add perl-time-piece Ben Woodcroft
2016-12-03 10:38 ` [PATCH 2/4] gnu: Add ncbi-tools Ben Woodcroft
2016-12-03 19:19   ` Ricardo Wurmus
2016-12-03 19:30   ` Marius Bakke
2016-12-03 10:39 ` [PATCH 3/4] gnu: Add barrnap Ben Woodcroft
2016-12-03 19:20   ` Ricardo Wurmus
2016-12-03 19:36   ` Marius Bakke
2016-12-04 15:51     ` Ricardo Wurmus
2016-12-03 10:39 ` [PATCH 4/4] gnu: Add prokka Ben Woodcroft
2016-12-03 19:47   ` Marius Bakke [this message]
2016-12-03 18:55 ` [PATCH 1/4] gnu: Add perl-time-piece Marius Bakke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pol8bxrf.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me \
    --to=mbakke@fastmail.com \
    --cc=donttrustben@gmail.com \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.