当前位置: 首页>>代码示例>>Python>>正文


Python Population.tag_list方法代码示例

本文整理汇总了Python中Population.Population.tag_list方法的典型用法代码示例。如果您正苦于以下问题:Python Population.tag_list方法的具体用法?Python Population.tag_list怎么用?Python Population.tag_list使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Population.Population的用法示例。


在下文中一共展示了Population.tag_list方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: pos_dict

# 需要导入模块: from Population import Population [as 别名]
# 或者: from Population.Population import tag_list [as 别名]
def pos_dict(gd_indivs_file, input_type):
    rv = {}

    p = Population()
    p.from_population_file(gd_indivs_file)

    for tag in p.tag_list():
        column, name = tag.split(':')
        column = int(column) - 1

        if input_type == 'gd_genotype':
            column -= 2

        rv[name] = column

    return rv
开发者ID:gigascience,项目名称:galaxy-genome-diversity,代码行数:18,代码来源:make_phylip.py

示例2: Population

# 需要导入模块: from Population import Population [as 别名]
# 或者: from Population.Population import tag_list [as 别名]
################################################################################

prog = 'coverage'

args = [ prog ]
args.append(input)
args.append(data_source)

user_coverage_file = os.path.join(extra_files_path, 'coverage.txt')
args.append(user_coverage_file)

population_list = []

if all_individuals:
    tags = p_total.tag_list()
elif p1_input is not None:
    p1 = Population()
    this_pop = Population()
    this_pop.from_population_file(p1_input)
    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)
开发者ID:gigascience,项目名称:galaxy-genome-diversity,代码行数:32,代码来源:coverage_distributions.py

示例3: Population

# 需要导入模块: from Population import Population [as 别名]
# 或者: from Population.Population import tag_list [as 别名]
p1 = Population()
p1.from_population_file(pop_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')

################################################################################

prog = 'kinship_prep'

args = [ prog ]
args.append(input)  # a Galaxy SNP table
args.append(0)      # required number of reads for each individual to use a SNP
args.append(0)      # required genotype quality for each individual to use a SNP
args.append(0)      # minimum spacing between SNPs on the same scaffold

for tag in p1.tag_list():
    if input_type == 'gd_genotype':
        column, name = tag.split(':')
        tag = '{0}:{1}'.format(int(column) - 2, name)
    args.append(tag)

gd_util.run_program(prog, args)

# kinship.map
# kinship.ped
# kinship.dat

################################################################################

prog = 'king'
开发者ID:gigascience,项目名称:galaxy-genome-diversity,代码行数:32,代码来源:discover_familial_relationships.py

示例4: Population

# 需要导入模块: from Population import Population [as 别名]
# 或者: from Population.Population import tag_list [as 别名]
individual_population = {}
population_list = []

if all_individuals:
    p1 = p_total
    p1.name = 'All Individuals'
    population_list.append(p1)
else:
    p1 = Population()
    for file, name in population_files:
        this_pop = Population(name)
        this_pop.from_population_file(file)
        population_list.append(this_pop)

        for tag in this_pop.tag_list():
            if tag not in individual_population:
                individual_population[tag] = name

        # add individuals from this file to p1
        p1.from_population_file(file)


if not p_total.is_superset(p1):
    gd_util.die('There is an individual in the population that is not in the SNP table')

################################################################################

prog = 'admix_prep'

args = [ prog ]
开发者ID:gigascience,项目名称:galaxy-genome-diversity,代码行数:32,代码来源:prepare_population_structure.py

示例5: Population

# 需要导入模块: from Population import Population [as 别名]
# 或者: from Population.Population import tag_list [as 别名]
if not p_total.is_superset(p1):
    gd_util.die('There is an individual in the first population that is not in the SNP table')

p2 = Population()
p2.from_population_file(p2_input)
if not p_total.is_superset(p2):
    gd_util.die('There is an individual in the second population that is not in the SNP table')

################################################################################

prog = 'offspring_heterozygosity'

args = [ prog ]
args.append(input)  # a Galaxy SNP table

for tag in p1.tag_list():
    column, name = tag.split(':')

    if input_type == 'gd_genotype':
        column  = int(column) - 2

    tag = '{0}:{1}:{2}'.format(column, 0, name)
    args.append(tag)

for tag in p2.tag_list():
    column, name = tag.split(':')

    if input_type == 'gd_genotype':
        column = int(column) - 2

    tag = '{0}:{1}:{2}'.format(column, 1, name)
开发者ID:gigascience,项目名称:galaxy-genome-diversity,代码行数:33,代码来源:offspring_heterozygosity.py


注:本文中的Population.Population.tag_list方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。