1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-09 06:51:44 +00:00

biology/tophat: Fast splice junction mapper for RNA-Seq reads

TopHat is a fast splice junction mapper for RNA-Seq reads. It aligns RNA-Seq
reads to mammalian-sized genomes using the ultra high-throughput short read
aligner Bowtie, and then analyzes the mapping results to identify splice
junctions between exons.

Note:

TopHat has been Superseded by HISAT2 and is no longer maintained upstream.
This port is provided mainly for revisiting old studies where TopHat was used.
This commit is contained in:
Jason W. Bacon 2019-09-27 00:49:48 +00:00
parent 06bcaf30c8
commit a0498a53b5
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=512997
9 changed files with 192 additions and 0 deletions

View File

@ -158,6 +158,7 @@
SUBDIR += tRNAscan-SE
SUBDIR += t_coffee
SUBDIR += tabixpp
SUBDIR += tophat
SUBDIR += treekin
SUBDIR += treepuzzle
SUBDIR += trimadap

34
biology/tophat/Makefile Normal file
View File

@ -0,0 +1,34 @@
# $FreeBSD$
PORTNAME= tophat
DISTVERSION= 2.1.1
CATEGORIES= biology python
MASTER_SITES= http://ccb.jhu.edu/software/tophat/downloads/
MAINTAINER= jwb@FreeBSD.org
COMMENT= Fast splice junction mapper for RNA-Seq reads
LICENSE= BSL
LICENSE_FILE= ${WRKSRC}/LICENSE
LIB_DEPENDS= libboost_iostreams.so:devel/boost-libs
RUN_DEPENDS= bowtie2:biology/bowtie2
USES= gmake python:2.7 shebangfix
SHEBANG_FILES= src/contig_to_chr_coords \
src/bed_to_juncs \
src/sra_to_solid \
src/tophat-fusion-post \
src/tophat.py \
src/tophat2.sh
GNU_CONFIGURE= yes
CFLAGS+= -Wno-unused
INSTALL_TARGET= install-strip
MAKE_JOBS_UNSAFE= yes
post-install:
${INSTALL_SCRIPT} ${FILESDIR}/tophat-test ${STAGEDIR}${PREFIX}/bin
.include <bsd.port.mk>

3
biology/tophat/distinfo Normal file
View File

@ -0,0 +1,3 @@
TIMESTAMP = 1522620646
SHA256 (tophat-2.1.1.tar.gz) = 37840b96f3219630082b15642c47f5ef95d14f6ee99c06a369b08b3d05684da5
SIZE (tophat-2.1.1.tar.gz) = 2259554

View File

@ -0,0 +1,22 @@
--- configure.orig 2016-02-24 02:55:11 UTC
+++ configure
@@ -6886,7 +6886,7 @@ case $host_os in *\ *) host_os=`echo "$h
# set CFLAGS and CXXFLAGS
#user_CFLAGS="${CXXFLAGS}"
user_CFLAGS=${CFLAGS}
-generic_CFLAGS="-Wall -Wno-strict-aliasing -g -gdwarf-2 -Wuninitialized"
+generic_CFLAGS="-Wno-strict-aliasing -g -gdwarf-2 -Wuninitialized"
ext_CFLAGS=""
debug_CFLAGS=""
user_LDFLAGS="$LDFLAGS"
@@ -6922,8 +6922,8 @@ else
fi
CFLAGS="${generic_CFLAGS} ${ext_CFLAGS} ${user_CFLAGS} ${debug_CFLAGS}"
-CXXFLAGS="$CFLAGS"
-CXXFLAGS="$CXXFLAGS $BAM_CPPFLAGS $BOOST_CPPFLAGS -I./SeqAn-1.4.2"
+CXXFLAGS="-std=gnu++98 $CFLAGS"
+CXXFLAGS="-I./SeqAn-1.4.2 $CXXFLAGS $BAM_CPPFLAGS $BOOST_CPPFLAGS"
LDFLAGS="$BAM_LDFLAGS $BOOST_LDFLAGS $user_LDFLAGS"
if test "`cd $srcdir && pwd`" != "`pwd`"; then

View File

@ -0,0 +1,25 @@
--- src/samtools-0.1.18/Makefile.orig 2016-02-14 18:21:17 UTC
+++ src/samtools-0.1.18/Makefile
@@ -1,5 +1,10 @@
-CC= gcc
-CFLAGS= -g -Wall -O2 #-m64 #-arch ppc
+CC?= gcc
+CFLAGS?= -g -Wall -O2 #-m64 #-arch ppc
+CC?= gcc
+CFLAGS?= -g -Wall -O2
+# Link fails with clang on inlined functions with no -O
+CFLAGS+= -O
+RANLIB?= /usr/bin/ranlib
DFLAGS= -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=0
KNETFILE_O= knetfile.o
LOBJS= bgzf.o kstring.o bam_aux.o bam.o bam_import.o sam.o bam_index.o \
@@ -38,7 +43,8 @@ all:$(PROG)
lib:libbam.a
libbam.a:$(LOBJS)
- $(AR) -csru $@ $(LOBJS)
+ $(AR) cr $@ $(LOBJS)
+ $(RANLIB) $@
samtools_0.1.18:lib-recur $(AOBJS)
$(CC) $(CFLAGS) -o $@ $(AOBJS) -Lbcftools $(LIBPATH) libbam.a -lbcf -lm -lz #$(LIBCURSES)

View File

@ -0,0 +1,51 @@
--- src/Makefile.in.orig 2016-02-24 03:08:32 UTC
+++ src/Makefile.in
@@ -1207,10 +1207,15 @@ libgc.a: $(libgc_a_OBJECTS) $(libgc_a_DE
-rm -f libgc.a
$(libgc_a_AR) libgc.a $(libgc_a_OBJECTS) $(libgc_a_LIBADD)
$(RANLIB) libgc.a
+
+# $(SAMLIB) and $(SAMPROG) are being mysteriously deleted sometime after they
+# are copied to src. The cp below is a hack to allow the port to build.
libtophat.a: $(libtophat_a_OBJECTS) $(libtophat_a_DEPENDENCIES) $(EXTRA_libtophat_a_DEPENDENCIES)
-rm -f libtophat.a
$(libtophat_a_AR) libtophat.a $(libtophat_a_OBJECTS) $(libtophat_a_LIBADD)
$(RANLIB) libtophat.a
+ cp $(SAMDIR)/$(SAMLIB) $(SAMDIR)/$(SAMPROG) .
+
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
@@ -1281,9 +1286,11 @@ prep_reads$(EXEEXT): $(prep_reads_OBJECT
sam_juncs$(EXEEXT): $(sam_juncs_OBJECTS) $(sam_juncs_DEPENDENCIES) $(EXTRA_sam_juncs_DEPENDENCIES)
@rm -f sam_juncs$(EXEEXT)
$(sam_juncs_LINK) $(sam_juncs_OBJECTS) $(sam_juncs_LDADD) $(LIBS)
+
samtools_0.1.18$(EXEEXT): $(samtools_0_1_18_OBJECTS) $(samtools_0_1_18_DEPENDENCIES) $(EXTRA_samtools_0_1_18_DEPENDENCIES)
- @rm -f samtools_0.1.18$(EXEEXT)
- $(LINK) $(samtools_0_1_18_OBJECTS) $(samtools_0_1_18_LDADD) $(LIBS)
+ #rm -f samtools_0.1.18$(EXEEXT)
+ #$(LINK) $(samtools_0_1_18_OBJECTS) $(samtools_0_1_18_LDADD) $(LIBS)
+
segment_juncs$(EXEEXT): $(segment_juncs_OBJECTS) $(segment_juncs_DEPENDENCIES) $(EXTRA_segment_juncs_DEPENDENCIES)
@rm -f segment_juncs$(EXEEXT)
$(segment_juncs_LINK) $(segment_juncs_OBJECTS) $(segment_juncs_LDADD) $(LIBS)
@@ -1658,7 +1665,7 @@ uninstall-am: uninstall-binPROGRAMS unin
clean-local:
- cd $(SAMDIR) && make clean
+ cd $(SAMDIR) && ${MAKE} clean
tophat2: tophat2.sh
cp tophat2.sh tophat2 && chmod 755 tophat2
@@ -1669,7 +1676,8 @@ tophat: tophat.py
$(SAMPROG): $(SAMLIB)
$(SAMLIB):
- cd $(SAMDIR) && make $(SAMPROG) && cp $(SAMLIB) $(SAMPROG) ..
+ cd $(SAMDIR) && ${MAKE} $(SAMPROG)
+ cp $(SAMDIR)/$(SAMLIB) $(SAMDIR)/$(SAMPROG) .
install-data-hook:
cp -r intervaltree sortedcontainers $(DESTDIR)$(bindir)

View File

@ -0,0 +1,16 @@
#!/bin/sh -e
if [ ! -e test_data.tar.gz ]; then
fetch https://ccb.jhu.edu/software/tophat/downloads/test_data.tar.gz
fi
if [ -e test_data ]; then
cat << EOM
test_data already exists. Remove it or run $0 from a different directory.
EOM
exit 1
fi
tar zxvf test_data.tar.gz
cd test_data
tophat -r 20 test_ref reads_1.fq reads_2.fq

11
biology/tophat/pkg-descr Normal file
View File

@ -0,0 +1,11 @@
TopHat is a fast splice junction mapper for RNA-Seq reads. It aligns RNA-Seq
reads to mammalian-sized genomes using the ultra high-throughput short read
aligner Bowtie, and then analyzes the mapping results to identify splice
junctions between exons.
Note:
TopHat has been Superseded by HISAT2 and is no longer maintained upstream.
This port is provided mainly for revisiting old studies where TopHat was used.
WWW: http://ccb.jhu.edu/software/tophat/index.shtml

29
biology/tophat/pkg-plist Normal file
View File

@ -0,0 +1,29 @@
bin/bam2fastx
bin/bam_merge
bin/bed_to_juncs
bin/contig_to_chr_coords
bin/fix_map_ordering
bin/gtf_juncs
bin/gtf_to_fasta
bin/intervaltree/__init__.py
bin/intervaltree/interval.py
bin/intervaltree/intervaltree.py
bin/intervaltree/node.py
bin/juncs_db
bin/long_spanning_reads
bin/map2gtf
bin/prep_reads
bin/sam_juncs
bin/samtools_0.1.18
bin/segment_juncs
bin/sortedcontainers/__init__.py
bin/sortedcontainers/sorteddict.py
bin/sortedcontainers/sortedlist.py
bin/sortedcontainers/sortedlistwithkey.py
bin/sortedcontainers/sortedset.py
bin/sra_to_solid
bin/tophat
bin/tophat-fusion-post
bin/tophat-test
bin/tophat2
bin/tophat_reports