summaryrefslogtreecommitdiff
path: root/sci-biology/tophat
diff options
context:
space:
mode:
Diffstat (limited to 'sci-biology/tophat')
-rw-r--r--sci-biology/tophat/Manifest8
-rw-r--r--sci-biology/tophat/files/tophat-2.1.1-fix-c++14.patch14
-rw-r--r--sci-biology/tophat/files/tophat-2.1.1-python2-shebangs.patch42
-rw-r--r--sci-biology/tophat/files/tophat-2.1.1-unbundle-seqan-samtools.patch162
-rw-r--r--sci-biology/tophat/metadata.xml8
-rw-r--r--sci-biology/tophat/tophat-2.1.1-r4.ebuild81
6 files changed, 315 insertions, 0 deletions
diff --git a/sci-biology/tophat/Manifest b/sci-biology/tophat/Manifest
new file mode 100644
index 000000000000..0c7873ed7863
--- /dev/null
+++ b/sci-biology/tophat/Manifest
@@ -0,0 +1,8 @@
+AUX tophat-2.1.1-fix-c++14.patch 655 SHA256 77bdb0077062ac54d3400d4b8e8cd64a402ce8e502f5186515a30a230c4f6bf0 SHA512 66f46da853ee56821c50d46cb6853f082009dfc4d5237ec82371db9e9f5435a5a84420e03955aec7ae80076d3da492e0be7ae7d34bced06ee2ea845ad23974ca WHIRLPOOL 7fdef9f723f816829059483f5804a1bdd197fe54d0e843dd47dc21e951be757db2c5197d99942ee437393cd5212cab0526ff512b2326b1e8e34e7091282b6936
+AUX tophat-2.1.1-python2-shebangs.patch 758 SHA256 c040207f777c7ae0ab21776ac6a590dd7adf1936b7b29ccac10e0e315400d31c SHA512 887e5a8b02c2e43a7fa35c9f98670dd722527c45454ca24d5e2f9d2f372267905d7e0142317769b14830706cf82868cb83ede970ffe527f736d71df794fd6342 WHIRLPOOL 4323ff6beba00aae98904388bd8983bc23f93d2edd6a8a0f35518d9dfaac22dff304893636362b49084bc73e8c0789418ab5da1930e3fe4f9416b97248f78bda
+AUX tophat-2.1.1-unbundle-seqan-samtools.patch 5224 SHA256 6ea748a1185c485a2c257cb70103fe91b9c4133fc87af5b429beb97f34c4624c SHA512 d920cee92a0a694a34d6ac5b949e5b883bf9dcff338f36e227cb014732231b96461c02e75418972c85880169751a96c2367f6a4be6ce8c91f310b4b4f6858248 WHIRLPOOL d39046119c21d7d14b93e68800eb2f6780c9e8d853691ab634bcb37a8cdbc28c370d2c7d75231fab0fc9cf1758ac4b26ca4fd6085afa2afdb492cec68b71b349
+DIST tophat-2.1.1.tar.gz 2259554 SHA256 37840b96f3219630082b15642c47f5ef95d14f6ee99c06a369b08b3d05684da5 SHA512 e2e0943a6f3d34b83922e6e403b65a3bee480a2b2bb4bf2de0cae7e0ef5bb166b66fec923316c2b643e8550e43c842f0f1bcc2ca7249d20fbcf5a4733fbdeabc WHIRLPOOL 1e0d2bc4031eaa56a3b77ca5966c2ed439a85c9b05f028f69f4477d517e51371156bbe73d499536148eb42d60641af7f294641ee79bc855fcc4df74d70dae26c
+EBUILD tophat-2.1.1-r4.ebuild 2182 SHA256 aeb2961cda7f0137cb433f546f81a5c525fb6609980b42bc8e93ad2d0356b4f5 SHA512 b97690d43bc89aaafe2df3091602e3509cc1ef4ed2323a58aeb734329f587872325bf73ad69b899d467591bb7be5f685ebeb87376e5fab4b867831b3858c92f0 WHIRLPOOL 9a37fcfdf7574dce58eb9ddc1842a94c95066fe212ebee3d20aaa13608feb8b1c2a47cdff2dce483baefcb9f9d22461b97e856c30d08a386f46785e87650d034
+MISC ChangeLog 5031 SHA256 b2d1b226a5a334ca097fbe4f85a763499f81e61772ac37994729e792188a38ae SHA512 b2b79ab44987b781cd1a8e0dd4e1e94970666bcdf28902b146f8aa1ddfd808beab132623042ad5079b5f2b40a712d8be7afcc7de181a230b7f9dcec366c11ff4 WHIRLPOOL 2be3cc2ff83f1e342a20b92342ecbd6875437faa4ae112a394d34b22886be1b453539ee0b03afe7e44edfcc5f298dd461e19437b0431d6a3ee37dd919113d338
+MISC ChangeLog-2015 2307 SHA256 66a4e11a7ed49f16ba25f9cedd4fbc273a6a246eb154150276d5b64a642aa9cb SHA512 ed08c5028eb9569860aea71787a5e8d44d9d9d2995f593724371597162e6bec006a4a6d5a7d157facc1f1f6d0003c239ac2de05d1d96ffc58d345e5dfe4b9969 WHIRLPOOL 36e0146907a219cd618af78d36be2f3f60bec0eb187f4ef74f1881f40e049be306a4486fed747a8e78cba0c8d67173ae0175e3d47380abd180467a7c4fb0c4da
+MISC metadata.xml 267 SHA256 b3535fccca0fc8511c1245214c1a7c105447b35f21093bda132991874ce82d48 SHA512 91ab266d9ab24401bc0fec759c5b6cfcf44a3c5669fc31c7301d79770839bb5dfa0e155d949392ef06176b4a0b2c32b91b1b54b0027f972db61f0a5e54644403 WHIRLPOOL d841a2f928c50434f2e8c65f583ea3aa2d04e5cebd664b1531ab5373260f735219131991000bbb2b21aa3add05dcdce29548b78eac8d8c0eced6dc5505b64e13
diff --git a/sci-biology/tophat/files/tophat-2.1.1-fix-c++14.patch b/sci-biology/tophat/files/tophat-2.1.1-fix-c++14.patch
new file mode 100644
index 000000000000..e8168bb91438
--- /dev/null
+++ b/sci-biology/tophat/files/tophat-2.1.1-fix-c++14.patch
@@ -0,0 +1,14 @@
+Fix building with C++14, which errors out due to broken perfect forwarding signature.
+See also: https://bugs.gentoo.org/show_bug.cgi?id=594544
+
+--- a/src/tophat_reports.cpp
++++ b/src/tophat_reports.cpp
+@@ -2705,7 +2705,7 @@
+ junction_stat.gtf_match = true;
+ junction_stat.accepted = true;
+
+- gtf_junctions.insert(make_pair<Junction, JunctionStats>(Junction(ref_id, left_coord, right_coord, antisense), junction_stat));
++ gtf_junctions.insert(make_pair(Junction(ref_id, left_coord, right_coord, antisense), junction_stat));
+ }
+ }
+ fprintf(stderr, "Loaded %d GFF junctions from %s.\n", (int)(gtf_junctions.size()), gtf_juncs.c_str());
diff --git a/sci-biology/tophat/files/tophat-2.1.1-python2-shebangs.patch b/sci-biology/tophat/files/tophat-2.1.1-python2-shebangs.patch
new file mode 100644
index 000000000000..5c38bcc072ef
--- /dev/null
+++ b/sci-biology/tophat/files/tophat-2.1.1-python2-shebangs.patch
@@ -0,0 +1,42 @@
+Make Python 2 explicit in python scripts
+
+--- a/src/bed_to_juncs
++++ b/src/bed_to_juncs
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ # encoding: utf-8
+ """
+ bed_to_juncs.py
+--- a/src/contig_to_chr_coords
++++ b/src/contig_to_chr_coords
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ # encoding: utf-8
+ """
+ contig_to_chr_coords.py
+--- a/src/sra_to_solid
++++ b/src/sra_to_solid
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+
+ """
+ sra_to_solid.py
+--- a/src/tophat-fusion-post
++++ b/src/tophat-fusion-post
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+
+
+ """
+--- a/src/tophat.py
++++ b/src/tophat.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+
+ # encoding: utf-8
+ """
diff --git a/sci-biology/tophat/files/tophat-2.1.1-unbundle-seqan-samtools.patch b/sci-biology/tophat/files/tophat-2.1.1-unbundle-seqan-samtools.patch
new file mode 100644
index 000000000000..9d0a2694051a
--- /dev/null
+++ b/sci-biology/tophat/files/tophat-2.1.1-unbundle-seqan-samtools.patch
@@ -0,0 +1,162 @@
+Unbundle the included samtools and SeqAn, and use system libraries.
+See also: https://bugs.gentoo.org/show_bug.cgi?id=566494
+
+Remove ancient ax_boost_base.m4 and ax_boost_thread.m4, and depend
+on >=sys-devel/autoconf-archive-2016.09.16 in the ebuild instead.
+See also: https://bugs.gentoo.org/show_bug.cgi?id=594810
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -28,26 +28,15 @@
+ AC_PROG_INSTALL
+ AM_PATH_PYTHON([2.4])
+
+-m4_include([ax_boost_base.m4])
+-m4_include([ax_boost_thread.m4])
+ # CXXFLAGS="$CXXFLAGS $threadLib"
+ AX_BOOST_BASE([1.38.0])
++AX_BOOST_SYSTEM
+ AX_BOOST_THREAD
+-if test -z "$BOOST_THREAD_LIBS"; then
++if test -z "$BOOST_THREAD_LIB"; then
+ AC_MSG_ERROR([boost.thread not found. Aborting.])
+ fi
+
+
+-# BAM related:
+- ac_bam_path=samtools-0.1.18
+- BAM_LIB="-lbam"
+- BAM_LDFLAGS="-L./$ac_bam_path"
+- BAM_CPPFLAGS="-I./$ac_bam_path"
+- AC_SUBST(BAM_CPPFLAGS)
+- AC_SUBST(BAM_LDFLAGS)
+- AC_SUBST(BAM_LIB)
+-
+-
+ # Checks for header files.
+ AC_CHECK_HEADERS([stdlib.h string.h unistd.h])
+
+@@ -80,32 +69,23 @@
+ # set CFLAGS and CXXFLAGS
+ #user_CFLAGS="${CXXFLAGS}"
+ user_CFLAGS=${CFLAGS}
+-generic_CFLAGS="-Wall -Wno-strict-aliasing -g -gdwarf-2 -Wuninitialized"
++generic_CFLAGS=""
+ ext_CFLAGS=""
+ debug_CFLAGS=""
+ user_LDFLAGS="$LDFLAGS"
+
+-AC_ARG_ENABLE(intel64, [ --enable-intel64 optimize for Intel64 CPU such as Xeon and Core2],
+- [ext_CFLAGS="${ext_CFLAGS} -mtune=nocona"], [])
+-
+ AC_ARG_ENABLE([debug],
+ [AS_HELP_STRING([--enable-debug],
+ [enable debugging info (default is no)])],
+ [], [enable_debug=no])
+-AC_ARG_ENABLE([optim],
+- [AS_HELP_STRING([--enable-optim@<:@=0|1|2|3@:>@],
+- [set optimization level (default is 3)])],
+- [if test "x$enable_optim" = xyes; then enable_optim=3; fi],
+- [enable_optim=3])
+
+-AS_IF([test "x$enable_optim" != xno], [ext_CFLAGS="$ext_CFLAGS -O$enable_optim"])
+ AS_IF([test "x$enable_debug" = xyes],
+ [debug_CFLAGS="-DDEBUG"],
+ [debug_CFLAGS="-DNDEBUG"])
+
+ CFLAGS="${generic_CFLAGS} ${ext_CFLAGS} ${user_CFLAGS} ${debug_CFLAGS}"
+ CXXFLAGS="$CFLAGS"
+-CXXFLAGS="$CXXFLAGS $BAM_CPPFLAGS $BOOST_CPPFLAGS -I./SeqAn-1.4.2"
++CXXFLAGS="$CXXFLAGS $BAM_CPPFLAGS $BOOST_CPPFLAGS"
+ LDFLAGS="$BAM_LDFLAGS $BOOST_LDFLAGS $user_LDFLAGS"
+
+ AM_INIT_AUTOMAKE([-Wall foreign tar-pax foreign])
+@@ -122,7 +102,7 @@
+ -- ${PACKAGE_STRING} Configuration Results --
+ C++ compiler: ${CXX} ${CXXFLAGS}
+ Linker flags: ${LDFLAGS}
+- BOOST libraries: ${BOOST_THREAD_LIBS}"
++ BOOST libraries: ${BOOST_THREAD_LIB}"
+
+ if test x"${GCC}" = x"yes" ; then
+ gcc_version=`${CC} --version | head -n 1`
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -683,17 +683,12 @@
+ SeqAn-1.4.2/seqan/system/system_thread.h \
+ SeqAn-1.4.2/seqan/version.h
+
+-SAMDIR = ./samtools-0.1.18
+-SAMLIB = libbam.a
+-SAMPROG = samtools_0.1.18
+-BAM_LIB = -lbam
+-BAM_CPPFLAGS = -I$(SAMDIR)
+-BAM_LDFLAGS = -L$(SAMDIR)
++BAM_LIB = -lbam-0.1-legacy
++AM_CPPFLAGS = -I/usr/include/bam-0.1-legacy/
+
+ #-- progs to be installed in $prefix/bin
+
+ bin_PROGRAMS = \
+- $(SAMPROG) \
+ prep_reads \
+ gtf_to_fasta \
+ fix_map_ordering \
+@@ -722,9 +717,6 @@
+ tophat2 \
+ tophat
+
+-clean-local:
+- cd $(SAMDIR) && make clean
+-
+ tophat2: tophat2.sh
+ cp tophat2.sh tophat2 && chmod 755 tophat2
+
+@@ -732,7 +724,7 @@
+ sed -e 's|__VERSION__|$(VERSION)|' tophat.py > tophat && chmod 755 tophat
+
+ #-- tophat library for linking convienence
+-noinst_LIBRARIES = $(SAMLIB) libgc.a libtophat.a
++noinst_LIBRARIES = libgc.a libtophat.a
+
+ noinst_HEADERS = \
+ reads.h \
+@@ -801,11 +793,11 @@
+ prep_reads_LDFLAGS = $(BAM_LDFLAGS) $(LDFLAGS)
+
+ segment_juncs_SOURCES = segment_juncs.cpp
+-segment_juncs_LDADD = $(top_builddir)/src/libtophat.a $(BOOST_THREAD_LIBS) $(BOOST_SYSTEM_LIB) $(BAM_LIB)
++segment_juncs_LDADD = $(top_builddir)/src/libtophat.a $(BOOST_THREAD_LIB) $(BOOST_SYSTEM_LIB) $(BAM_LIB)
+ segment_juncs_LDFLAGS = $(BAM_LDFLAGS) $(LDFLAGS) $(BOOST_LDFLAGS)
+
+ long_spanning_reads_SOURCES = long_spanning_reads.cpp
+-long_spanning_reads_LDADD = $(top_builddir)/src/libtophat.a $(BOOST_THREAD_LIBS) $(BOOST_SYSTEM_LIB) $(BAM_LIB)
++long_spanning_reads_LDADD = $(top_builddir)/src/libtophat.a $(BOOST_THREAD_LIB) $(BOOST_SYSTEM_LIB) $(BAM_LIB)
+ long_spanning_reads_LDFLAGS = $(BAM_LDFLAGS) $(LDFLAGS) $(BOOST_LDFLAGS)
+
+ gtf_juncs_SOURCES = gtf_juncs.cpp
+@@ -817,7 +809,7 @@
+ juncs_db_LDFLAGS = $(BAM_LDFLAGS) $(LDFLAGS)
+
+ tophat_reports_SOURCES = tophat_reports.cpp
+-tophat_reports_LDADD = $(top_builddir)/src/libtophat.a $(BOOST_THREAD_LIBS) $(BOOST_SYSTEM_LIB) $(BAM_LIB)
++tophat_reports_LDADD = $(top_builddir)/src/libtophat.a $(BOOST_THREAD_LIB) $(BOOST_SYSTEM_LIB) $(BAM_LIB)
+ tophat_reports_LDFLAGS = $(BAM_LDFLAGS) $(LDFLAGS) $(BOOST_LDFLAGS)
+
+ fix_map_ordering_SOURCES = fix_map_ordering.cpp
+@@ -844,15 +836,5 @@
+ gtf_to_fasta_LDADD = $(top_builddir)/src/libtophat.a libgc.a $(BAM_LIB)
+ gtf_to_fasta_LDFLAGS = $(BAM_LDFLAGS) $(LDFLAGS)
+
+-
+-libbam_a_SOURCES =
+-samtools_0_1_18_SOURCES =
+-
+-$(SAMPROG): $(SAMLIB)
+-
+-
+-$(SAMLIB):
+- cd $(SAMDIR) && make $(SAMPROG) && cp $(SAMLIB) $(SAMPROG) ..
+-
+ install-data-hook:
+ cp -r intervaltree sortedcontainers $(DESTDIR)$(bindir)
diff --git a/sci-biology/tophat/metadata.xml b/sci-biology/tophat/metadata.xml
new file mode 100644
index 000000000000..959160fe46b1
--- /dev/null
+++ b/sci-biology/tophat/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci-biology@gentoo.org</email>
+ <name>Gentoo Biology Project</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sci-biology/tophat/tophat-2.1.1-r4.ebuild b/sci-biology/tophat/tophat-2.1.1-r4.ebuild
new file mode 100644
index 000000000000..590f6eb2d20f
--- /dev/null
+++ b/sci-biology/tophat/tophat-2.1.1-r4.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools flag-o-matic python-single-r1 toolchain-funcs
+
+DESCRIPTION="Python-based splice junction mapper for RNA-Seq reads using bowtie2"
+HOMEPAGE="https://ccb.jhu.edu/software/tophat/"
+SRC_URI="https://ccb.jhu.edu/software/tophat/downloads/${P}.tar.gz"
+
+LICENSE="Artistic"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}
+ dev-libs/boost:=[threads]
+ dev-python/intervaltree[${PYTHON_USEDEP}]
+ dev-python/sortedcontainers[${PYTHON_USEDEP}]
+ sci-biology/samtools:0.1-legacy
+ sci-biology/bowtie:2"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ sci-biology/seqan:1.4
+ >=sys-devel/autoconf-archive-2016.09.16"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-unbundle-seqan-samtools.patch
+ "${FILESDIR}"/${P}-fix-c++14.patch
+ "${FILESDIR}"/${P}-python2-shebangs.patch
+)
+
+src_prepare() {
+ default
+
+ # remove bundled libs
+ rm -rf src/samtools-0.1.18/ src/SeqAn-1.4.2/ || die
+
+ sed -e "s:samtools_0.1.18:${EPREFIX}/usr/bin/samtools-0.1-legacy/samtools:" \
+ -i src/tophat.py src/common.cpp || die
+
+ sed -e "s:/usr/include/bam-0.1-legacy/:${EPREFIX}/usr/include/bam-0.1-legacy/:" \
+ -e '/^samtools-0\.1\.18\//d' \
+ -e '/^SeqAn-1\.4\.2\//d' \
+ -e 's:sortedcontainers/sortedset.py \\:sortedcontainers/sortedset.py:' \
+ -e 's:\$(top_builddir)\/src\/::' \
+ -i src/Makefile.am || die
+ sed -e 's:\$(top_builddir)\/src\/::' -i src/Makefile.am || die
+
+ # innocuous non-security flags, prevent log pollution
+ append-cflags -Wno-unused-but-set-variable -Wno-unused-variable
+ append-cppflags "$($(tc-getPKG_CONFIG) --cflags seqan-1.4)"
+
+ # remove ancient autoconf archive macros, wreaking havoc,
+ # depend on sys-devel/autoconf-archive instead, bug #594810
+ rm {ax_boost_thread,ax_boost_base}.m4 || die
+
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_enable debug)
+}
+
+src_install() {
+ default
+
+ # delete bundled python modules
+ local i
+ for i in intervaltree sortedcontainers; do
+ rm -r "${ED%/}"/usr/bin/${i} || die
+ done
+}
+
+pkg_postinst() {
+ optfeature "ABI SOLiD colorspace reads" sci-biology/bowtie:1
+}