From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Woodcroft Subject: [PATCH] Add FastTree Date: Fri, 19 Jun 2015 17:24:18 +1000 Message-ID: <5583C3A2.1080906@uq.edu.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------070607010109010803090200" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40171) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5qfA-00027S-Pa for guix-devel@gnu.org; Fri, 19 Jun 2015 03:24:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z5qf6-0006o8-Ve for guix-devel@gnu.org; Fri, 19 Jun 2015 03:24:32 -0400 Received: from mailhub2.soe.uq.edu.au ([130.102.132.209]:57932 helo=newmailhub.uq.edu.au) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5qf6-0006hO-Cu for guix-devel@gnu.org; Fri, 19 Jun 2015 03:24:28 -0400 Received: from smtp1.soe.uq.edu.au (smtp1.soe.uq.edu.au [10.138.113.40]) by newmailhub.uq.edu.au (8.14.5/8.14.5) with ESMTP id t5J7OK4N008970 for ; Fri, 19 Jun 2015 17:24:21 +1000 Received: from [192.168.1.101] ([103.25.181.216]) (authenticated bits=0) by smtp1.soe.uq.edu.au (8.14.5/8.14.5) with ESMTP id t5J7OJtX006867 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT) for ; Fri, 19 Jun 2015 17:24:20 +1000 List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: "guix-devel@gnu.org" This is a multi-part message in MIME format. --------------070607010109010803090200 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Hi, I was a bit confused the best way to package FastTree as it is so simple - the install instructions just give how to run gcc and I couldn't find anything similar (enough for me) in other .scm files. I'm also not clear which version of gcc should be chosen - I chose 5.1 as it was new, but it also compiles with other versions. During development of this patch I noticed badly specified system* does not throw an error - is there a way to do this so? And more generally, there's no equivalent of make check here, should one be manually specified? Thanks, ben --------------070607010109010803090200 Content-Type: text/x-patch; name="0001-gnu-Add-fasttree.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-gnu-Add-fasttree.patch" >From b89cd0e855adc05e0f8ef6e2d6cdf6132af076e9 Mon Sep 17 00:00:00 2001 From: Ben Woodcroft Date: Fri, 19 Jun 2015 17:01:56 +1000 Subject: [PATCH] gnu: Add fasttree * gnu/packages/bioinformatics.scm (fasttree): New variable. --- gnu/packages/bioinformatics.scm | 63 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index 12c9175..311635b 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -34,6 +34,7 @@ #:use-module (gnu packages boost) #:use-module (gnu packages compression) #:use-module (gnu packages file) + #:use-module (gnu packages gcc) #:use-module (gnu packages java) #:use-module (gnu packages linux) #:use-module (gnu packages machine-learning) @@ -780,6 +781,68 @@ analysis (from RNA-Seq), transcription factor binding quantification in ChIP-Seq, and analysis of metagenomic data.") (license license:artistic2.0))) +(define-public fasttree + (package + (name "fasttree") + (version "2.1.8") + (source (origin + (method url-fetch) + (uri (string-append + "http://www.microbesonline.org/fasttree/FastTree-" + version + ".c" + )) + (sha256 + (base32 + "0dzqc9vr9iiiw21y159xfjl2z90vw0y7r4x6456pcaxiy5hd2wmi")))) + (build-system trivial-build-system) + (arguments + '(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils) (system base compile)) + (let ((source (assoc-ref %build-inputs "source")) + (gcc (assoc-ref %build-inputs "gcc")) + (glibc (assoc-ref %build-inputs "glibc")) + (binutils (assoc-ref %build-inputs "binutils")) + (out (assoc-ref %outputs "out"))) + (setenv "PATH" (string-append binutils "/bin:" gcc "/bin")) + (setenv "LIBRARY_PATH" (string-append glibc "/lib")) + (let ((bin (string-append out "/bin"))) + (mkdir-p bin) + (system* "gcc" + "-O3" + "-finline-functions" + "-funroll-loops" + "-Wall" + "-o" + (string-append bin "/FastTree") + source + "-lm") + (system* "gcc" + "-DOPENMP" + "-fopenmp" + "-O3" + "-finline-functions" + "-funroll-loops" + "-Wall" + "-o" + (string-append bin "/FastTreeMP") + source + "-lm")))))) + (native-inputs + `(("gcc", gcc-5.1) + ("binutils" ,binutils) + ("glibc" ,glibc))) + (home-page "http://www.microbesonline.org/fasttree") + (synopsis "FastTree infers approximately-maximum-likelihood +phylogenetic trees from alignments of nucleotide or protein sequences") + (description + "FastTree can handle alignments with up to a million of sequences in +a reasonable amount of time and memory. For large alignments, FastTree is +100-1,000 times faster than PhyML 3.0 or RAxML 7.") + (license license:gpl2+))) + (define-public fastx-toolkit (package (name "fastx-toolkit") -- 2.1.4 --------------070607010109010803090200--