Bio.KEGG.Compound 套件

模組內容

用於處理 KEGG 配體/化合物資料庫的程式碼。

函式
  • parse - 返回一個提供 Record 物件的迭代器。

類別
  • Record - KEGG 配體/化合物的表示法。

class Bio.KEGG.Compound.Record

基底類別:object

保存來自 KEGG 配體/化合物記錄的資訊。

屬性
  • entry 條目識別符。

  • name 化合物名稱的列表。

  • formula 化合物的化學式

  • mass 化合物的分子量

  • pathway 包含 3 個元素的元組列表:(‘PATH’, 路徑 ID, 路徑)

  • enzyme EC 編號的列表。

  • structures 包含 2 個元素的元組列表:(資料庫, 結構 ID 列表)

  • dblinks 包含 2 個元素的元組列表:(資料庫, 連結 ID 列表)

__init__()

初始化為新的記錄。

__str__()

返回此 Record 的字串表示形式。

Bio.KEGG.Compound.parse(handle)

解析 KEGG 配體/化合物檔案,返回 Record 物件。

這是一個迭代器函式,通常用於 for 迴圈中。 例如,使用 Biopython 測試套件中的其中一個 KEGG 範例檔案:

>>> with open("KEGG/compound.sample") as handle:
...     for record in parse(handle):
...         print("%s %s" % (record.entry, record.name[0]))
...
C00023 Iron
C00017 Protein
C00099 beta-Alanine
C00294 Inosine
C00298 Trypsin
C00348 all-trans-Undecaprenyl phosphate
C00349 2-Methyl-3-oxopropanoate
C01386 NH2Mec