Bio.UniProt 套件

子模組

模組內容

用於處理各種 UniProt 檔案格式以及與 UniProt 資料庫互動的程式碼。

目前包含來自 UniProt-GOA 的 GAF、GPA 和 GPI 格式的解析器,作為 Bio.UniProt.GOA 模組。

另請參閱 Bio.SwissProt 以及 Bio.SeqIO 中「swiss」的支援,以了解 UniProt 中仍然使用的傳統純文字序列格式。

另請參閱 Bio.SeqIO 中的 Bio.SeqIO.SwissIO 以了解「uniprot-xml」的支援。

Bio.UniProt.search(query: str, fields: list[str] | None = None, batch_size: int = 500) _UniProtSearchResults

搜尋 UniProt 資料庫。

考慮使用查詢語法查詢欄位來精煉您的搜尋。

請參閱此處的 API 詳細資訊。

>>> from Bio import UniProt
>>> from itertools import islice
>>> # Get the first 10 results
>>> results = UniProt.search("(organism_id:2697049) AND (reviewed:true)")[:10]
參數:
  • query (str) – 用來搜尋 UniProt 的查詢字串

  • fields (List[str], optional) – 要在結果中檢索的欄位,預設為所有欄位

  • batch_size (int) – 每次批次檢索的結果數,預設為 500

回傳:

搜尋結果的迭代器

回傳類型:

_UniProtSearchResults