Bio.PopGen.GenePop.LargeFileParser 模組

Genepop 檔案的大型檔案剖析。

標準剖析器會將整個檔案載入記憶體。此剖析器提供資料的迭代器。

類別:- LargeRecord - 保存 GenePop 資料。

函式:- read - 將 GenePop 記錄 (檔案) 剖析為 Record 物件。

Bio.PopGen.GenePop.LargeFileParser.get_indiv(line)

從行取得個別的資料。

Bio.PopGen.GenePop.LargeFileParser.read(handle)

剖析包含 GenePop 檔案的 handle。

引數:- handle 是一個包含 GenePop 記錄的類檔案物件。

class Bio.PopGen.GenePop.LargeFileParser.Record(handle)

基底:object

保存來自 GenePop 記錄的資訊。

成員:marker_len 標記長度 (每個等位基因 2 或 3 位數的代碼)。

comment_line 註解行。

loci_list 基因座名稱清單。

data_generator 迭代群體資料。

產生器只會運作一次。 如果您想要讀取 handle 兩次,您必須重新開啟它!

data_generator 可以是 () - 一個空的元組 - 標示新的群體或個體。 個體類似 (‘Ind1’, [(1,1), (3,None), (200,201)]),在上述案例中,個體名為 Ind1,有三個雙倍體基因座。 對於第二個基因座,其中一個等位基因未知。

__init__(handle)

初始化類別。

data_generator()

擷取群體資料。