From ee6e0c4336ac34750ee4210edbf3cdb2a2ebae30 Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Thu, 24 Mar 2016 13:53:06 +0000 Subject: [PATCH] Jellyfish is a tool for fast, memory-efficient counting of k-mers in DNA. A k-mer is a substring of length k, and counting the occurrences of all such substrings is a central step in many analyses of DNA sequence. JELLYFISH can count k-mers quickly by using an efficient encoding of a hash table and by exploiting the "compare-and-swap" CPU instruction to increase parallelism. WWW: http://www.genome.umd.edu/jellyfish.html PR: 207929 Submitted by: bacon4000@gmail.com --- biology/Makefile | 1 + biology/jellyfish/Makefile | 46 ++++++++++++++++ biology/jellyfish/distinfo | 2 + .../patch-include_jellyfish_file__header.hpp | 35 ++++++++++++ biology/jellyfish/pkg-descr | 7 +++ biology/jellyfish/pkg-plist | 55 +++++++++++++++++++ 6 files changed, 146 insertions(+) create mode 100644 biology/jellyfish/Makefile create mode 100644 biology/jellyfish/distinfo create mode 100644 biology/jellyfish/files/patch-include_jellyfish_file__header.hpp create mode 100644 biology/jellyfish/pkg-descr create mode 100644 biology/jellyfish/pkg-plist diff --git a/biology/Makefile b/biology/Makefile index 1f9a2d813665..89b081a81358 100644 --- a/biology/Makefile +++ b/biology/Makefile @@ -38,6 +38,7 @@ SUBDIR += htslib SUBDIR += iolib SUBDIR += jalview + SUBDIR += jellyfish SUBDIR += lagan SUBDIR += lamarc SUBDIR += libgtextutils diff --git a/biology/jellyfish/Makefile b/biology/jellyfish/Makefile new file mode 100644 index 000000000000..7f0d46d9b8e9 --- /dev/null +++ b/biology/jellyfish/Makefile @@ -0,0 +1,46 @@ +# Created by: Jason Bacon +# $FreeBSD$ + +PORTNAME= jellyfish +PORTVERSION= 2.2.4 +DISTVERSIONPREFIX= v +CATEGORIES= biology + +MAINTAINER= bacon4000@gmail.com +COMMENT= Fast, memory-efficient counting of k-mers in DNA + +LICENSE= GPLv3+ +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= yaggo:${PORTSDIR}/devel/yaggo + +GNU_CONFIGURE= yes + +USES= autoreconf compiler:c++11-lib gmake \ + libtool pkgconfig +USE_LDCONFIG= yes + +USE_GITHUB= yes +GH_ACCOUNT= gmarcais +GH_PROJECT= Jellyfish + +INSTALL_TARGET= install-strip + +.include + +# SSE code assumes amd64 features +.if ${ARCH} != "amd64" +.if ${OSVERSION} < 1000000 +IGNORE= multiple code issues on i386 < 10.0-RELEASE +.else +CONFIGURE_ARGS+=--without-sse +.endif +.endif + +# configure does not support --with-pkgconfigdir +post-patch: + @${REINPLACE_CMD} \ + -e 's|$$(libdir)/pkgconfig|${PREFIX}/libdata/pkgconfig|g' \ + ${WRKSRC}/Makefile.am + +.include diff --git a/biology/jellyfish/distinfo b/biology/jellyfish/distinfo new file mode 100644 index 000000000000..d09583d95dfd --- /dev/null +++ b/biology/jellyfish/distinfo @@ -0,0 +1,2 @@ +SHA256 (gmarcais-Jellyfish-v2.2.4_GH0.tar.gz) = 44b6478aed63b859b8287d72b4f9bfb5d513fed334efbc8a9e5783da12ecb3ec +SIZE (gmarcais-Jellyfish-v2.2.4_GH0.tar.gz) = 658653 diff --git a/biology/jellyfish/files/patch-include_jellyfish_file__header.hpp b/biology/jellyfish/files/patch-include_jellyfish_file__header.hpp new file mode 100644 index 000000000000..9c2b77c5472d --- /dev/null +++ b/biology/jellyfish/files/patch-include_jellyfish_file__header.hpp @@ -0,0 +1,35 @@ +--- include/jellyfish/file_header.hpp.orig 2015-10-27 14:32:31 UTC ++++ include/jellyfish/file_header.hpp +@@ -21,6 +21,8 @@ + #include + #include + ++using std::string; ++ + namespace jellyfish { + /// A header with jellyfish hash specific entries: size, matrix, etc. + class file_header : public generic_file_header { +@@ -42,7 +44,10 @@ public: + + RectangularBinaryMatrix matrix(int i = 1) const { + std::string name("matrix"); +- name += std::to_string((long long int)i); // Cast to make gcc4.4 happy! ++ char buff[100]; ++ // name += std::to_string((long long int)i); // Cast to make gcc4.4 happy! ++ snprintf(buff, 99, "%d", i); ++ name += buff; + const unsigned int r = root_[name]["r"].asUInt(); + const unsigned int c = root_[name]["c"].asUInt(); + std::vector raw(c, (uint64_t)0); +@@ -53,7 +58,10 @@ public: + + void matrix(const RectangularBinaryMatrix& m, int i = 1) { + std::string name("matrix"); +- name += std::to_string((long long int)i); ++ char buff[100]; ++ // name += std::to_string((long long int)i); ++ snprintf(buff, 99, "%d", i); ++ name += buff; + root_[name].clear(); + root_[name]["r"] = m.r(); + root_[name]["c"] = m.c(); diff --git a/biology/jellyfish/pkg-descr b/biology/jellyfish/pkg-descr new file mode 100644 index 000000000000..b1741329c04e --- /dev/null +++ b/biology/jellyfish/pkg-descr @@ -0,0 +1,7 @@ +Jellyfish is a tool for fast, memory-efficient counting of k-mers in DNA. +A k-mer is a substring of length k, and counting the occurrences of all such +substrings is a central step in many analyses of DNA sequence. JELLYFISH can +count k-mers quickly by using an efficient encoding of a hash table and by +exploiting the "compare-and-swap" CPU instruction to increase parallelism. + +WWW: http://www.genome.umd.edu/jellyfish.html diff --git a/biology/jellyfish/pkg-plist b/biology/jellyfish/pkg-plist new file mode 100644 index 000000000000..1c0159e20271 --- /dev/null +++ b/biology/jellyfish/pkg-plist @@ -0,0 +1,55 @@ +bin/jellyfish +include/jellyfish-2.2.4/jellyfish/allocators_mmap.hpp +include/jellyfish-2.2.4/jellyfish/atomic_bits_array.hpp +include/jellyfish-2.2.4/jellyfish/atomic_field.hpp +include/jellyfish-2.2.4/jellyfish/atomic_gcc.hpp +include/jellyfish-2.2.4/jellyfish/backtrace.hpp +include/jellyfish-2.2.4/jellyfish/binary_dumper.hpp +include/jellyfish-2.2.4/jellyfish/bloom_common.hpp +include/jellyfish-2.2.4/jellyfish/bloom_counter2.hpp +include/jellyfish-2.2.4/jellyfish/bloom_filter.hpp +include/jellyfish-2.2.4/jellyfish/circular_buffer.hpp +include/jellyfish-2.2.4/jellyfish/compare_and_swap.hpp +include/jellyfish-2.2.4/jellyfish/cooperative_pool.hpp +include/jellyfish-2.2.4/jellyfish/cooperative_pool2.hpp +include/jellyfish-2.2.4/jellyfish/cpp_array.hpp +include/jellyfish-2.2.4/jellyfish/divisor.hpp +include/jellyfish-2.2.4/jellyfish/dumper.hpp +include/jellyfish-2.2.4/jellyfish/err.hpp +include/jellyfish-2.2.4/jellyfish/file_header.hpp +include/jellyfish-2.2.4/jellyfish/generator_manager.hpp +include/jellyfish-2.2.4/jellyfish/generic_file_header.hpp +include/jellyfish-2.2.4/jellyfish/hash_counter.hpp +include/jellyfish-2.2.4/jellyfish/int128.hpp +include/jellyfish-2.2.4/jellyfish/jellyfish.hpp +include/jellyfish-2.2.4/jellyfish/json.h +include/jellyfish-2.2.4/jellyfish/large_hash_array.hpp +include/jellyfish-2.2.4/jellyfish/large_hash_iterator.hpp +include/jellyfish-2.2.4/jellyfish/locks_pthread.hpp +include/jellyfish-2.2.4/jellyfish/mapped_file.hpp +include/jellyfish-2.2.4/jellyfish/mer_dna.hpp +include/jellyfish-2.2.4/jellyfish/mer_dna_bloom_counter.hpp +include/jellyfish-2.2.4/jellyfish/mer_heap.hpp +include/jellyfish-2.2.4/jellyfish/mer_iterator.hpp +include/jellyfish-2.2.4/jellyfish/mer_overlap_sequence_parser.hpp +include/jellyfish-2.2.4/jellyfish/mer_qual_iterator.hpp +include/jellyfish-2.2.4/jellyfish/misc.hpp +include/jellyfish-2.2.4/jellyfish/offsets_key_value.hpp +include/jellyfish-2.2.4/jellyfish/rectangular_binary_matrix.hpp +include/jellyfish-2.2.4/jellyfish/simple_circular_buffer.hpp +include/jellyfish-2.2.4/jellyfish/sorted_dumper.hpp +include/jellyfish-2.2.4/jellyfish/stdio_filebuf.hpp +include/jellyfish-2.2.4/jellyfish/storage.hpp +include/jellyfish-2.2.4/jellyfish/stream_iterator.hpp +include/jellyfish-2.2.4/jellyfish/stream_manager.hpp +include/jellyfish-2.2.4/jellyfish/text_dumper.hpp +include/jellyfish-2.2.4/jellyfish/thread_exec.hpp +include/jellyfish-2.2.4/jellyfish/time.hpp +include/jellyfish-2.2.4/jellyfish/token_ring.hpp +include/jellyfish-2.2.4/jellyfish/whole_sequence_parser.hpp +lib/libjellyfish-2.0.a +lib/libjellyfish-2.0.so +lib/libjellyfish-2.0.so.2 +lib/libjellyfish-2.0.so.2.0.0 +libdata/pkgconfig/jellyfish-2.0.pc +man/man1/jellyfish.1.gz