Bio.motifs.mast 模組

用於支援 Motifs Alignment and Search Tool (MAST) 的模組。

class Bio.motifs.mast.Record

基底類別:list

此類別用於保存 MAST 執行結果。

mast.Record 保存了關於 motif 和序列之間匹配的資料。Record 中保存的 motifs 是 meme.Motif 類別的物件。

mast.Record 類別繼承自 list,因此您可以透過索引存取 record 中的個別 motif。或者,您也可以透過名稱找到 motif

>>> from Bio import motifs
>>> with open("motifs/mast.crp0.de.oops.txt.xml") as f:
...     record = motifs.parse(f, 'MAST')
>>> motif = record[0]
>>> print(motif.name)
1
>>> motif = record['1']
>>> print(motif.name)
1
__init__()

初始化此類別。

__getitem__(key)

返回索引鍵為 key 的 motif。

Bio.motifs.mast.read(handle)

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