Bio.motifs.transfac 模組

解析 TRANSFAC 檔案。

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

基底類別:Motifdict

儲存一個 TRANSFAC 基序的資訊。

此類別繼承自 Bio.motifs.Motif 基底類別以及 Python 字典。解析器找到的所有基序資訊都會盡可能地儲存為基底類別的屬性;請參閱 Bio.motifs.Motif 基底類別以了解這些屬性的描述。與基序關聯的所有其他資訊都以 (鍵, 值) 對的形式儲存在字典中,其中鍵是 TRANSFAC 檔案中找到的兩個字母的欄位。例外情況是參考文獻:這些儲存在 .references 屬性中。

這些欄位通常在 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.

參考文獻儲存在 .references 屬性中,該屬性是一個包含以下鍵的字典列表

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)

傳回一個新的 Motif 物件,用於包含在鍵中的位置。

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

基底類別:list

儲存 TRANSFAC 矩陣表中的資訊。

記錄繼承自包含個別基序的列表。

屬性
  • version - 版本號,對應於 TRANSFAC 檔案中的 'VV' 欄位;

__init__()

初始化類別。

__str__()

將 TRANSFAC 矩陣轉換為字串。

Bio.motifs.transfac.read(handle, strict=True)

將 transfac 格式的 handle 解析為 Record 物件。

Bio.motifs.transfac.write(motifs)

以 TRANSFAC 格式寫入基序的表示。