Bio.PopGen.GenePop包
子模块
- Bio.PopGen.GenePop. File Parser模块
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()
FileRecord.__firstlineno__
FileRecord.__static_attributes__
- Bio.PopGen.GenePop. LargeFile Parser模块
模块内容
与GenePop一起使用的代码。
请参阅http://wbiomed.curtin.edu.au/genepop/,格式记录在此处:http://wbiomed.curtin.edu.au/genepop/help_input.html。
类别:记录 保存GenePop数据。
有读 将GenePop记录(文件)解析为Record对象。
部分灵感来自MedLine Code。
- Bio.PopGen.GenePop.get_indiv(line)
提取该行个人信息的详细信息。
- Bio.PopGen.GenePop.read(handle)
解析包含GenePop文件的手柄。
handle是一个类似文件的对象,包含GenePop记录。
- class Bio.PopGen.GenePop.Record
基类:
object
保存GenePop唱片中的信息。
成员:
marker_len 标记长度(每个基因2或3位代码)。
评论行 评论行。
地点_列表 地点名称列表。
流行列表 人口姓名列表。
人口 人口数据列表。
在大多数genepop文件中,population名称不可信。强烈建议按指数提及人口。
每个种群有一个元素。每个元素本身就是一个个体列表,每个个体都是由个体名称和一系列基因组成的一对(每个标记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个座位的记录,返回记录字典(key pop_Name),其中每个项都是具有单个流行点和m个座位的记录。
参数:- pop_names -人口名称
- split_in_loci(gp)
在字典中拆分GP记录,每个条目有1个位点。
给定具有n个pop和m个location的记录,返回记录字典(关键基因座名称),其中每个项都是具有单个基因座和n个pop的记录。
- remove_population(pos)
删除人口(按职位)。
- remove_locus_by_position(pos)
按位置删除位点。
- remove_locus_by_name(name)
按名称删除所在地。
- __firstlineno__ = 97
- __static_attributes__ = ('comment_line', 'loci_list', 'marker_len', 'pop_list', 'populations')