commit:     4c3880bfe25f6b81461523e3f1f38b43614d51b9
Author:     Martin Mokrejš <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz>
AuthorDate: Sat May 23 21:51:58 2015 +0000
Commit:     Martin Mokrejs <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz>
CommitDate: Sat May 23 21:51:58 2015 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=4c3880bf

sci-biology/amos: bring in upstream patch to cope with secondary alignments 
from 'bwa mem -M'

Package-Manager: portage-2.2.18

 sci-biology/abyss/ChangeLog                        | 17 ++++++++
 sci-biology/abyss/abyss-1.3.3-r1.ebuild            | 42 +++++++++++++++++++
 sci-biology/abyss/abyss-1.3.4-r1.ebuild            | 47 +++++++++++++++++++++
 sci-biology/abyss/abyss-1.3.6-r1.ebuild            | 48 ++++++++++++++++++++++
 .../abyss/files/abyss-1.3.3-ac_prog_ar.patch       | 18 ++++++++
 sci-biology/abyss/files/abyss-1.3.3-gcc-4.7.patch  | 15 +++++++
 sci-biology/abyss/files/abyss-1.3.3-samtoafg.patch | 40 ++++++++++++++++++
 sci-biology/abyss/files/abyss-1.3.4-gcc-4.7.patch  | 15 +++++++
 sci-biology/abyss/files/abyss-1.3.4-samtoafg.patch | 40 ++++++++++++++++++
 .../abyss/files/abyss-1.3.6-ac_prog_ar.patch       | 18 ++++++++
 sci-biology/abyss/files/abyss-1.3.6-gcc-4.7.patch  | 15 +++++++
 sci-biology/abyss/files/abyss-1.3.6-samtoafg.patch | 40 ++++++++++++++++++
 sci-biology/abyss/metadata.xml                     |  5 +++
 13 files changed, 360 insertions(+)

diff --git a/sci-biology/abyss/ChangeLog b/sci-biology/abyss/ChangeLog
new file mode 100644
index 0000000..c680959
--- /dev/null
+++ b/sci-biology/abyss/ChangeLog
@@ -0,0 +1,17 @@
+# ChangeLog for sci-biology/abyss
+# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+*abyss-1.3.3-r1 (23 May 2015)
+*abyss-1.3.4-r1 (23 May 2015)
+*abyss-1.3.6-r1 (23 May 2015)
+
+  23 May 2015; Martin Mokrejs <[email protected]>
+  +abyss-1.3.3-r1.ebuild, +abyss-1.3.4-r1.ebuild, +abyss-1.3.6-r1.ebuild,
+  +files/abyss-1.3.3-ac_prog_ar.patch, +files/abyss-1.3.3-gcc-4.7.patch,
+  +files/abyss-1.3.3-samtoafg.patch, +files/abyss-1.3.4-gcc-4.7.patch,
+  +files/abyss-1.3.4-samtoafg.patch, +files/abyss-1.3.6-ac_prog_ar.patch,
+  +files/abyss-1.3.6-gcc-4.7.patch, +files/abyss-1.3.6-samtoafg.patch,
+  +metadata.xml:
+  sci-biology/amos: bring in upstream patch to cope with secondary alignments
+  from 'bwa mem -M'

diff --git a/sci-biology/abyss/abyss-1.3.3-r1.ebuild 
b/sci-biology/abyss/abyss-1.3.3-r1.ebuild
new file mode 100644
index 0000000..b727861
--- /dev/null
+++ b/sci-biology/abyss/abyss-1.3.3-r1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-biology/abyss/abyss-1.3.3.ebuild,v 1.5 
2013/08/11 14:55:22 jlec Exp $
+
+EAPI="4"
+
+inherit autotools eutils 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"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="
+       dev-cpp/sparsehash
+       mpi? ( virtual/mpi )"
+RDEPEND="${DEPEND}"
+
+# todo: --enable-maxk=N configure option
+# todo: fix automagic mpi toggling
+
+src_prepare() {
+       tc-export AR
+       epatch \
+               "${FILESDIR}"/${P}-gcc-4.7.patch \
+               "${FILESDIR}"/${P}-ac_prog_ar.patch \
+               "${FILESDIR}"/${P}-samtoafg.patch
+
+       sed -i -e "s/-Werror//" configure.ac || die #365195
+       sed -i -e "/dist_pkgdoc_DATA/d" Makefile.am || die
+       eautoreconf
+}
+
+src_configure() {
+       econf \
+               --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+               $(use_enable openmp)
+}

diff --git a/sci-biology/abyss/abyss-1.3.4-r1.ebuild 
b/sci-biology/abyss/abyss-1.3.4-r1.ebuild
new file mode 100644
index 0000000..48d7671
--- /dev/null
+++ b/sci-biology/abyss/abyss-1.3.4-r1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-biology/abyss/abyss-1.3.4.ebuild,v 1.3 
2013/08/11 14:55:22 jlec Exp $
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=true
+
+inherit autotools-utils
+
+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"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="
+       dev-cpp/sparsehash
+       mpi? ( virtual/mpi )"
+RDEPEND="${DEPEND}"
+
+# todo: --enable-maxk=N configure option
+# todo: fix automagic mpi toggling
+
+PATCHES=(
+       "${FILESDIR}"/${P}-gcc-4.7.patch
+       "${FILESDIR}"/${PN}-1.3.3-ac_prog_ar.patch
+       "${FILESDIR}"/${P}-samtoafg.patch
+       )
+
+src_prepare() {
+       tc-export AR
+       sed -i -e "s/-Werror//" configure.ac || die #365195
+       sed -i -e "/dist_pkgdoc_DATA/d" Makefile.am || die
+       autotools-utils_src_prepare
+}
+
+src_configure() {
+       local myeconfargs=(
+               --docdir="${EPREFIX}/usr/share/doc/${PF}"
+               $(use_enable openmp)
+       )
+       autotools-utils_src_configure
+}

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 0000000..d5d019e
--- /dev/null
+++ b/sci-biology/abyss/abyss-1.3.6-r1.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-biology/abyss/abyss-1.3.6.ebuild,v 1.2 
2014/07/06 11:12:45 jlec Exp $
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=true
+
+inherit autotools-utils
+
+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"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="
+       dev-cpp/sparsehash
+       dev-libs/boost
+       mpi? ( virtual/mpi )"
+RDEPEND="${DEPEND}"
+
+# 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() {
+       tc-export AR
+       sed -i -e "s/-Werror//" configure.ac || die #365195
+       sed -i -e "/dist_pkgdoc_DATA/d" Makefile.am || die
+       autotools-utils_src_prepare
+}
+
+src_configure() {
+       local myeconfargs=(
+               --docdir="${EPREFIX}/usr/share/doc/${PF}"
+               $(use_enable openmp)
+       )
+       autotools-utils_src_configure
+}

diff --git a/sci-biology/abyss/files/abyss-1.3.3-ac_prog_ar.patch 
b/sci-biology/abyss/files/abyss-1.3.3-ac_prog_ar.patch
new file mode 100644
index 0000000..300868f
--- /dev/null
+++ b/sci-biology/abyss/files/abyss-1.3.3-ac_prog_ar.patch
@@ -0,0 +1,18 @@
+ configure.ac | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 5c6cb92..b99bedd 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -12,6 +12,10 @@ AC_PROG_CPP
+ AC_PROG_CXX
+ AC_PROG_INSTALL
+ AC_PROG_RANLIB
++AN_MAKEVAR([AR], [AC_PROG_AR])
++AN_PROGRAM([ar], [AC_PROG_AR])
++AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)])
++AC_PROG_AR
+ 
+ # Checks for header files.
+ AC_CHECK_HEADERS([dlfcn.h fcntl.h float.h limits.h \

diff --git a/sci-biology/abyss/files/abyss-1.3.3-gcc-4.7.patch 
b/sci-biology/abyss/files/abyss-1.3.3-gcc-4.7.patch
new file mode 100644
index 0000000..42066f7
--- /dev/null
+++ b/sci-biology/abyss/files/abyss-1.3.3-gcc-4.7.patch
@@ -0,0 +1,15 @@
+ ParseAligns/abyss-fixmate.cc |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/ParseAligns/abyss-fixmate.cc b/ParseAligns/abyss-fixmate.cc
+index 506ea0c..a0a403c 100644
+--- a/ParseAligns/abyss-fixmate.cc
++++ b/ParseAligns/abyss-fixmate.cc
+@@ -15,6 +15,7 @@
+ #include <iterator>
+ #include <sstream>
+ #include <string>
++#include <unistd.h>
+ 
+ using namespace std;
+ 

diff --git a/sci-biology/abyss/files/abyss-1.3.3-samtoafg.patch 
b/sci-biology/abyss/files/abyss-1.3.3-samtoafg.patch
new file mode 100644
index 0000000..cb7dfb0
--- /dev/null
+++ b/sci-biology/abyss/files/abyss-1.3.3-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
+ 

diff --git a/sci-biology/abyss/files/abyss-1.3.4-gcc-4.7.patch 
b/sci-biology/abyss/files/abyss-1.3.4-gcc-4.7.patch
new file mode 100644
index 0000000..c2cc35c
--- /dev/null
+++ b/sci-biology/abyss/files/abyss-1.3.4-gcc-4.7.patch
@@ -0,0 +1,15 @@
+ ParseAligns/abyss-fixmate.cc |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/ParseAligns/abyss-fixmate.cc b/ParseAligns/abyss-fixmate.cc
+index 1a169cf..36cc05b 100644
+--- a/ParseAligns/abyss-fixmate.cc
++++ b/ParseAligns/abyss-fixmate.cc
+@@ -16,6 +16,7 @@
+ #include <iterator>
+ #include <sstream>
+ #include <string>
++#include <unistd.h>
+ 
+ using namespace std;
+ 

diff --git a/sci-biology/abyss/files/abyss-1.3.4-samtoafg.patch 
b/sci-biology/abyss/files/abyss-1.3.4-samtoafg.patch
new file mode 100644
index 0000000..cb7dfb0
--- /dev/null
+++ b/sci-biology/abyss/files/abyss-1.3.4-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
+ 

diff --git a/sci-biology/abyss/files/abyss-1.3.6-ac_prog_ar.patch 
b/sci-biology/abyss/files/abyss-1.3.6-ac_prog_ar.patch
new file mode 100644
index 0000000..158e9b1
--- /dev/null
+++ b/sci-biology/abyss/files/abyss-1.3.6-ac_prog_ar.patch
@@ -0,0 +1,18 @@
+ configure.ac | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 9d4bb66..aa94364 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -12,6 +12,10 @@ AC_PROG_CPP
+ AC_PROG_CXX
+ AC_PROG_INSTALL
+ AC_PROG_RANLIB
++AN_MAKEVAR([AR], [AC_PROG_AR])
++AN_PROGRAM([ar], [AC_PROG_AR])
++AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)])
++AC_PROG_AR
+ AC_CHECK_TOOL(GHC, ghc)
+ AM_CONDITIONAL([HAVE_GHC], [test "$GHC"])
+ 

diff --git a/sci-biology/abyss/files/abyss-1.3.6-gcc-4.7.patch 
b/sci-biology/abyss/files/abyss-1.3.6-gcc-4.7.patch
new file mode 100644
index 0000000..c2cc35c
--- /dev/null
+++ b/sci-biology/abyss/files/abyss-1.3.6-gcc-4.7.patch
@@ -0,0 +1,15 @@
+ ParseAligns/abyss-fixmate.cc |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/ParseAligns/abyss-fixmate.cc b/ParseAligns/abyss-fixmate.cc
+index 1a169cf..36cc05b 100644
+--- a/ParseAligns/abyss-fixmate.cc
++++ b/ParseAligns/abyss-fixmate.cc
+@@ -16,6 +16,7 @@
+ #include <iterator>
+ #include <sstream>
+ #include <string>
++#include <unistd.h>
+ 
+ using namespace std;
+ 

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 0000000..cb7dfb0
--- /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
+ 

diff --git a/sci-biology/abyss/metadata.xml b/sci-biology/abyss/metadata.xml
new file mode 100644
index 0000000..f17a827
--- /dev/null
+++ b/sci-biology/abyss/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+  <herd>sci-biology</herd>
+</pkgmetadata>

Reply via email to