summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sci-biology/abyss/abyss-1.3.6-r1.ebuild54
-rw-r--r--sci-biology/abyss/files/abyss-1.3.6-samtoafg.patch40
2 files changed, 94 insertions, 0 deletions
diff --git a/sci-biology/abyss/abyss-1.3.6-r1.ebuild b/sci-biology/abyss/abyss-1.3.6-r1.ebuild
new file mode 100644
index 000000000000..a4327b06b4c7
--- /dev/null
+++ b/sci-biology/abyss/abyss-1.3.6-r1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit autotools toolchain-funcs
+
+DESCRIPTION="Assembly By Short Sequences - a de novo, parallel, paired-end sequence assembler"
+HOMEPAGE="http://www.bcgsc.ca/platform/bioinfo/software/abyss/"
+SRC_URI="http://www.bcgsc.ca/downloads/abyss/${P}.tar.gz"
+
+LICENSE="abyss"
+SLOT="0"
+IUSE="+mpi openmp misc-haskell"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+ dev-cpp/sparsehash
+ dev-libs/boost
+ misc-haskell? ( dev-libs/gmp:0=
+ virtual/libffi:0=
+ )
+ mpi? ( virtual/mpi )
+"
+DEPEND="${RDEPEND}
+ misc-haskell? ( dev-lang/ghc
+ dev-haskell/mmap )
+"
+
+# todo: --enable-maxk=N configure option
+# todo: fix automagic mpi toggling
+
+PATCHES=(
+ "${FILESDIR}"/${P}-gcc-4.7.patch
+ "${FILESDIR}"/${P}-ac_prog_ar.patch
+ "${FILESDIR}"/${P}-samtoafg.patch
+)
+
+src_prepare() {
+ default
+ tc-export AR
+ sed -i -e "s/-Werror//" configure.ac || die #365195
+ sed -i -e "/dist_pkgdoc_DATA/d" Makefile.am || die
+ eautoreconf
+}
+
+src_configure() {
+ # disable building haskell tool Misc/samtobreak
+ # unless request by user: bug #534412
+ use misc-haskell || export ac_cv_prog_ac_ct_GHC=
+
+ econf $(use_enable openmp)
+}
diff --git a/sci-biology/abyss/files/abyss-1.3.6-samtoafg.patch b/sci-biology/abyss/files/abyss-1.3.6-samtoafg.patch
new file mode 100644
index 000000000000..cb7dfb08a84d
--- /dev/null
+++ b/sci-biology/abyss/files/abyss-1.3.6-samtoafg.patch
@@ -0,0 +1,40 @@
+Hello,
+
+I see Shaun Jackmans' (abyss-)sam2afg script is available within the
+Amos source repository. I find this very useful for coercing output from
+assemblers which which don't track read location into amos by remapping
+reads against the assembly and converting to afg - not ideal but better
+than nothing when you don't have the 'real' read locations to work with.
+
+This fails, however when reads are aligned with 'bwa mem', which can
+output multi-part alignments. sam2afg checks for reuse of the same read
+id (presumably to prevent the generation of non-unique eid values),
+consequently encountering multiple alignments for a read causes it to die.
+
+The following one-line patch allows sam2afg to skip these secondary
+alignments present in 'bwa mem' output, provided bwa mem has been run
+with the '-M' argument which sets the SAM 'secondary alignment' flag on
+the alignments in question.
+
+Hopefully this will also be of use to others...
+
+Best Regards,
+James
+
+--
+Dr. James Abbott
+Lead Bioinformatician
+Bioinformatics Support Service
+Imperial College, London
+
+
+--- abyss-1.3.6/bin/abyss-samtoafg.ori 2015-05-23 23:43:46.797747928 +0200
++++ abyss-1.3.6/bin/abyss-samtoafg 2015-05-23 23:44:09.227747743 +0200
+@@ -105,6 +105,7 @@
+ die unless defined $qqual;
+
+ $tstart--; # convert to zero-based coordinate
++ next if $flag & 0x100; # secondary alignment
+ $qid .= "/1" if $flag & 0x40; #FREAD1
+ $qid .= "/2" if $flag & 0x80; #FREAD2
+