Package Bio :: Package Restriction :: Module PrintFormat
[hide private]
[frames] | no frames]

Module PrintFormat

source code

Print the results of restriction enzyme analysis.

PrintFormat prints the results from restriction analysis in 3 different format: list, column or map.

The easiest way to use it is:

>>> from Bio.Restriction.PrintFormat import PrintFormat
>>> from Bio.Restriction.Restriction import AllEnzymes
>>> from Bio import Entrez
>>> from Bio import SeqIO
>>> handle = Entrez.efetch(db="nucleotide", rettype="fasta", id="SYNPBR322")
>>> pBR322 = SeqIO.read(handle, "fasta")
>>> handle.close()
>>> dct = AllEnzymes.search(pBR322.seq)
>>> new = PrintFormat()
>>> new.print_that(dct, 'My pBR322 analysis:\n', 'No site:\n')
My pBR322 analysis:
AasI       :  2169, 2582.
AatII      :  4289.
...
ZraI       :  4287.
ZrmI       :  3847.
No site:
AarI      AatI      Acc65I    AcsI      AcvI      AdeI      AflII     AgeI
...
Vha464I   XapI      XbaI      XcmI      XhoI      XmaCI     XmaI      XmaJI
Zsp2I
>>> new.sequence = pBR322.seq
>>> new.print_as("map")
>>> new.print_that(dct)
...

Some of the methods of PrintFormat are meant to be overridden by derived class.

Classes [hide private]
  PrintFormat
PrintFormat allow the printing of results of restriction analysis.
Variables [hide private]
  __package__ = 'Bio.Restriction'