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


Python Population.microbiome_sequence_alignment方法代码示例

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


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

示例1: run

# 需要导入模块: from population import Population [as 别名]
# 或者: from population.Population import microbiome_sequence_alignment [as 别名]
    def run(species_registry, env, pct_env, pct_pool, rep):
        population = Population(species_registry, env, population_size, microbe_size, pct_env, pct_pool)
        prefix = str(rep + 1) + "_"
        sufix = "_E" + str(pct_env) + "_P" + str(pct_pool) + ".txt"
        print "Output 5 result files in the format of: %s[****]%s" % (prefix, sufix)
        file1 = open(prefix + "fixation" + sufix, 'w')
        file2 = open(prefix + "gamma_diversity" + sufix, 'w')
        file3 = open(prefix + "beta_diversity" + sufix, 'w')
        file4 = open(prefix + "sum" + sufix, 'w')
        file6 = open(prefix + "alpha_diversity" + sufix, 'w')

        while population.number_of_generation <= number_of_generation:
            population.sum_species()
            if population.number_of_generation % number_generation_for_observation == 0:
                # NOTE: separate summarise and get stats
                # population.calcalute_all_stats()
                # then use accessor to get values.
                print >> file1, population.ratio_of_fixation()
                print >> file4, population
                print >> file6, population.get_alpha_diversity()
                print >> file2, population.get_gamma_diversity()
                population.microbiome_sequence_alignment()
                population.segregating_site()
                print >> file3, str(population.get_beta_diversity()) + '\t' + str(population.number_of_segregating_site)
            population.get_next_gen()
开发者ID:qz28,项目名称:microbiosima,代码行数:27,代码来源:run_neutral.py


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