BioSQL.Loader 模組
將 biopython 物件載入 BioSQL 資料庫以進行持久儲存。
此程式碼使得將 biopython 物件儲存在關聯式資料庫中,然後將其取回成為可能。您不應直接使用此模組中的任何類別。而是應在資料庫物件上呼叫 load() 方法。
- class BioSQL.Loader.DatabaseLoader(adaptor, dbid, fetch_NCBI_taxonomy=False)
基礎:
object
用於將 SeqRecord 物件載入 BioSQL 資料庫的物件。
- __init__(adaptor, dbid, fetch_NCBI_taxonomy=False)
使用資料庫的連線資訊初始化。
建立 DatabaseLoader 物件通常由 BioSeqDatabase DBServer 物件處理,例如
from BioSQL import BioSeqDatabase server = BioSeqDatabase.open_database(driver="MySQLdb", user="gbrowse", passwd="biosql", host="localhost", db="test_biosql") try: db = server["test"] except KeyError: db = server.new_database("test", description="For testing GBrowse")
- load_seqrecord(record)
將 Biopython SeqRecord 載入資料庫。