From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: [PATCH] gnu: Add TopHat. Date: Tue, 19 Jan 2016 14:52:48 +0100 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52681) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLWiT-0005VX-Le for guix-devel@gnu.org; Tue, 19 Jan 2016 08:53:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aLWiQ-0000eR-6u for guix-devel@gnu.org; Tue, 19 Jan 2016 08:53:01 -0500 Received: from sinope.bbbm.mdc-berlin.de ([141.80.25.23]:58722) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLWiP-0000cs-R8 for guix-devel@gnu.org; Tue, 19 Jan 2016 08:52:58 -0500 Received: from localhost (localhost [127.0.0.1]) by sinope.bbbm.mdc-berlin.de (Postfix) with ESMTP id F37D92808A2 for ; Tue, 19 Jan 2016 14:52:55 +0100 (CET) Received: from sinope.bbbm.mdc-berlin.de ([127.0.0.1]) by localhost (sinope.bbbm.mdc-berlin.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4HCodXQlMthT for ; Tue, 19 Jan 2016 14:52:48 +0100 (CET) Received: from HTCAONE.mdc-berlin.net (puck.citx.mdc-berlin.de [141.80.36.101]) by sinope.bbbm.mdc-berlin.de (Postfix) with ESMTP for ; Tue, 19 Jan 2016 14:52:48 +0100 (CET) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel --=-=-= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi Guix, I=E2=80=99m happy to be able to submit a patch to add TopHat. It=E2=80=99= s a very popular piece of bioinformatics software that I didn=E2=80=99t submit to = Guix upstream before as the license wasn=E2=80=99t clear. The latest release = at that time contained a LICENSE file with the text of the Artistic license 1.0. The new 2.1.0 release no longer contains this file; instead it declares the license to be the Boost Software license 1.0. Additionally, the license has been clarified on a Github issue (which I linked to). I only just noticed this because a user asked me to package the latest version and I was very happy to see the Artistic license removed. The sources of TopHat bundle the SeqAn header library (version 1.3) and the sources of samtools 0.1.18. I=E2=80=99m patching the Makefile in a b= uild phase to use our packages for seqan@1.4.2 and samtools@0.1.19. A snippet removes the bundled sources. An additional patch to the sources makes it possible to build TopHat with SeqAn 1.4.2. ~~ Ricardo --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename="0001-gnu-Add-TopHat.patch" >From 91f7bacd8657b4be6669a2e72a2ca74b2e44a62f Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Tue, 19 Jan 2016 14:29:19 +0100 Subject: [PATCH] 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. --- gnu-system.am | 1 + gnu/packages/bioinformatics.scm | 64 ++++++++++++++++++++++ .../patches/tophat-build-with-later-seqan.patch | 24 ++++++++ 3 files changed, 89 insertions(+) create mode 100644 gnu/packages/patches/tophat-build-with-later-seqan.patch diff --git a/gnu-system.am b/gnu-system.am index 543a825..c9d16d6 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -678,6 +678,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 d7ff5e8..74cadff 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -654,6 +654,70 @@ 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.h" + "src/bam2fastx.cpp") + (("#include \"bam.h\"") "#include ") + (("#include \"sam.h\"") "#include ")) + (substitute* '("src/bwt_map.h" + "src/map2gtf.h" + "src/align_status.h") + (("#include ") "#include ") + (("#include ") "#include ")) + #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") + (description + "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.") + ;; TopHat is released under the Boost Software License, Version 1.0 + ;; See https://github.com/infphilo/tophat/issues/11#issuecomment-121589893 + (license (license:x11-style "http://www.boost.org/LICENSE_1_0.txt" + "Some components have other similar licences.")))) + (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 0000000..fc742e2 --- /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 MotifMap; + + MotifMap ims; +- +- seqan::DnaStringReverseComplement rev_donor_dinuc(donor_dinuc); +- seqan::DnaStringReverseComplement rev_acceptor_dinuc(acceptor_dinuc); +- ++ ++ typedef seqan::ModifiedString< ++ seqan::ModifiedString > >, ++ 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"); + -- 2.1.0 --=-=-=--