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')

对给定位置执行 Hardy-Weinberg 检验。

test_hw_global(test_type='deficiency', enum_test=True, dememorization=10000, batches=20, iterations=5000)

执行 Hardy-Weinberg 全局杂合子检验。

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)

计算二倍体或单倍体的隔离距离统计量。