summaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorRicardo Wurmus <ricardo.wurmus@mdc-berlin.de>2016-01-19 14:29:19 +0100
committerRicardo Wurmus <ricardo.wurmus@mdc-berlin.de>2016-01-23 08:53:10 +0100
commit94ce537eacaa443df57bef14ceaa0d7fdad86071 (patch)
tree1100bd70d046ab787e4730b6a00e8e77d43e4b2f /gnu/packages
parent3062d750b4f8e16c979629360bf2dc411b71b04c (diff)
gnu: Add TopHat.
* gnu/packages/bioinformatics.scm (tophat): New variable. * gnu/packages/patches/tophat-build-with-later-seqan.patch: New file. * gnu-system.am (dist_patch_DATA): Add it.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/bioinformatics.scm67
-rw-r--r--gnu/packages/patches/tophat-build-with-later-seqan.patch24
2 files changed, 91 insertions, 0 deletions
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");
+