[Biopython] Restriction enzymes and sticky ends

Peter Cock p.j.a.cock at googlemail.com
Sun Apr 7 19:52:13 UTC 2013


On Sun, Apr 7, 2013 at 1:36 AM, Mark Budde <markbudde at gmail.com> wrote:
> Hi - I have a question about sticky ends in Biopython. Specifically, is
> there any way to  maintain sticky end information? Having read the
> restriction doc (http://biopython.org/DIST/docs/cookbook/Restriction.html),
> I suspect that the answer is no. It seems that the cut sites are only
> maintained for the top strand. So I am planning on adding this data in my
> program (although I will need to read up on classes).
>
> However, this requires that I can get the cut site information. The only
> way that I can find to extract this information is from the
> Restriction.Enzyme.elucidate(), which gives the cut site as NN^NN_NN. I can
> use this information to determine the cut sites, but I expect that there is
> a more direct way, since the elucidate() function must be generating this
> from some attribute.
>
> FYI, I am curious about this because I want to simulate GoldenGate cloning
> in Biopython.
>
> Thanks,
> Mark Budde

Hi Mark,

Good question. Sadly help(EcoRI) doesn't tell you very much,
does it? The whole Restriction module could benefit from a
new maintainer and/or a rewrite (for one thing, it unfortunately
did not follow Python counting in some aspects).

Two tips: first dir(object) gives a list of the attributes and methods
of an object in Python. Second, you can look at the source of the
elucidate method to see where it gets the information you're
looking for ;)  [A last resort perhaps - but when documentation
has let you down, worth knowing how to explore.]

https://github.com/biopython/biopython/blob/master/Bio/Restriction/Restriction.py

Here EcoRI is a 5' overhanging digest enzyme, and the values
you need are EcoRI.fst5 (here 1) and EcoRI.fst3 (here -1)
which are relative to the recognition site (here GAATTC).
e.g.

Overhang type methods include:

>>> from Bio.Restriction import EcoRI
>>> EcoRI.overhang()
"5' overhang"
>>> EcoRI.is_blunt()
False
>>> EcoRI.is_5overhang()
True
>>> EcoRI.is_3overhang()
False

>>> EcoRI.elucidate()
'G^AATT_C'
>>> EcoRI.fst5
1
>>> EcoRI.fst3
-1
>>> EcoRI.site
'GAATTC'

Notice 'GAATTC'[:1] = 'G', 'GAATTC'[1:-1] = 'AATT' and
'GAATTC'[-1:] = 'C' which gives the elucidated string.

Is that all you needed?

Regards

Peter



More information about the Biopython mailing list