From 85ae91140bd7f98445d6533e3452d2f0b444993b Mon Sep 17 00:00:00 2001
From: peterjc
Date: Tue, 29 May 2018 15:05:22 +0100
Subject: [PATCH] Fix for Biopython 1.71 dual coding support.
Origin: https://github.com/fhcrc/seqmagick/pull/76
This closes issue #73, indirectly triggered by changes
in Biopython to support recent NCBI codon tables with
codons which can be amino acids of stop codons.
Previously the monkey-patched sub-class was breaking here:
dual_coding = [c for c in stop_codons if c in forward_table]
This change adds direct support for __contains__ by
forwarding this to the wrapped forward table.
Gbp-Pq: Name biopython_1.71_dual_coding_support.patch
---
seqmagick/transform.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/seqmagick/transform.py b/seqmagick/transform.py
index 3150d1d..4478786 100644
--- a/seqmagick/transform.py
+++ b/seqmagick/transform.py
@@ -670,6 +670,10 @@ class CodonWarningTable(object):
return value in self.wrapped
+ def __contains__(self, value):
+ return value in self.wrapped
+
+
def translate(records, translate):
"""
Perform translation from generic DNA/RNA to proteins. Bio.Seq
--
cgit v1.2.3