From 4c3880bfe25f6b81461523e3f1f38b43614d51b9 Mon Sep 17 00:00:00 2001 From: Martin Mokrejš Date: Sat, 23 May 2015 23:51:58 +0200 Subject: sci-biology/amos: bring in upstream patch to cope with secondary alignments from 'bwa mem -M' Package-Manager: portage-2.2.18 --- .../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 ++++++++++++++++++++++ 8 files changed, 201 insertions(+) create mode 100644 sci-biology/abyss/files/abyss-1.3.3-ac_prog_ar.patch create mode 100644 sci-biology/abyss/files/abyss-1.3.3-gcc-4.7.patch create mode 100644 sci-biology/abyss/files/abyss-1.3.3-samtoafg.patch create mode 100644 sci-biology/abyss/files/abyss-1.3.4-gcc-4.7.patch create mode 100644 sci-biology/abyss/files/abyss-1.3.4-samtoafg.patch create mode 100644 sci-biology/abyss/files/abyss-1.3.6-ac_prog_ar.patch create mode 100644 sci-biology/abyss/files/abyss-1.3.6-gcc-4.7.patch create mode 100644 sci-biology/abyss/files/abyss-1.3.6-samtoafg.patch (limited to 'sci-biology/abyss/files') 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 000000000..300868f52 --- /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 000000000..42066f7f2 --- /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 + #include + #include ++#include + + 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 000000000..cb7dfb08a --- /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 000000000..c2cc35c31 --- /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 + #include + #include ++#include + + 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 000000000..cb7dfb08a --- /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 000000000..158e9b126 --- /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 000000000..c2cc35c31 --- /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 + #include + #include ++#include + + 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 000000000..cb7dfb08a --- /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 + -- cgit v1.2.3-65-gdbad