aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnu-system.am1
-rw-r--r--gnu/packages/bioinformatics.scm67
-rw-r--r--gnu/packages/patches/tophat-build-with-later-seqan.patch24
3 files changed, 92 insertions, 0 deletions
diff --git a/gnu-system.am b/gnu-system.am
index aeb0d0f4dc..3426056925 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -681,6 +681,7 @@ dist_patch_DATA = \
gnu/packages/patches/tidy-CVE-2015-5522+5523.patch \
gnu/packages/patches/tinyxml-use-stl.patch \
gnu/packages/patches/tk-find-library.patch \
+ gnu/packages/patches/tophat-build-with-later-seqan.patch \
gnu/packages/patches/torsocks-dns-test.patch \
gnu/packages/patches/tvtime-gcc41.patch \
gnu/packages/patches/tvtime-pngoutput.patch \
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index fa2bea732c..f9b0d75613 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -654,6 +654,73 @@ gapped, local, and paired-end alignment modes.")
(supported-systems '("x86_64-linux"))
(license license:gpl3+)))
+(define-public tophat
+ (package
+ (name "tophat")
+ (version "2.1.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "http://ccb.jhu.edu/software/tophat/downloads/tophat-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "168zlzykq622zbgkh90a90f1bdgsxkscq2zxzbj8brq80hbjpyp7"))
+ (patches (list (search-patch "tophat-build-with-later-seqan.patch")))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; Remove bundled SeqAn and samtools
+ (delete-file-recursively "src/SeqAn-1.3")
+ (delete-file-recursively "src/samtools-0.1.18")
+ #t))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:parallel-build? #f ; not supported
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'use-system-samtools
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "src/Makefile.in"
+ (("(noinst_LIBRARIES = )\\$\\(SAMLIB\\)" _ prefix) prefix)
+ (("\\$\\(SAMPROG\\): \\$\\(SAMLIB\\)") "")
+ (("SAMPROG = samtools_0\\.1\\.18") "")
+ (("\\$\\(samtools_0_1_18_SOURCES\\)") "")
+ (("am__EXEEXT_1 = samtools_0\\.1\\.18\\$\\(EXEEXT\\)") ""))
+ (substitute* '("src/common.cpp"
+ "src/tophat.py")
+ (("samtools_0.1.18") (which "samtools")))
+ (substitute* '("src/common.h"
+ "src/bam2fastx.cpp")
+ (("#include \"bam.h\"") "#include <samtools/bam.h>")
+ (("#include \"sam.h\"") "#include <samtools/sam.h>"))
+ (substitute* '("src/bwt_map.h"
+ "src/map2gtf.h"
+ "src/align_status.h")
+ (("#include <bam.h>") "#include <samtools/bam.h>")
+ (("#include <sam.h>") "#include <samtools/sam.h>"))
+ #t)))))
+ (inputs
+ `(("boost" ,boost)
+ ("bowtie" ,bowtie)
+ ("samtools" ,samtools-0.1)
+ ("ncurses" ,ncurses)
+ ("python" ,python-2)
+ ("perl" ,perl)
+ ("zlib" ,zlib)
+ ("seqan" ,seqan)))
+ (home-page "http://ccb.jhu.edu/software/tophat/index.shtml")
+ (synopsis "Spliced read mapper for RNA-Seq data")
+ (description
+ "TopHat is a fast splice junction mapper for nucleotide sequence
+reads produced by the RNA-Seq method. 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.")
+ ;; TopHat is released under the Boost Software License, Version 1.0
+ ;; See https://github.com/infphilo/tophat/issues/11#issuecomment-121589893
+ (license license:boost1.0)))
+
(define-public bwa
(package
(name "bwa")
diff --git a/gnu/packages/patches/tophat-build-with-later-seqan.patch b/gnu/packages/patches/tophat-build-with-later-seqan.patch
new file mode 100644
index 0000000000..fc742e2a7d
--- /dev/null
+++ b/gnu/packages/patches/tophat-build-with-later-seqan.patch
@@ -0,0 +1,24 @@
+This patch resolves a build failure when building TopHat 2.1.0 with SeqAn 1.4.
+This is the relevant part of a patch originally posted here:
+https://lists.fu-berlin.de/pipermail/seqan-dev/2014-July/msg00001.html
+
+--- a/src/segment_juncs.cpp
++++ b/src/segment_juncs.cpp
+@@ -2050,10 +2050,13 @@ void juncs_from_ref_segs(RefSequenceTabl
+ typedef map<uint32_t, IntronMotifs> MotifMap;
+
+ MotifMap ims;
+-
+- seqan::DnaStringReverseComplement rev_donor_dinuc(donor_dinuc);
+- seqan::DnaStringReverseComplement rev_acceptor_dinuc(acceptor_dinuc);
+-
++
++ typedef seqan::ModifiedString<
++ seqan::ModifiedString<seqan::DnaString const, seqan::ModView<seqan::FunctorComplement<seqan::Dna> > >,
++ seqan::ModReverse> ConstDnaStringReverseComplement;
++ ConstDnaStringReverseComplement rev_donor_dinuc(donor_dinuc);
++ ConstDnaStringReverseComplement rev_acceptor_dinuc(acceptor_dinuc);
++
+ if (talkative)
+ fprintf(stderr, "Collecting potential splice sites in islands\n");
+