From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: [PATCH] Add BLESS (was: Re: Bioinformatics package: Bless) Date: Fri, 6 Nov 2015 15:28:23 +0100 Message-ID: References: <2238503.mBpvBuW9qZ@myrada> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58932) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zui0U-0006dS-Tq for guix-devel@gnu.org; Fri, 06 Nov 2015 09:28:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zui0O-0005B5-D1 for guix-devel@gnu.org; Fri, 06 Nov 2015 09:28:46 -0500 Received: from pegasus.bbbm.mdc-berlin.de ([141.80.25.20]:46468) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zui0O-000551-1E for guix-devel@gnu.org; Fri, 06 Nov 2015 09:28:40 -0500 In-Reply-To: <2238503.mBpvBuW9qZ@myrada> 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: Diane Trout Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi, > One of our users asked me to install a package "bless" that required a = newer=20 > version of MPI than Debian provides, so I thought I'd try to build a gu= ix=20 > package as Guix actually has openmpi 1.8 packaged. Great! Thank you for your contribution. > The source tarball has the GPL-3 LICENSE file, however it does also con= tain=20 > convenience copies of other source, and in my packaging I only spliced = out one=20 > -- the pigz dependency. I have taken your recipe and removed more bundled sources in a snippet. There=E2=80=99s still bundled stuff that we should get rid of, most impor= tantly kmc, which brings its own executables. I also changed the description based on the paper; instead of patching the Makefile I overwrite the make flags. Attached is a patch. Does this work for you? What do others think about this patch? ~~ Ricardo --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename="0001-gnu-Add-BLESS.patch" >From 11496448abe3717279d5b6a5d31eedae7a1dcc89 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Fri, 6 Nov 2015 15:22:26 +0100 Subject: [PATCH] gnu: Add BLESS. * gnu/packages/bioinformatics.scm (bless): New variable. --- gnu/packages/bioinformatics.scm | 83 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index fbc1f4e..c28f833 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -44,6 +44,7 @@ #:use-module (gnu packages linux) #:use-module (gnu packages machine-learning) #:use-module (gnu packages maths) + #:use-module (gnu packages mpi) #:use-module (gnu packages ncurses) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) @@ -524,6 +525,88 @@ confidence to have in an alignment.") license:lgpl2.0+ license:asl2.0)))) +(define-public bless + (package + (name "bless") + (version "1p02") + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/bless-ec/bless.v" + version ".tgz")) + (sha256 + (base32 + "0rm0gw2s18dqwzzpl3c2x1z05ni2v0xz5dmfk3d33j6g4cgrlrdd")) + (modules '((guix build utils))) + (snippet + `(begin + ;; Remove bundled boost, pigz, zlib, and .git directory + ;; FIXME: also remove bundled sources for google-sparsehash, + ;; murmurhash3, kmc once packaged. + (delete-file-recursively "boost") + (delete-file-recursively "pigz") + (delete-file-recursively "zlib") + (delete-file-recursively ".git") + #t)))) + (build-system gnu-build-system) + (arguments + '(#:tests? #f ;no "check" target + #:make-flags + (list (string-append "ZLIB=" + (assoc-ref %build-inputs "zlib") + "/lib/libz.a") + (string-append "LDFLAGS=" + (string-join '("-lboost_filesystem" + "-lboost_system" + "-lboost_iostreams" + "-lz" + "-fopenmp" + "-std=c++11")))) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'do-not-build-bundled-pigz + (lambda* (#:key inputs outputs #:allow-other-keys) + (substitute* "Makefile" + (("cd pigz/pigz-2.3.3; make") "")) + #t)) + (add-after 'unpack 'patch-paths-to-executables + (lambda* (#:key inputs outputs #:allow-other-keys) + (substitute* "parse_args.cpp" + (("kmc_binary = .*") + (string-append "kmc_binary = \"" + (assoc-ref outputs "out") + "/bin/kmc\";")) + (("pigz_binary = .*") + (string-append "pigz_binary = \"" + (assoc-ref inputs "pigz") + "/bin/pigz\";"))) + #t)) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((bin (string-append (assoc-ref outputs "out") "/bin/"))) + (for-each (lambda (file) + (install-file file bin)) + '("bless" "kmc/bin/kmc")) + #t))) + (delete 'configure)))) + (native-inputs + `(("perl" ,perl))) + (inputs + `(("openmpi" ,openmpi) + ("boost" ,boost) + ("pigz" ,pigz) + ("zlib" ,zlib))) + (home-page "http://sourceforge.net/projects/bless-ec/wiki/Home/") + (synopsis "Bloom-filter-based error correction tool for NGS reads") + (description + "@dfn{Bloom-filter-based error correction solution for high-throughput +sequencing reads} (BLESS) uses a single minimum-sized Bloo filter is a +correction tool for genomic reads produced by @dfn{Next-generation +sequencing} (NGS). BLESS produces accurate correction results with much less +memory compared with previous solutions and is also able to tolerate a higher +false-positive rate. BLESS can extend reads like DNA assemblers to correct +errors at the end of reads.") + (license license:gpl3+))) + (define-public bowtie (package (name "bowtie") -- 2.1.0 --=-=-=--