summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeterjc <p.j.a.cock@googlemail.com>2018-05-29 15:05:22 +0100
committerÉtienne Mollier <emollier@debian.org>2024-03-17 18:11:48 +0100
commit85ae91140bd7f98445d6533e3452d2f0b444993b (patch)
tree00605667915ef7932a05e57e6964fa021105d10b
parent276b39582de02130980fc604299ff0899379e68e (diff)
[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
-rw-r--r--seqmagick/transform.py4
1 files changed, 4 insertions, 0 deletions
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