GNU bug report logs - #28802
[PATCH] gnu: Add paml.

Previous Next

Package: guix-patches;

Reported by: Ricardo Wurmus <rekado <at> elephly.net>

Date: Thu, 12 Oct 2017 21:58:02 UTC

Severity: normal

Tags: patch

Done: Ricardo Wurmus <rekado <at> elephly.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 28802 in the body.
You can then email your comments to 28802 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#28802; Package guix-patches. (Thu, 12 Oct 2017 21:58:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ricardo Wurmus <rekado <at> elephly.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Thu, 12 Oct 2017 21:58:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: guix-patches <at> gnu.org
Cc: Ricardo Wurmus <ricardo.wurmus <at> mdc-berlin.de>
Subject: [PATCH] gnu: Add paml.
Date: Thu, 12 Oct 2017 23:56:32 +0200
From: Ricardo Wurmus <ricardo.wurmus <at> mdc-berlin.de>

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

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 9a47b076c..2de57d447 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -10085,3 +10085,53 @@ straight away.  Its main features are:
   and CHH context
 @end itemize\n")
     (license license:gpl3+)))
+
+(define-public paml
+  (package
+    (name "paml")
+    (version "4.9e")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://abacus.gene.ucl.ac.uk/software/"
+                                  "paml" version ".tgz"))
+              (sha256
+               (base32
+                "13zf6h9fiqghwhch2h06x1zdr6s42plsnqahflp5g7myr3han3s6"))
+              (modules '((guix build utils)))
+              ;; Remove Windows binaries
+              (snippet
+               '(begin
+                  (for-each delete-file (find-files "." "\\.exe$"))
+                  #t))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f ; there are no tests
+       #:make-flags '("CC=gcc")
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda _
+             (substitute* "src/BFdriver.c"
+               (("/bin/bash") (which "bash")))
+             (chdir "src")
+             #t))
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((tools '("baseml" "basemlg" "codeml"
+                            "pamp" "evolver" "yn00" "chi2"))
+                   (bin    (string-append (assoc-ref outputs "out") "/bin"))
+                   (docdir (string-append (assoc-ref outputs "out")
+                                           "/share/doc/paml"))
+                   (docs    '("Bismark_User_Guide.pdf"
+                              "RELEASE_NOTES.txt")))
+               (mkdir-p bin)
+               (for-each (lambda (file) (install-file file bin)) tools)
+               (copy-recursively "../doc" docdir)
+               #t))))))
+    (home-page "http://abacus.gene.ucl.ac.uk/software/paml.html")
+    (synopsis "Phylogentic analysis by maximum likelihood")
+    (description "PAML (for Phylogentic Analysis by Maximum Likelihood)
+contains a few programs for model fitting and phylogenetic tree reconstruction
+using nucleotide or amino-acid sequence data.")
+    ;; GPLv3 only
+    (license license:gpl3)))
-- 
2.14.1






Information forwarded to guix-patches <at> gnu.org:
bug#28802; Package guix-patches. (Fri, 13 Oct 2017 08:52:02 GMT) Full text and rfc822 format available.

Message #8 received at 28802 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Ricardo Wurmus <rekado <at> elephly.net>
Cc: Ricardo Wurmus <ricardo.wurmus <at> mdc-berlin.de>, 28802 <at> debbugs.gnu.org
Subject: Re: [bug#28802] [PATCH] gnu: Add paml.
Date: Fri, 13 Oct 2017 10:51:14 +0200
Ricardo Wurmus <rekado <at> elephly.net> skribis:

> From: Ricardo Wurmus <ricardo.wurmus <at> mdc-berlin.de>
>
> * gnu/packages/bioinformatics.scm (paml): New variable.

LGTM, thanks!

Ludo'.




Reply sent to Ricardo Wurmus <rekado <at> elephly.net>:
You have taken responsibility. (Fri, 13 Oct 2017 09:17:02 GMT) Full text and rfc822 format available.

Notification sent to Ricardo Wurmus <rekado <at> elephly.net>:
bug acknowledged by developer. (Fri, 13 Oct 2017 09:17:03 GMT) Full text and rfc822 format available.

Message #13 received at 28802-done <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: 28802-done <at> debbugs.gnu.org
Subject: Re: [PATCH] gnu: Add paml.
Date: Fri, 13 Oct 2017 11:15:56 +0200
> +                   (docs    '("Bismark_User_Guide.pdf"
> +                              "RELEASE_NOTES.txt")))

I removed this, because it is not used.
“guix lint” does not complain, so I pushed it to master.

-- 
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net





Information forwarded to guix-patches <at> gnu.org:
bug#28802; Package guix-patches. (Fri, 13 Oct 2017 09:24:02 GMT) Full text and rfc822 format available.

Message #16 received at 28802 <at> debbugs.gnu.org (full text, mbox):

From: Ben Woodcroft <b.woodcroft <at> uq.edu.au>
To: Ricardo Wurmus <rekado <at> elephly.net>, 28802 <at> debbugs.gnu.org
Cc: Ricardo Wurmus <ricardo.wurmus <at> mdc-berlin.de>
Subject: Re: [bug#28802] [PATCH] gnu: Add paml.
Date: Fri, 13 Oct 2017 19:23:11 +1000
Hi Ricardo,

Thanks for the package.


On 13/10/17 07:56, Ricardo Wurmus wrote:
> +         (replace 'install
> +           (lambda* (#:key outputs #:allow-other-keys)
> +             (let ((tools '("baseml" "basemlg" "codeml"
> +                            "pamp" "evolver" "yn00" "chi2"))
> +                   (bin    (string-append (assoc-ref outputs "out") "/bin"))
> +                   (docdir (string-append (assoc-ref outputs "out")
> +                                           "/share/doc/paml"))
> +                   (docs    '("Bismark_User_Guide.pdf"
> +                              "RELEASE_NOTES.txt")))
> +               (mkdir-p bin)
Since you've already pushed I didn't test out this package, but I notice 
that the above line is superfluous (though harmless).
ben




Information forwarded to guix-patches <at> gnu.org:
bug#28802; Package guix-patches. (Fri, 13 Oct 2017 09:38:01 GMT) Full text and rfc822 format available.

Message #19 received at 28802 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <ricardo.wurmus <at> mdc-berlin.de>
To: Ben Woodcroft <b.woodcroft <at> uq.edu.au>
Cc: 28802 <at> debbugs.gnu.org
Subject: Re: [bug#28802] [PATCH] gnu: Add paml.
Date: Fri, 13 Oct 2017 11:35:02 +0200
Hi Ben,

> On 13/10/17 07:56, Ricardo Wurmus wrote:
>> +         (replace 'install
>> +           (lambda* (#:key outputs #:allow-other-keys)
>> +             (let ((tools '("baseml" "basemlg" "codeml"
>> +                            "pamp" "evolver" "yn00" "chi2"))
>> +                   (bin    (string-append (assoc-ref outputs "out") "/bin"))
>> +                   (docdir (string-append (assoc-ref outputs "out")
>> +                                           "/share/doc/paml"))
>> +                   (docs    '("Bismark_User_Guide.pdf"
>> +                              "RELEASE_NOTES.txt")))
>> +               (mkdir-p bin)
> Since you've already pushed I didn't test out this package, but I notice 
> that the above line is superfluous (though harmless).

I removed the “docs” definition before pushing.

-- Ricardo




Information forwarded to guix-patches <at> gnu.org:
bug#28802; Package guix-patches. (Fri, 13 Oct 2017 10:24:02 GMT) Full text and rfc822 format available.

Message #22 received at 28802 <at> debbugs.gnu.org (full text, mbox):

From: Roel Janssen <roel <at> gnu.org>
To: Ricardo Wurmus <rekado <at> elephly.net>
Cc: Ricardo Wurmus <ricardo.wurmus <at> mdc-berlin.de>, 28802 <at> debbugs.gnu.org
Subject: Re: [bug#28802] [PATCH] gnu: Add paml.
Date: Fri, 13 Oct 2017 12:22:32 +0200
Ricardo Wurmus writes:

> From: Ricardo Wurmus <ricardo.wurmus <at> mdc-berlin.de>
>
> * gnu/packages/bioinformatics.scm (paml): New variable.
> ---
>  gnu/packages/bioinformatics.scm | 50 +++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 50 insertions(+)
>
> diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
> index 9a47b076c..2de57d447 100644
> --- a/gnu/packages/bioinformatics.scm
> +++ b/gnu/packages/bioinformatics.scm
> @@ -10085,3 +10085,53 @@ straight away.  Its main features are:
>    and CHH context
>  @end itemize\n")
>      (license license:gpl3+)))
> +
> +(define-public paml
> +  (package
> +    (name "paml")
> +    (version "4.9e")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (string-append "http://abacus.gene.ucl.ac.uk/software/"
> +                                  "paml" version ".tgz"))
> +              (sha256
> +               (base32
> +                "13zf6h9fiqghwhch2h06x1zdr6s42plsnqahflp5g7myr3han3s6"))
> +              (modules '((guix build utils)))
> +              ;; Remove Windows binaries
> +              (snippet
> +               '(begin
> +                  (for-each delete-file (find-files "." "\\.exe$"))
> +                  #t))))
> +    (build-system gnu-build-system)
> +    (arguments
> +     `(#:tests? #f ; there are no tests
> +       #:make-flags '("CC=gcc")
> +       #:phases
> +       (modify-phases %standard-phases
> +         (replace 'configure
> +           (lambda _
> +             (substitute* "src/BFdriver.c"
> +               (("/bin/bash") (which "bash")))
> +             (chdir "src")
> +             #t))
> +         (replace 'install
> +           (lambda* (#:key outputs #:allow-other-keys)
> +             (let ((tools '("baseml" "basemlg" "codeml"
> +                            "pamp" "evolver" "yn00" "chi2"))
> +                   (bin    (string-append (assoc-ref outputs "out") "/bin"))
> +                   (docdir (string-append (assoc-ref outputs "out")
> +                                           "/share/doc/paml"))
> +                   (docs    '("Bismark_User_Guide.pdf"
> +                              "RELEASE_NOTES.txt")))
> +               (mkdir-p bin)
> +               (for-each (lambda (file) (install-file file bin)) tools)
> +               (copy-recursively "../doc" docdir)
> +               #t))))))
> +    (home-page "http://abacus.gene.ucl.ac.uk/software/paml.html")
> +    (synopsis "Phylogentic analysis by maximum likelihood")
> +    (description "PAML (for Phylogentic Analysis by Maximum Likelihood)
> +contains a few programs for model fitting and phylogenetic tree reconstruction
> +using nucleotide or amino-acid sequence data.")
> +    ;; GPLv3 only
> +    (license license:gpl3)))

I guess I'm too late already.  I had a similar patch, but the program
uses the data files it ships with, and expects them to be in the same
location.  So this patch seems incomplete to me.

Anyway.. it has already been pushed.

Kind regards,
Roel Janssen




Information forwarded to guix-patches <at> gnu.org:
bug#28802; Package guix-patches. (Fri, 13 Oct 2017 13:26:02 GMT) Full text and rfc822 format available.

Message #25 received at 28802 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <ricardo.wurmus <at> mdc-berlin.de>
To: Roel Janssen <roel <at> gnu.org>
Cc: Ricardo Wurmus <rekado <at> elephly.net>, 28802 <at> debbugs.gnu.org
Subject: Re: [bug#28802] [PATCH] gnu: Add paml.
Date: Fri, 13 Oct 2017 15:25:34 +0200
Hi Roel,

> I guess I'm too late already.  I had a similar patch, but the program
> uses the data files it ships with, and expects them to be in the same
> location.  So this patch seems incomplete to me.

Oh, that’s too bad.  Do you have a test case we could use to verify that
the tools work correctly after installation?

It doesn’t seem to be easy to fix this, as variables in which file names
are stored are size-restricted, and as they are copied around multiple
times it is difficult to ensure that our patch wouldn’t break things.

Here’s an untested draft of the new phases, but I suspect this would
take a lot more work:

--8<---------------cut here---------------start------------->8---
       (modify-phases %standard-phases
         (replace 'configure
           (lambda _
             (substitute* "src/BFdriver.c"
               (("/bin/bash") (which "bash")))
             (let ((share (string-append (assoc-ref outputs "out")
                                         "/share/paml/")))
               (substitute* ""
                 (("aaRatefile = dat/jones.dat"
                   (string-append "aaRatefile = "
                                  share "jones.dat"))))
               (substitute* '("src/yn00.c"
                              "src/baseml.c"
                              "src/basemlg.c"
                              "src/pamp.c"
                              "src/codeml.c"
                              "src/mcmctree.c"
                              "src/BFdriver.c")
                 (("ctlf\\[...?\\] ?= ?\"(yn00|pamp|baseml|codeml|mcmctree).ctl\"" _ file)
                  (string-append "ctlf[PATH_MAX]=\""
                                 share file ".ctl\"")))
               (substitute* "src/codeml.c"
                 (("strcpy\\(com.daafile, \"jones.dat\"\\)")
                  (string-append "strcpy(com.daafile, \""
                                 share "jones.dat\")")))
               (substitute* "src/evolver.c"
                 (("char \\*MCctlf0\\[\\]=\\{\"MCbase.dat\",\"MCcodon.dat\",\"MCaa.dat\"\\}")
                  (string-append "char *MCctlf0[]={"
                                 (string-join
                                  (map (lambda (f)
                                         (string-append "\"" share f "\""))
                                       '("MCbase.dat" "MCcodon.dat" "MCaa.dat"))
                                  ",")
                                 "}"))))
             (chdir "src")
             #t))
         (replace 'install
           (lambda* (#:key outputs #:allow-other-keys)
             (let ((tools '("baseml" "basemlg" "codeml"
                            "pamp" "evolver" "yn00" "chi2"))
                   (bin    (string-append (assoc-ref outputs "out") "/bin"))
                   (docdir (string-append (assoc-ref outputs "out")
                                          "/share/doc/paml"))
                   (share  (string-append (assoc-ref outputs "out")
                                          "/share/paml"))
                   (data   (append (find-files ".." "\\.(ctl|dat)$")
                                   (find-files "../dat" "\\.dat$"))))
               (mkdir-p bin)
               (for-each (lambda (file) (install-file file bin)) tools)
               (for-each (lambda (file) (install-file file share)) data)
               (copy-recursively "../doc" docdir)
               #t))))
--8<---------------cut here---------------end--------------->8---

The alternative is to just install the data files to $out/share/paml and
expect users to copy them to their current working directory.  That
seems to work.

I prefer this over patching the code, which is much too invasive.

What do you think?

-- Ricardo




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 11 Nov 2017 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 224 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.