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


Python Population.popnames方法代码示例

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


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

示例1: Population

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

# example use of GenePopData and Population
apop = Population(None)

# read and process data in GenePop file 'genepop_western_alaska_chinook_RAD.txt'
apop.fromGenePop("genepop_western_alaska_chinook_RAD.txt")

#save to pickle file
apop.toFile('alaska_chinook.pickle')

# once data are pickled, we no longer need GenePopData 
# to retrieve data from the original data file
apop.fromFile('alaska_chinook.pickle')

# get fish information by population
fishies = apop.fishies()                    # list of all fish (and alleles) in file
fishies = apop.fishies(apop.popnames()[2])  # list of all fish (and alleles) in third population

# get alleles by population
alleles = apop.alleles()                   	# all alleles of all populations
alleles = apop.alleles(apop.popnames()[2]) 	# all alleles in third population
开发者ID:jakemannix,项目名称:citizensalmon,代码行数:24,代码来源:main.py


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