From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marius Bakke Subject: Re: [PATCH] gnu: Add mash. Date: Thu, 08 Sep 2016 23:06:44 +0100 Message-ID: <87eg4urqq3.fsf@ike.i-did-not-set--mail-host-address--so-tickle-me> References: <87h9a2yweu.fsf@ike.i-did-not-set--mail-host-address--so-tickle-me> <20160831194426.GC22495@jasmine> <87zinsae3u.fsf@elephly.net> <87shtkq6rc.fsf@ike.i-did-not-set--mail-host-address--so-tickle-me> <20160906210127.GB1089@jasmine> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41246) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bi7TK-0006pj-9J for guix-devel@gnu.org; Thu, 08 Sep 2016 18:07:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bi7TG-00049f-6e for guix-devel@gnu.org; Thu, 08 Sep 2016 18:07:02 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:60566) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bi7TD-00048C-Og for guix-devel@gnu.org; Thu, 08 Sep 2016 18:06:58 -0400 In-Reply-To: <20160906210127.GB1089@jasmine> 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" To: Leo Famulari Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain Leo Famulari writes: > On Thu, Sep 01, 2016 at 11:00:39AM +0100, Marius Bakke wrote: >> I had these in inputs initially and was surprised to see no references. >> Both seems to be compiled into the final program[0]: when running "mash >> info" on an invalid file (the provided data/refseq.msh), a generic >> capnproto exception is thrown (src/capnp/serialize.c++:159). > > I wonder, does using native-inputs work when building mash for another > architecture? That's interesting, the package indeed fails to build on i686. Sketch.cpp:(.text+0xdf): undefined reference to `memcpy@GLIBC_2.2.5' I don't understand why, the symbol versions should be the same, no? Are there any clever linker flags we can throw at it, or is setting supported-systems acceptable? >> That raises another question: should the htslib and capnproto licenses >> be listed too, since they are part of the binary output? > > Good question, I'm not sure. I'd guess "yes", along with a code comment > explaining what's going on. I've attached a patch below, with license comments and amd64 only. >> I'm not a bioinformatician (just a mere sysadmin for such), but have >> been going through the tutorial and things appear to work fine. > > Ah, bioinformatics software... all bets are off ;) You haven't seen anything yet! This is the nice part of my queue ;) Thanks! Marius --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-gnu-Add-mash.patch >From 9e8102ed2d5bf9334e5311f2ac917aed2f451361 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Tue, 30 Aug 2016 18:49:21 +0100 Subject: [PATCH] gnu: Add mash. * gnu/packages/bioinformatics.scm (mash): New variable. --- gnu/packages/bioinformatics.scm | 57 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index f34acd1..decca6c 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -76,6 +76,7 @@ #:use-module (gnu packages python) #:use-module (gnu packages readline) #:use-module (gnu packages ruby) + #:use-module (gnu packages serialization) #:use-module (gnu packages statistics) #:use-module (gnu packages tbb) #:use-module (gnu packages tex) @@ -3046,6 +3047,62 @@ sequences).") "http://mafft.cbrc.jp/alignment/software/license.txt" "BSD-3 with different formatting")))) +(define-public mash + (package + (name "mash") + (version "1.1.1") + (source (origin + (method url-fetch) + (uri (string-append + "https://github.com/marbl/mash/archive/v" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "08znbvqq5xknfhmpp3wcj574zvi4p7i8zifi67c9qw9a6ikp42fj")) + (modules '((guix build utils))) + (snippet + ;; Delete bundled kseq. + ;; TODO: Also delete bundled murmurhash and open bloom filter. + '(delete-file "src/mash/kseq.h")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; No tests. + #:configure-flags + (list + (string-append "--with-capnp=" (assoc-ref %build-inputs "capnproto")) + (string-append "--with-gsl=" (assoc-ref %build-inputs "gsl"))) + #:make-flags (list "CC=gcc") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'fix-includes + (lambda _ + (substitute* '("src/mash/Sketch.cpp" "src/mash/CommandFind.cpp") + (("^#include \"kseq\\.h\"") + "#include \"htslib/kseq.h\"")) + #t)) + (add-before 'configure 'autoconf + (lambda _ (zero? (system* "autoconf"))))))) + (native-inputs + `(("autoconf" ,autoconf) + ;; Capnproto and htslib are statically embedded in the final + ;; application. Therefore we also list their licenses, below. + ("capnproto" ,capnproto) + ("htslib" ,htslib))) + (inputs + `(("gsl" ,gsl) + ("zlib" ,zlib))) + (supported-systems '("x86_64-linux")) + (home-page "https://mash.readthedocs.io") + (synopsis "Fast genome and metagenome distance estimation using MinHash") + (description "Mash is a fast sequence distance estimator that uses the +MinHash algorithm and is designed to work with genomes and metagenomes in the +form of assemblies or reads.") + (license (list license:bsd-3 ; Mash + license:expat ; HTSlib and capnproto + license:public-domain ; MurmurHash 3 + license:cpl1.0)))) ; Open Bloom Filter + (define-public metabat (package (name "metabat") -- 2.9.3 --=-=-=--