生物。限制。打印格式模块
打印限制性酶分析结果。
Print格式以3种不同的格式打印限制分析的结果:列表、列或地图。
最简单的使用方法是:
>>> from Bio.Restriction.PrintFormat import PrintFormat
>>> from Bio.Restriction.Restriction import RestrictionBatch
>>> from Bio.Seq import Seq
>>> pBs_mcs = Seq('GGTACCGGGCCCCCCCTCGAGGTCGACGGTATCGATAAGCTTGATATCGAATTC')
>>> restriction_batch = RestrictionBatch(['EcoRI', 'BamHI', 'ApaI'])
>>> result = restriction_batch.search(pBs_mcs)
>>> my_map = PrintFormat()
>>> my_map.print_that(result, 'My pBluescript mcs analysis:\n',
... 'No site:\n')
My pBluescript mcs analysis:
ApaI : 12.
EcoRI : 50.
No site:
BamHI
>>> my_map.sequence = pBs_mcs
>>> my_map.print_as("map")
>>> my_map.print_that(result)
12 ApaI
|
| 50 EcoRI
| |
GGTACCGGGCCCCCCCTCGAGGTCGACGGTATCGATAAGCTTGATATCGAATTC
||||||||||||||||||||||||||||||||||||||||||||||||||||||
CCATGGCCCGGGGGGGAGCTCCAGCTGCCATAGCTATTCGAACTATAGCTTAAG
1 54
Enzymes which do not cut the sequence.
BamHI
>>>
Print格式的某些方法旨在由派生类重写。
使用以下参数控制外观:
- ConsoleWidth使用的控制台宽度默认为80。
永远不应该低于60。
名称宽度 :归因于Print List方法中的名称的空间。
缩进 :第二行的凹痕。
- MaxSize序列的最大大小(默认=6:
-> 99 999 bp + 1 trailing ',' people are unlikely to ask for restriction map of sequences bigger than 100.000 bp. This is needed to determine the space to be reserved for sites location.
MaxSize = 5 => 9.999个基点
最大大小= 6 => 99.999个碱基
最大大小= 7 => 999.999个碱基
示例输出::
<------------ ConsoleWidth --------------->
<- NameWidth ->
EcoRI : 1, 45, 50, 300, 400, 650,
700, 1200, 2500.
<-->
Indent
- class Bio.Restriction.PrintFormat.PrintFormat
基类:
object
Print格式允许打印限制分析的结果。
- ConsoleWidth = 80
- NameWidth = 10
- MaxSize = 6
- Cmodulo = 0
- PrefWidth = 80
- Indent = 4
- linesize = 70
- print_as(what='list')
按指定打印结果。
- 有效格式为:
“列表” ->字母顺序“数字” ->序列“地图”中的站点数量 ->具有地点的序列的地图表示。
如果您想要更多的灵活性,请优先使用虚拟方法make_form。
- format_output(dct, title='', s1='')
将结果总结为格式良好的字符串。
- 论点:
dct是由RestrictionBatch.search()返回的字典
title是地图的标题。它必须是格式化字符串,即您必须包括断点。
s1是区分有位点和没有位点的酶列表的标题。
s1也必须是格式化字符串。
print_的格式是列表。
- print_that(dct, title='', s1='')
打印form_put方法(ObSOSYS)的输出。
- 论点:
dct是由RestrictionBatch.search()返回的字典
title是地图的标题。它必须是格式化字符串,即您必须包括断点。
s1是区分有位点和没有位点的酶列表的标题。
s1也必须是格式化字符串。
此方法打印A. form_select()的输出,并且这里是为了向后兼容。
- make_format(cut=(), title='', nc=(), s1='')
用于格式化结果的虚拟方法。
虚拟方法。这里指的是_make_* 方法之一。您还可以创建一个新方法并将make_form指向它。
- __firstlineno__ = 85
- __static_attributes__ = ('make_format',)