本文整理汇总了Python中Population.Population.column_list方法的典型用法代码示例。如果您正苦于以下问题:Python Population.column_list方法的具体用法?Python Population.column_list怎么用?Python Population.column_list使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Population.Population
的用法示例。
在下文中一共展示了Population.column_list方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: int
# 需要导入模块: from Population import Population [as 别名]
# 或者: from Population.Population import column_list [as 别名]
gd_util.die('There is an individual in population 2 that is not in the SNP table')
################################################################################
prog = 'Fst_column'
args = [ prog ]
args.append(input)
args.append(data_source)
args.append(min_reads)
args.append(min_qual)
args.append(retain)
args.append(discard_fixed)
args.append(biased)
columns = p1.column_list()
for column in columns:
if input_type == 'gd_genotype':
column = int(column) - 2
args.append('{0}:1'.format(column))
columns = p2.column_list()
for column in columns:
if input_type == 'gd_genotype':
column = int(column) - 2
args.append('{0}:2'.format(column))
with open(output, 'w') as fh:
gd_util.run_program(prog, args, stdout=fh)
sys.exit(0)
示例2: sorted
# 需要导入模块: from Population import Population [as 别名]
# 或者: from Population.Population import column_list [as 别名]
if not p_cov.is_superset(p_ind):
gd_util.die('There is an individual in the population individuals that is not in the Coverage table')
################################################################################
prog = 'mito_draw'
args = [ prog ]
args.append(snp_file)
args.append(cov_file)
args.append(annotation_input)
args.append(min_coverage)
if order_p_ind:
for column in sorted(p_ind.column_list()):
individual = p_ind.individual_with_column(column)
name = individual.name.split()[0]
args.append('{0}:{1}:{2}'.format(0, column, name))
else:
append_tags(args, p_ind, 'gd_indivs', 0)
append_tags(args, p_snp, snp_ext, 1)
append_tags(args, p_cov, cov_ext, 2)
with open('Ji.spec', 'w') as fh:
gd_util.run_program(prog, args, stdout=fh)
################################################################################
prog = 'varplot'
示例3: Population
# 需要导入模块: from Population import Population [as 别名]
# 或者: from Population.Population import column_list [as 别名]
population_list.append(this_pop)
p1.from_population_file(p1_input)
if not p_total.is_superset(p1):
gd_util.die('There is an individual in the population that is not in the SNP table')
tags = p1.tag_list()
else:
tags = []
for population_file, population_name in population_info:
population = Population()
this_pop = Population()
this_pop.from_population_file(population_file)
population_list.append(this_pop)
population.from_population_file(population_file)
if not p_total.is_superset(population):
gd_util.die('There is an individual in the {} population that is not in the SNP table'.format(population_name))
columns = population.column_list()
for column in columns:
tags.append('{0}:{1}'.format(column, population_name))
for tag in tags:
args.append(tag)
## text output
coverage_file = 'coverage.txt'
with open(coverage_file, 'w') as fh:
gd_util.run_program(prog, args, stdout=fh)
## graphical output
coverage2_file = 'coverage2.txt'
with open(coverage_file) as fh, open(coverage2_file, 'w') as ofh:
for line in fh:
示例4: Population
# 需要导入模块: from Population import Population [as 别名]
# 或者: from Population.Population import column_list [as 别名]
gd_util.die('Usage')
gd_saps_file, gd_snps_file, covered_intervals_file, gd_indivs_file, output_file, ind_arg = sys.argv[1:]
p_total = Population()
p_total.from_wrapped_dict(ind_arg)
p1 = Population()
p1.from_population_file(gd_indivs_file)
if not p_total.is_superset(p1):
gd_util.die('There is an individual in the population individuals that is not in the SNP table')
################################################################################
prog = 'get_pi'
args = [ prog ]
args.append(gd_saps_file)
args.append(gd_snps_file)
args.append(covered_intervals_file)
columns = p1.column_list()
for column in columns:
args.append(column)
with open(output_file, 'w') as fh:
gd_util.run_program(prog, args, stdout=fh)
sys.exit(0)