On 26/07/15 05:26, Ricardo Wurmus wrote:
Hi Ben,

+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'enter-dir
+                    (lambda _ (chdir "core") #t))
+         ;; on advice from the MAFFT authors, do not distribute mafft-profile,
+         ;; mafft-distance mafft-homologs.rb
What does this mean?  Are they non-free software?  If so, they should be
removed in a snippet.

Sorry for the confusion. MAFFT itself is all free software, but on the website it allows you to download a version "with-extensions" which includes non-free software.

I contacted the MAFFT authors and they suggested that there was no need to distribute these three programs in a mafft package. I've updated the comment to clarify.

I'm actually a bit confused as to the difference between a snippet vs. a patch stage as above - when is each appropriate? Snippets are only for removing non-free software?


+         (add-after 'enter-dir 'patch-makefile
+                    (lambda _
+                      (substitute* "Makefile"
+                        (("^SCRIPTS = mafft mafft-homologs.rb")
+                         "SCRIPTS = mafft")
+                        (((string-append "^PROGS = dvtditr dndfast7 dndblast"
+                                         " sextet5 mafft-distance"))
+                         "PROGS = dvtditr dndfast7 dndblast sextet5")
+                        (((string-append "splittbfast disttbfast tbfast "
+                                         "mafft-profile f2cl mccaskillwrap"))
+                         "splittbfast disttbfast tbfast f2cl mccaskillwrap")
This line looks particularly unclear.  It took me a little too long to
find the difference in the replacement.  Is there a nicer regular
expression that you could use to indicate the removal of
“mafft-profile”?

I've added comments and alignment.

ben
>From ce50d7382c8f7f092faa56ff5316134417a9eca1 Mon Sep 17 00:00:00 2001
From: Ben Woodcroft <donttrust...@gmail.com>
Date: Sun, 26 Jul 2015 13:01:01 +1000
Subject: [PATCH] gnu: Add mafft.

* gnu/packages/bioinformatics.scm (mafft): New variable
---
 gnu/packages/bioinformatics.scm | 59 +++++++++++++++++++++++++++++++++++++----
 1 file changed, 54 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 38f01a8..11ef454 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -54,6 +54,54 @@
   #:use-module (gnu packages xml)
   #:use-module (gnu packages zip))
 
+(define-public aragorn
+  (package
+    (name "aragorn")
+    (version "1.2.36")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "http://mbio-serv2.mbioekol.lu.se/ARAGORN/Downloads/aragorn";
+                    version ".tgz"))
+              (sha256
+               (base32
+                "1dg7jlz1qpqy88igjxd6ncs11ccsirb36qv1z01a0np4i4jh61mb"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f ; there are no tests
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (replace 'build
+                  (lambda _
+                    (zero? (system* "gcc"
+                                    "-O3"
+                                    "-ffast-math"
+                                    "-finline-functions"
+                                    "-o"
+                                    "aragorn"
+                                    (string-append "aragorn" ,version ".c")))))
+         (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 bin)
+                      (copy-file "aragorn"
+                                 (string-append bin "/aragorn"))
+                      (mkdir-p man)
+                      (copy-file "aragorn.1"
+                                 (string-append man "/aragorn.1")))
+                    #t)))))
+    (home-page "http://mbio-serv2.mbioekol.lu.se/ARAGORN";)
+    (synopsis "Detect tRNA, mtRNA and tmRNA genes in nucleotide sequences")
+    (description
+     "Aragorn identifies transfer RNA, mitochondrial RNA and
+transfer-messenger RNA from nucleotide sequences, based on homology to known
+tRNA consensus sequences and RNA structure.  It also outputs the secondary
+structure of the predicted RNA.")
+    (license license:gpl2)))
+
 (define-public bamtools
   (package
     (name "bamtools")
@@ -148,7 +196,7 @@ computational cluster.")
 (define-public bedtools
   (package
     (name "bedtools")
-    (version "2.22.0")
+    (version "2.24.0")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://github.com/arq5x/bedtools2/archive/v";
@@ -156,7 +204,7 @@ computational cluster.")
               (file-name (string-append name "-" version ".tar.gz"))
               (sha256
                (base32
-                "16aq0w3dmbd0853j32xk9jin4vb6v6fgakfyvrsmsjizzbn3fpfl"))))
+                "0lnxrjvs3nnmb4bmskag1wg3h2hd80przz5q3xd0bvs7vyxrvpbl"))))
     (build-system gnu-build-system)
     (native-inputs `(("python" ,python-2)))
     (inputs `(("samtools" ,samtools)
@@ -1409,7 +1457,7 @@ sequencing tag position and orientation.")
                 "0xi7klbsgi049vsrk6jiwh9wfj3b770gz3c8c7zwij448v0dr73d"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:tests? #f ; no automated tests, though there are tests in the readme
+     `(#:tests? #f ; no automated tests, though there are tests in the read me
        #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
                           (string-append "BINDIR=" (string-append
                                                     (assoc-ref %outputs "out")
@@ -1424,10 +1472,11 @@ sequencing tag position and orientation.")
                       ;; distribute mafft-profile, mafft-distance, or
                       ;; mafft-homologs.rb as they are too "specialised".
                       (substitute* "Makefile"
+                        ;; remove mafft-homologs.rb from SCRIPTS
                         (("^SCRIPTS = mafft mafft-homologs.rb")
                          "SCRIPTS = mafft")
-                        ;; remove mafft-distance from PROGS 
-                       (((string-append "^PROGS = dvtditr dndfast7 dndblast"
+                        ;; remove mafft-distance from PROGS
+                        (((string-append "^PROGS = dvtditr dndfast7 dndblast"
                                          " sextet5 mafft-distance"))
                          "PROGS = dvtditr dndfast7 dndblast sextet5")
                         ;; remove mafft-profile from PROGS
-- 
2.4.3

Reply via email to