Bio.motifs.transfac模块

解析TRANSFAC文件。

class Bio.motifs.transfac.Motif(alphabet='ACGT', alignment=None, counts=None, instances=None)

基类:Motif, dict

存储一个TRANSFAC主题的信息。

此类继承自Bio.motifs.Motif Base以及Python字典。如果可能,解析器找到的所有主题信息都存储为基本类别的属性;有关这些属性的描述,请参阅Bio.motifs.Motif基本类别。与主题相关的所有其他信息都作为(键、值)对存储在字典中,其中键是在TRANSFAC文件中找到的双字母字段。引用是一个例外:它们存储在. referries属性中。

这些字段常见于TRANSFAC文件中::

AC:    Accession number
AS:    Accession numbers, secondary
BA:    Statistical basis
BF:    Binding factors
BS:    Factor binding sites underlying the matrix
       [sequence; SITE accession number; start position for matrix
       sequence; length of sequence used; number of gaps inserted;
       strand orientation.]
CC:    Comments
CO:    Copyright notice
DE:    Short factor description
DR:    External databases
       [database name: database accession number]
DT:    Date created/updated
HC:    Subfamilies
HP:    Superfamilies
ID:    Identifier
NA:    Name of the binding factor
OC:    Taxonomic classification
OS:    Species/Taxon
OV:    Older version
PV:    Preferred version
TY:    Type
XX:    Empty line; these are not stored in the Record.

引用存储在. referries属性中,该属性是具有以下键的字典列表::

RN:    Reference number
RA:    Reference authors
RL:    Reference data
RT:    Reference title
RX:    PubMed ID

有关更多信息,请参阅TRANSFAC文档。

multiple_value_keys = {'BF', 'BS', 'CC', 'DR', 'DT', 'HC', 'HP', 'OV'}
reference_keys = {'RA', 'RL', 'RT', 'RX'}
__getitem__(key)

为key中包含的位置返回新的Motif对象。

>>> from Bio import motifs
>>> motif = motifs.create(["AACGCCA", "ACCGCCC", "AACTCCG"])
>>> print(motif)
AACGCCA
ACCGCCC
AACTCCG
>>> print(motif[:-1])
AACGCC
ACCGCC
AACTCC
__annotations__ = {}
__firstlineno__ = 13
__static_attributes__ = ()
class Bio.motifs.transfac.Record

基类:list

将信息存储在TRANSFAC矩阵表中。

该记录继承自包含各个主题的列表。

属性:
  • 版本-版本号,对应于TRANSFAC文件中的“VV”字段;

__init__()

初始化课程。

__str__()

将TRANSFAC矩阵变成字符串。

__firstlineno__ = 78
__static_attributes__ = ('version',)
Bio.motifs.transfac.read(handle, strict=True)

将transfac格式手柄解析为Record对象。

Bio.motifs.transfac.write(motifs)

以TRANSFAC格式写出主题的表示。