Bio.PopGen.GenePop.EasyController 模組
透過更簡易的介面控制 GenePop。
此介面效率不如標準的 GenePopControler
- class Bio.PopGen.GenePop.EasyController.EasyController(fname, genepop_dir=None)
基底:
object
定義一個類別,提供與 GenePop 程式更簡易的介面。
- __init__(fname, genepop_dir=None)
初始化控制器。
genepop_dir 是 GenePop 所在的目錄。
二進制檔案應命名為 Genepop(首字母大寫 G)
- get_basic_info()
從檔案中取得族群列表和基因座列表。
- test_hw_pop(pop_pos, test_type='probability')
對給定位置執行哈溫平衡檢定。
- test_hw_global(test_type='deficiency', enum_test=True, dememorization=10000, batches=20, iterations=5000)
執行哈溫全球雜合子檢定。
- test_ld_all_pair(locus1, locus2, dememorization=10000, batches=20, iterations=5000)
檢測每個族群中每對基因座的連鎖不平衡。
- estimate_nm()
估計 Nm。只是一個簡單的橋樑。
- get_heterozygosity_info(pop_pos, locus_name)
傳回某個族群上特定基因座的雜合度資訊。
傳回值為(預期同型合子數、觀察同型合子數、預期異型合子數、觀察異型合子數)
- get_genotype_count(pop_pos, locus_name)
傳回特定族群和基因座的基因型計數。
- get_fis(pop_pos, locus_name)
傳回特定族群和基因座的 Fis 值。
以下 CW 代表 Cockerham 和 Weir,RH 代表 Robertson 和 Hill。
傳回一個配對
字典 [等位基因] = (重複次數, 頻率, Fis CW ),其中包含每個等位基因的資訊
一個三元組,包含等位基因總數、Fis CW、Fis RH
- get_alleles(pop_pos, locus_name)
傳回特定族群和基因座的等位基因。
- get_alleles_all_pops(locus_name)
傳回特定族群和基因座的等位基因。
- get_allele_frequency(pop_pos, locus_name)
計算特定族群中特定基因座的等位基因頻率。
- get_multilocus_f_stats()
傳回多基因座 F 統計值。
說明平均方式。傳回 Fis(CW)、Fst、Fit
- get_f_stats(locus_name)
傳回基因座的 F 統計值。
傳回值為 Fis(CW)、Fst、Fit、Qintra、Qinter
- get_avg_fis()
計算基於同源性的平均 Fis 值。
- get_avg_fst_pair()
計算所有族群對的基於等位基因大小的平均 Fis 值。
- get_avg_fst_pair_locus(locus)
計算給定基因座的所有族群對的基於等位基因大小的平均 Fis 值。
- calc_ibd(is_diplo=True, stat='a', scale='Log', min_dist=0.00001)
計算二倍體或單倍體的距離隔離統計值。