Bio.PopGen.GenePop 套件
子模組
- Bio.PopGen.GenePop.Controller 模組
GenePopController
GenePopController.__init__()
GenePopController.test_pop_hz_deficiency()
GenePopController.test_pop_hz_excess()
GenePopController.test_pop_hz_prob()
GenePopController.test_global_hz_deficiency()
GenePopController.test_global_hz_excess()
GenePopController.test_ld()
GenePopController.create_contingency_tables()
GenePopController.test_genic_diff_all()
GenePopController.test_genic_diff_pair()
GenePopController.test_genotypic_diff_all()
GenePopController.test_genotypic_diff_pair()
GenePopController.estimate_nm()
GenePopController.calc_allele_genotype_freqs()
GenePopController.calc_diversities_fis_with_identity()
GenePopController.calc_diversities_fis_with_size()
GenePopController.calc_fst_all()
GenePopController.calc_fst_pair()
GenePopController.calc_rho_all()
GenePopController.calc_rho_pair()
GenePopController.calc_ibd_diplo()
GenePopController.calc_ibd_haplo()
- Bio.PopGen.GenePop.EasyController 模組
EasyController
EasyController.__init__()
EasyController.get_basic_info()
EasyController.test_hw_pop()
EasyController.test_hw_global()
EasyController.test_ld_all_pair()
EasyController.estimate_nm()
EasyController.get_heterozygosity_info()
EasyController.get_genotype_count()
EasyController.get_fis()
EasyController.get_alleles()
EasyController.get_alleles_all_pops()
EasyController.get_allele_frequency()
EasyController.get_multilocus_f_stats()
EasyController.get_f_stats()
EasyController.get_avg_fis()
EasyController.get_avg_fst_pair()
EasyController.get_avg_fst_pair_locus()
EasyController.calc_ibd()
- Bio.PopGen.GenePop.FileParser 模組
read()
FileRecord
FileRecord.__init__()
FileRecord.__str__()
FileRecord.start_read()
FileRecord.skip_header()
FileRecord.seek_position()
FileRecord.skip_population()
FileRecord.get_individual()
FileRecord.remove_population()
FileRecord.remove_locus_by_position()
FileRecord.remove_loci_by_position()
FileRecord.remove_locus_by_name()
FileRecord.remove_loci_by_name()
- Bio.PopGen.GenePop.LargeFileParser 模組
模組內容
用於處理 GenePop 的程式碼。
請參閱 http://wbiomed.curtin.edu.au/genepop/,此格式在此處有說明文件:http://wbiomed.curtin.edu.au/genepop/help_input.html。
類別:Record 保留 GenePop 資料。
函式:read 將 GenePop 記錄(檔案)解析為 Record 物件。
部分靈感來自 MedLine 程式碼。
- Bio.PopGen.GenePop.get_indiv(line)
提取該行上個體資訊的詳細資料。
- Bio.PopGen.GenePop.read(handle)
解析包含 GenePop 檔案的 handle。
handle 是一個類似檔案的物件,其中包含 GenePop 記錄。
- class Bio.PopGen.GenePop.Record
基底類別:
object
保留來自 GenePop 記錄的資訊。
成員
marker_len 標記長度(每個等位基因 2 或 3 位數字代碼)。
comment_line 註解行。
loci_list 基因座名稱的清單。
pop_list 族群名稱的清單。
populations 族群資料的清單。
在大多數 genepop 檔案中,族群名稱並不可信。強烈建議依索引參照族群。
populations 每個族群都有一個元素。每個元素本身都是個體清單,每個個體都是一對,由個體名稱和等位基因清單組成(每個標記 2 個,或單倍體 1 個):範例
[ [ ('Ind1', [(1,2), (3,3), (200,201)], ('Ind2', [(2,None), (3,3), (None,None)], ], [ ('Other1', [(1,1), (4,3), (200,200)], ] ]
- __init__()
初始化類別。
- __str__()
傳回(重建)GenePop 文字表示。
- split_in_pops(pop_names)
將 GP 記錄分割成每個條目 1 個族群的字典。
給定一個具有 n 個族群和 m 個基因座的記錄,傳回記錄字典(鍵為 pop_name),其中每個項目都是具有單一族群和 m 個基因座的記錄。
引數:- pop_names - 族群名稱
- split_in_loci(gp)
將 GP 記錄分割成每個條目 1 個基因座的字典。
給定一個具有 n 個族群和 m 個基因座的記錄,傳回記錄字典(鍵為基因座名稱),其中每個項目都是具有單一基因座和 n 個族群的記錄。
- remove_population(pos)
移除族群(按位置)。
- remove_locus_by_position(pos)
按位置移除基因座。
- remove_locus_by_name(name)
按名稱移除基因座。