all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ben Woodcroft <b.woodcroft@uq.edu.au>
To: "guix-devel@gnu.org" <guix-devel@gnu.org>
Subject: [PATCHES] Add vsearch.
Date: Tue, 29 Sep 2015 22:24:21 +1000	[thread overview]
Message-ID: <560A82F5.4090200@uq.edu.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 213 bytes --]

Excellent to see an open source competitor to usearch.

Thanks in advance for review as usual. I'm not especially adept at using 
gcc's flags so perhaps some attention is warranted in the second patch's 
snippet.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-cityhash.patch --]
[-- Type: text/x-patch; name="0001-gnu-Add-cityhash.patch", Size: 2010 bytes --]

From e1789cbcfcf7dc6f1657f53bad04fca7180400cc Mon Sep 17 00:00:00 2001
From: Ben Woodcroft <donttrustben@gmail.com>
Date: Tue, 29 Sep 2015 22:10:33 +1000
Subject: [PATCH 1/2] gnu: Add cityhash.

* gnu/packages/textutils.scm (cityhash): New variable.
---
 gnu/packages/textutils.scm | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/gnu/packages/textutils.scm b/gnu/packages/textutils.scm
index 95a8ad1..5204297 100644
--- a/gnu/packages/textutils.scm
+++ b/gnu/packages/textutils.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
 ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2015 Ben Woodcroft <donttrustben@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -153,3 +154,26 @@ encoding, supporting Unicode version 7.0.")
      "libgtextutils is a text utilities library used by the fastx toolkit from
 the Hannon Lab.")
     (license license:agpl3+)))
+
+(define-public cityhash
+  (let ((commit "8af9b8c")
+        (revision "1"))
+    (package
+      (name "cityhash")
+      (version (string-append "1.1." revision "." commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/google/cityhash.git")
+                      (commit commit)))
+                (file-name (string-append name "-" version ".tar.gz"))
+                (sha256
+                 (base32
+                  "0n6skf5dv8yfl1ckax8dqhvsbslkwc9158zf2ims0xqdvzsahbi6"))))
+    (build-system gnu-build-system)
+    (home-page "https://github.com/google/cityhash")
+    (synopsis "A family of functions for strings")
+    (description
+     "CityHash provides hash functions for strings.  The functions mix the
+input bits thoroughly but are not suitable for cryptography.")
+    (license license:expat))))
-- 
2.4.3


[-- Attachment #3: 0002-gnu-Add-vsearch.patch --]
[-- Type: text/x-patch, Size: 3669 bytes --]

From c2470ec0681ccb18687bae5459247dc869fc8555 Mon Sep 17 00:00:00 2001
From: Ben Woodcroft <donttrustben@gmail.com>
Date: Tue, 29 Sep 2015 22:17:10 +1000
Subject: [PATCH 2/2] gnu: Add vsearch.

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

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 8fc6142..f484efc 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -33,6 +33,7 @@
   #:use-module (guix build-system ruby)
   #:use-module (guix build-system trivial)
   #:use-module (gnu packages)
+  #:use-module (gnu packages autotools)
   #:use-module (gnu packages algebra)
   #:use-module (gnu packages base)
   #:use-module (gnu packages boost)
@@ -53,6 +54,7 @@
   #:use-module (gnu packages statistics)
   #:use-module (gnu packages tbb)
   #:use-module (gnu packages textutils)
+  #:use-module (gnu packages tls)
   #:use-module (gnu packages vim)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xml)
@@ -2709,6 +2711,64 @@ data in the form of VCF files.")
     ;; at http://vcftools.sourceforge.net/license.html
     (license license:lgpl3)))
 
+(define-public vsearch
+  (package
+    (name "vsearch")
+    (version "1.4.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://github.com/torognes/vsearch/archive/v"
+             version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "16cr3wd59qkhb5p4yakphz2k4qd09s9kfgavyzzngal6qzqd4km2"))
+       (modules '((guix build utils)))
+       (snippet
+        '(begin
+           ;; Remove bundled cityhash
+           (substitute* "src/Makefile.am"
+             (((string-append "^AM_CXXFLAGS=-I\\$\\{srcdir\\}/cityhash"
+                              " -O3 -mtune=native -Wall -Wsign-compare"))
+              (string-append "AM_CXXFLAGS=-lcityhash"
+                             " -O3 -mtune=native -Wall -Wsign-compare"))
+             (("^__top_builddir__bin_vsearch_SOURCES = cityhash/city.h \\\\")
+              "__top_builddir__bin_vsearch_SOURCES = \\")
+             (("^cityhash/config.h \\\\") "\\")
+             (("^cityhash/city.cc \\\\") "\\"))
+           (substitute* "src/vsearch.h"
+             (("^\\#include \"cityhash/city.h\"")
+              "#include <city.h>"))
+           (delete-file-recursively "src/cityhash")
+           #t))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'autogen
+                     (lambda _ (zero? (system* "autoreconf" "-vif")))))))
+    (inputs
+     `(("zlib" ,zlib)
+       ("bzip2" ,bzip2)
+       ("cityhash" ,cityhash)))
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("openssl" ,openssl)))
+    (synopsis "Sequence search tools for metagenomics")
+    (description
+     "VSEARCH supports DNA sequence searching, clustering, chimera detection,
+dereplication, pairwise alignment, shuffling, subsampling, sorting and
+masking.  The tool takes advantage of parallelism in the form of SIMD
+vectorization as well as multiple threads to perform accurate alignments at
+high speed.  VSEARCH uses an optimal global aligner (full dynamic programming
+Needleman-Wunsch).")
+    (home-page "https://github.com/torognes/vsearch")
+    ;; dual licensed
+    (license (list license:gpl3 license:bsd-2))))
+
 (define-public bio-locus
   (package
     (name "bio-locus")
-- 
2.4.3


             reply	other threads:[~2015-09-29 12:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-29 12:24 Ben Woodcroft [this message]
2015-09-30  2:44 ` [PATCHES] Add vsearch Ben Woodcroft
2015-09-30  8:37 ` Ben Woodcroft
2015-10-01  8:55   ` Ludovic Courtès
  -- strict thread matches above, loose matches on Subject: below --
2015-09-29 22:47 Ben Woodcroft
2015-10-01 14:05 ` Ludovic Courtès
2015-10-01 19:41   ` Andreas Enge
2015-10-02 11:40     ` Ricardo Wurmus
2015-10-02 18:05       ` Andreas Enge
2015-10-03  1:59   ` Ben Woodcroft
2015-10-03 12:00     ` Andreas Enge
2015-10-03 20:50     ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=560A82F5.4090200@uq.edu.au \
    --to=b.woodcroft@uq.edu.au \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.