Bio.Data.CodonTable模块

密码表基于NCBI的密码表。

这些表基于使用脚本/UPDATE_NCBI_CODON_Table.py解析NCBI文件ftp://ftp.ncbi.nih.gov/entrez/misc/data/gc.prt

上次更新版本4.4(2019年5月)

exception Bio.Data.CodonTable.TranslationError

基类:Exception

翻译特定异常的容器。

class Bio.Data.CodonTable.CodonTable(nucleotide_alphabet=None, protein_alphabet=None, forward_table=forward_table, back_table=back_table, start_codons=start_codons, stop_codons=stop_codons)

基类:object

密码表,或遗传密码。

__init__(nucleotide_alphabet=None, protein_alphabet=None, forward_table=forward_table, back_table=back_table, start_codons=start_codons, stop_codons=stop_codons)

初始化类。

forward_table = {}
back_table = {}
start_codons = []
stop_codons = []
__str__()

返回密码表的简单文本表示。

例如:

>>> import Bio.Data.CodonTable
>>> print(Bio.Data.CodonTable.standard_dna_table)
Table 1 Standard, SGC0

  |  T      |  C      |  A      |  G      |
--+---------+---------+---------+---------+--
T | TTT F   | TCT S   | TAT Y   | TGT C   | T
T | TTC F   | TCC S   | TAC Y   | TGC C   | C
...
G | GTA V   | GCA A   | GAA E   | GGA G   | A
G | GTG V   | GCG A   | GAG E   | GGG G   | G
--+---------+---------+---------+---------+--
>>> print(Bio.Data.CodonTable.generic_by_id[1])
Table 1 Standard, SGC0

  |  U      |  C      |  A      |  G      |
--+---------+---------+---------+---------+--
U | UUU F   | UCU S   | UAU Y   | UGU C   | U
U | UUC F   | UCC S   | UAC Y   | UGC C   | C
...
G | GUA V   | GCA A   | GAA E   | GGA G   | A
G | GUG V   | GCG A   | GAG E   | GGG G   | G
--+---------+---------+---------+---------+--
Bio.Data.CodonTable.make_back_table(table, default_stop_codon)

背靠背(天真的单密码子映射)。

仅返回单个密码子,根据其排序顺序从可能的备选方案中选择。

class Bio.Data.CodonTable.NCBICodonTable(id, names, table, start_codons, stop_codons)

基类:CodonTable

通用核苷酸序列密码子表。

nucleotide_alphabet = None
protein_alphabet = 'ACDEFGHIKLMNPQRSTVWY'
__init__(id, names, table, start_codons, stop_codons)

初始化类。

__repr__()

将NCBI代码表类表示为用于调试的字符串。

class Bio.Data.CodonTable.NCBICodonTableDNA(id, names, table, start_codons, stop_codons)

基类:NCBICodonTable

明确DNA序列的密码子表。

nucleotide_alphabet = 'GATC'
class Bio.Data.CodonTable.NCBICodonTableRNA(id, names, table, start_codons, stop_codons)

基类:NCBICodonTable

明确RNA序列的密码子表。

nucleotide_alphabet = 'GAUC'
class Bio.Data.CodonTable.AmbiguousCodonTable(codon_table, ambiguous_nucleotide_alphabet, ambiguous_nucleotide_values, ambiguous_protein_alphabet, ambiguous_protein_values)

基类:CodonTable

不明确序列的基本密码表。

__init__(codon_table, ambiguous_nucleotide_alphabet, ambiguous_nucleotide_values, ambiguous_protein_alphabet, ambiguous_protein_values)

初始化类。

__getattr__(name)

将属性查找转发到原始表。

Bio.Data.CodonTable.list_possible_proteins(codon, forward_table, ambiguous_nucleotide_values)

返回模糊密码子的所有可能的编码氨基酸。

Bio.Data.CodonTable.list_ambiguous_codons(codons, ambiguous_nucleotide_values)

扩展密码子列表以包括所有可能有歧义的密码子。

例如:

['TAG', 'TAA'] -> ['TAG', 'TAA', 'TAR']
['UAG', 'UGA'] -> ['UAG', 'UGA', 'URA']

请注意, [‘TAG’,‘TGA’] -> [‘TAG’,‘TGA’] ,这不添加“TRR”(也可以是“TAA”或“TGG”)。因此,下面只增加了两个密码子:

例如:

['TGA', 'TAA', 'TAG'] -> ['TGA', 'TAA', 'TAG', 'TRA', 'TAR']

返回新的(更长的)密码子字符串列表。

class Bio.Data.CodonTable.AmbiguousForwardTable(forward_table, ambiguous_nucleotide, ambiguous_protein)

基类:object

歧义核苷酸序列翻译转发表。

__init__(forward_table, ambiguous_nucleotide, ambiguous_protein)

初始化类。

__contains__(codon)

检查CODON是否可以作为歧义FORWARD_TABLE的键。

如果FORWARD_TABLE,则仅返回‘True [密码子] 返回值。

get(codon, failobj=None)

为类似字典的行为实现GET。

__getitem__(codon)

为AmbiguousForwardTable实现类似字典的行为。

forward_table [密码子] 将返回一个氨基酸字母,或者抛出一个KeyError(如果密码子不编码氨基酸)或一个TranslationError(如果密码子确实编码了一个氨基酸,但是或者也是一个终止密码子,或者确实编码了几个氨基酸,这些氨基酸在给定的字母表中没有唯一的字母可用)。

Bio.Data.CodonTable.register_ncbi_table(name, alt_name, id, table, start_codons, stop_codons)

将密码表数据转换为对象(私有)。

数据存储在字典中。