by the scaling parameter.''', 'validate': simuOpt.valueBetween(0,1), }, {'longarg': 'recIntensity=', 'default': 1e-8, 'useDefault': True, 'allowedTypes': [types.FloatType, types.IntType, types.LongType], 'label': 'Recombination intensity', 'description': '''Recombination intensity. The actual recombination rate between two adjacent loci will be this intensity times loci distance in basepair, and times the scaling parameter. For example, if two loci are 1M bp apart, the recombination rate will be 1e6 x 1e-8 (default value), namely 1e-2 times scaling parameter. (This is roughly 0.01 per cM). If a variable 'geneticMap' that stores the genetic map of each locus exists in this population, the genetic map will be used.''', 'validate': simuOpt.valueGE(0), }, {'longarg': 'scale=', 'default': 1, 'useDefault': True, 'allowedTypes': [types.IntType, types.LongType, types.FloatType], 'label': 'Acceleration scale', 'description': '''This parameter is used to speed up recombination, mutation and selection. Briefly speaking, certain parts of the evolutionary process is accelerated but random genetic drift is kept. Please refer to Peng 2008 for more details''', 'validate': simuOpt.valueGT(0), },
'type': [int, long], 'description': '''At which generation to split the population. The population will start to grow after burnin stage but will not split till this generation. Note that if the disease is introduced after this stage, it will be in one of subpopulations. ''', 'validator': simuOpt.valueGT(0) }, { 'name': 'mixingGen', 'default': 8000, 'label': 'When to mix Population', 'type': [int, long], 'description': '''At which generation to start mixing (allow migration. This number should be greater than or equal to split gen.''', 'validator': simuOpt.valueGE(0) }, { 'name': 'endingGen', 'default': 10000, 'label': 'Ending generation number', 'type': [int, long], 'description': '''At which generation to stop the simulation. This is the total generation number.''', 'validator': simuOpt.valueGE(0) }, # # { 'separator': 'Migration parameters:' },
'default': { '**U': 1000 }, 'label': '#controls', 'allowedTypes': [types.DictType, types.NoneType], 'description': '''Type and number of controls. The count will be considered as weight in 'Sample size from #ctrl/#case'. ''' }, { 'longarg': 'ratio=', 'default': 1, 'label': '#controls / #cases for analysis 3', 'allowedTypes': [types.FloatType, types.IntType], 'validate': simuOpt.valueGE(0), 'description': '''Ratio, use for calculate sample size from #ctrl/#case''', }, { 'longarg': 'alpha=', 'default': 1e-7, 'label': 'Significant level', 'allowedTypes': [types.ListType, types.TupleType], 'validate': simuOpt.valueListOf(simuOpt.valueBetween(0., 1)), }, { 'longarg': 'power=', 'default': 0.8,
'label': 'Chromosomes to use', 'description': 'A list of chromosomes (1-22) to use.', 'allowedTypes': [TupleType, ListType], 'chooseFrom':range(1,23), 'validate': simuOpt.valueListOf(simuOpt.valueBetween(1, 22)), }, { 'name': 'numMarkers', 'default': [2000,2000,2000], 'label': 'Number of markers to use', 'description': '''Number of markers to use for each chromosome. This parameter should be ignored if it is unspecified or is set to zero for some chromosomes. ''', 'allowedTypes': [TupleType, ListType], 'validate': simuOpt.valueOr(simuOpt.valueGT(0), simuOpt.valueListOf(simuOpt.valueGE(0))) }, { 'name': 'startPos', 'default': [25000000, 25000000, 40000000], 'label': 'staring position (bp)', 'description': '''Starting position of the markers on each chromosome. The beginning of the chromosomes will be assumed if this parameter is unspecified or is set to zero.''', 'allowedTypes': [TupleType, ListType], 'validate': simuOpt.valueOr(simuOpt.valueGE(0), simuOpt.valueListOf(simuOpt.valueGE(0))) }, { 'name': 'endPos', 'default': [], 'label': 'Ending position (bp)',
}, { 'longarg': 'recIntensity=', 'default': 1e-8, 'useDefault': True, 'allowedTypes': [types.FloatType, types.IntType, types.LongType], 'label': 'Recombination intensity', 'description': '''Recombination intensity. The actual recombination rate between two adjacent loci will be this intensity times loci distance in basepair, and times the scaling parameter. For example, if two loci are 1M bp apart, the recombination rate will be 1e6 x 1e-8 (default value), namely 1e-2 times scaling parameter. (This is roughly 0.01 per cM). If a variable 'geneticMap' that stores the genetic map of each locus exists in this population, the genetic map will be used.''', 'validate': simuOpt.valueGE(0), }, { 'longarg': 'scale=', 'default': 1, 'useDefault': True, 'allowedTypes': [types.IntType, types.LongType, types.FloatType], 'label': 'Acceleration scale', 'description': '''This parameter is used to speed up recombination, mutation and selection. Briefly speaking, certain parts of the evolutionary process is accelerated but random genetic drift is kept. Please refer to Peng 2008 for more details''', 'validate': simuOpt.valueGT(0), }, {
'chooseOneOf': ['stepping stone', 'island', 'none'] }, {'name': 'migrRate', 'default': 0.05, 'label': 'Migration rate', 'description': '''Migration rate during mixing stage. Island or circular stepping stone migration model can be used. ''', 'type': [float, int], 'validator': simuOpt.valueBetween(0,1) }, {'name': 'update', 'default': 100, 'label': 'Update figure every # gen', 'type': [int], 'description': '''Update figure every some generation.''', 'validator': simuOpt.valueGE(1) }, {'name': 'dispPlot', 'default': True, 'label': 'Display plot?', 'type': [types.BooleanType], 'description': 'If false, do not disply figure.', }, {'name': 'saveAt', 'default': [x*100 for x in range(1,11)], 'label': 'Save figure at generation', 'type': [types.ListType, types.TupleType], 'description': '''At these generations, figures will be saved, instead of displayed. Note that: 1): generations at which figure is not updated will not be saved. (update parameter) 2); figures will not be displayed at these generations
'default':0.05, 'label':'Maximum MAF', 'type':'number', 'validate':simuOpt.valueBetween(0,1) }, {'name':'MAF_range_lo', 'default':0.05, 'label':'Minimum MAF', 'type':'number', 'validate':simuOpt.valueBetween(0,1) }, {'name':'MAF_num_steps', 'default':1, 'label':'Number of MAF levels', 'type':int, 'validate':simuOpt.valueGE(1) }, {'name':'MAF_replicates', 'default':1, 'label':'Replicates within each MAF', 'type':int, 'validate':simuOpt.valueGE(1) }, {'separator':"Number of Controls"}, {'name':'CC_range_hi', 'default':1000, 'label':'Max # Controls', 'type':int, 'validate':simuOpt.valueGE(100) },
simuOpt.setOptions(alleleType='binary', optimized=True) from simuPOP import * import config options = [ {'name':'DPL', 'default':"rs4491689", 'type':'strings', 'label':"Disease Locus ID" }, {'name':'GRR', 'default':1.0, 'type':'number', 'label':"Genotype Relative Risk", 'validate':simuOpt.valueGE(1.0) }, {'name':'wtr', 'default':0.05, 'type':'number', 'label':'Wild Type Risk', 'validate':simuOpt.valueBetween(0,1) }, {'name':'numCases', 'default':1000, 'type':int, 'label':"Number of Cases" }, {'name':'numControls', 'default':1000, 'type':int,
{ 'name': 'migrRate', 'default': 0.05, 'label': 'Migration rate', 'description': '''Migration rate during mixing stage. Island or circular stepping stone migration model can be used. ''', 'type': [float, int], 'validator': simuOpt.valueBetween(0, 1) }, { 'name': 'update', 'default': 100, 'label': 'Update figure every # gen', 'type': [int], 'description': '''Update figure every some generation.''', 'validator': simuOpt.valueGE(1) }, { 'name': 'dispPlot', 'default': True, 'label': 'Display plot?', 'type': [types.BooleanType], 'description': 'If false, do not disply figure.', }, { 'name': 'saveAt', 'default': [x * 100 for x in range(1, 11)], 'label': 'Save figure at generation', 'type': [types.ListType, types.TupleType], 'description': '''At these generations, figures will be saved, instead of displayed.