'arg': 'r:', 'longarg': 'n_pop=', 'default': 6, 'useDefault': True, 'label': 'Sub-populations', 'allowedTypes': [types.IntType, types.LongType], 'description': '', 'validate': simuOpt.valueBetween(0, 7) }, { 'longarg': 'init_freq=', 'default': [0.2] * 3 + [0.8] * 3, 'label': 'Initial allele-freq for Sub-pop', 'allowedTypes': [types.ListType, types.TupleType], 'description': '', 'validate': simuOpt.valueListOf(simuOpt.valueBetween(0, 1)) }, { 'longarg': 'n_ind=', 'default': 100, 'label': 'Sub-pop Size', 'allowedTypes': [types.IntType, types.LongType], 'description': '', 'validate': simuOpt.valueGT(10) }, { 'longarg': 'n_gen=', 'default': 100, 'useDefault': True, 'label': 'Generations', 'allowedTypes': [types.IntType, types.LongType],
'type': [str], 'validator': simuOpt.valueOneOf(['microsatellite', 'SNP']), 'chooseOneOf': ['microsatellite', 'SNP'] }, { 'name': 'DSL', 'default': [45, 85, 125], 'label': 'DSL after marker (0-indexed)', 'description': '''A list of loci *after* a marker. For example, 35 means a disease locus after the 16th marker on chromosome 2, (if numChrom=numLoci=20). The number of DSL is important since it determines the complexity of the disease. A single number is allowed and implies a simple disease with one disease locus.''', 'type': [types.TupleType, types.ListType], 'validator': simuOpt.valueListOf(simuOpt.valueGT(0)) }, { 'name': 'DSLLoc', 'default': [.5, .5, .5], 'label': 'DSL location between markers', 'description': '''A list of loci location between two markers. Since all disease loci will be *between* equal spaced markers, the location should be between 0 and 1. A single value is acceptable as the location of all DSL.''', 'type': [types.TupleType, types.ListType], 'validator': simuOpt.valueListOf(simuOpt.valueBetween(0, 1)) }, # # {
'label': 'HapMap data directory', 'description': '''Directory to store HapMap data in simuPOP format. The HapMap data is expected to be downloaded and saved in simuPOP format using script loadHapMap_r22.py from the simuPOP online cookbook. The files have names such as HapMap_CEU_chr10.pop.''', 'allowedTypes': [StringType], 'validate': simuOpt.valueValidDir(), }, { 'name': 'HapMap_pops', 'default' : HapMap3_pops, 'label' : 'Name of populations', 'description': '''Which HapMap populations to use?''', 'allowedTypes': [ListType, TupleType], 'chooseFrom': HapMap3_pops, 'validate': simuOpt.valueListOf(HapMap2_pops + HapMap3_pops), }, { 'name': 'markerList', 'default': 'hh550v3_snptable.txt', 'label': 'Marker list file', 'description': '''A file with a list of marker names. If there are more than one fields at a line, the rest of them are ignored.''', 'allowedTypes': [StringType], 'validate': simuOpt.valueOr(simuOpt.valueEqual(''), simuOpt.valueValidFile()), }, { 'name': 'chroms', 'default': [2,5,10], 'label': 'Chromosomes to use', 'description': 'A list of chromosomes (1-22) to use.',
'label': 'Migration rate ', 'description': '''If there are more than one subpopulations, this parameter controlls the rate at which migration is allowed. A circular stepping stone migration model will be used. ''', 'allowedTypes': [types.IntType, types.FloatType], 'validate': simuOpt.valueBetween(0,1) }, {'separator': 'Disease information'}, {'longarg': 'DPL=', 'default': ["rs4491689"], 'useDefault': True, 'label': 'Names of disease predisposing loci', 'description': '''A list of names of disease predisposing loci. These loci must exist in the population.''', 'allowedTypes': [types.TupleType, types.ListType], 'validate': simuOpt.valueListOf(types.StringType) }, {'longarg': 'curAlleleFreq=', 'default': [0.05], 'useDefault': True, 'label': 'Final allele frequencies', 'allowedTypes': [types.ListType, types.TupleType], 'description': '''Current allele frequencies for each DPL. If a number is given, it is assumed to be the frequency for all DPL.''', 'validate': simuOpt.valueListOf( simuOpt.valueBetween(0,1)) }, {'longarg': 'trajectory=', 'default': 'forward', 'useDefault': True, 'label': 'Trajectory simulation method',
types Additive and Multiplicative by using alternative definitions of genotype relative risks and minimal detectable relative risk. | Dominant: r_AB=r_AA, Grr = r_AA / r_BB | Recessive: r_AB=r_BB, Grr = r_AA / r_BB | Multiplicative: r_AB=sqrt(r_AA * r_BB), Grr = r_AB / r_BB | Additive: r_AB=(r_AA + r_BB)/2, Grr = r_AB / r_BB | Additive_AA: r_AB=(r_AA + r_BB)/2, Grr = r_AA / r_BB, Minimal Detectable Relative Risk = (p*p*Grr+pq(Grr+1))/(p*p+2pq) | LogAdditive: r_AB=sqrt(r_AA * r_BB), Grr = r_AA / r_BB ''', }, { 'longarg': 'K=', 'default': 0.05, 'label': 'Disease prevalence', 'allowedTypes': [types.ListType, types.TupleType], 'validate': simuOpt.valueListOf(simuOpt.valueBetween(0., 1)), }, { 'longarg': 'p=', 'default': 0.15, 'label': 'Disease allele frequency', 'allowedTypes': [types.ListType, types.TupleType], 'validate': simuOpt.valueListOf(simuOpt.valueBetween(0., 1)), }, { 'separator': 'Marker locus information' }, { 'longarg': 'x=', 'default':
'allowedTypes': [types.IntType, types.FloatType], 'validate': simuOpt.valueBetween(0, 1) }, { 'separator': 'Disease information' }, { 'longarg': 'DPL=', 'default': [], 'useDefault': True, 'label': 'Names of disease predisposing loci', 'description': '''A list of names of disease predisposing loci. These loci must exist in the population.''', 'allowedTypes': [types.TupleType, types.ListType], 'validate': simuOpt.valueListOf(types.StringType) }, { 'longarg': 'curAlleleFreq=', 'default': [0.05], 'useDefault': True, 'label': 'Final allele frequencies', 'allowedTypes': [types.ListType, types.TupleType], 'description': '''Current allele frequencies for each DPL. If a number is given, it is assumed to be the frequency for all DPL.''', 'validate': simuOpt.valueListOf(simuOpt.valueBetween(0, 1)) }, { 'longarg': 'trajectory=',
'description': '''Initial allelic spectrum for the disease. It will be the same for all disease susceptibility loci of the disease. The first element should be the allele frequency of the wild type (allele 1) and the rest are frquencies of disease alleles. These frequencies should add up to one. You can also specify spectra for all DSL using a 2d list''', 'type': [types.ListType, types.TupleType], }, {'name': 'selModel', 'default': ['recessive'], 'label': 'Selection model(s)', 'description': '''Given selection coef, for recessive model, the fitness values are [1, 1, 1-s] for genotype AA,Aa,aa (A is the wild type). For additive model, the fitness values are [1,1-s/2,1-s]. You can also specify a list of models for each DSL.''' , 'type': [types.ListType, types.TupleType], 'validator': simuOpt.valueListOf( simuOpt.valueOneOf(['recessive','additive'])), }, {'name': 'selModelAllDSL', 'default': 'additive', 'label': 'Multi-locus selection model', 'description': '''Overall fitness values given fitness values for each DSL, fitness values are Prod(f_i) for multiplicative model and 1-Sum(1-f_i) for additive model. You can also choose customized. In this case, you will have to provide your own fitness table in selCoef. For example, for a 2-locus model, you need to provide [w11,w12,w13,w21,w22,w23,w31,w32,w33] where, for example, w21 is the fitness value for genotype AaBB.''', 'type': [str], 'chooseOneOf': [ 'additive', 'multiplicative', 'customized'] }, {'name': 'selCoef',
'validator': simuOpt.valueGT(0) }, {'name': 'G1', 'default': 1000, 'label': 'Length of expansion stage', 'type': 'integer', 'description': 'Number of geneartions of the sim.population expansion stage', 'validator': simuOpt.valueGT(0) }, {'name': 'spec', 'default': [0.9] + [0.02]*5, 'label': 'Initial allelic spectrum', 'type': 'numbers', 'description': '''Initial allelic spectrum, should be a list of allele frequencies, for allele 0, 1, 2, ... respectively.''', 'validator': simuOpt.valueListOf(simuOpt.valueBetween(0, 1)), }, {'name': 's', 'default': 0.01, 'label': 'Selection pressure', 'type': 'number', 'description': '''Selection coefficient for homozygtes (aa) genotype. A recessive selection model is used so the fitness values of genotypes AA, Aa and aa are 1, 1 and 1-s respectively.''', 'validator': simuOpt.valueGT(-1), }, {'name': 'mu', 'default': 1e-4, 'label': 'Mutation rate', 'type': 'number', 'description': 'Mutation rate of a k-allele mutation model',
'type': [types.ListType, types.TupleType], }, { 'name': 'selModel', 'default': ['recessive'], 'label': 'Selection model(s)', 'description': '''Given selection coef, for recessive model, the fitness values are [1, 1, 1-s] for genotype AA,Aa,aa (A is the wild type). For additive model, the fitness values are [1,1-s/2,1-s]. You can also specify a list of models for each DSL.''', 'type': [types.ListType, types.TupleType], 'validator': simuOpt.valueListOf(simuOpt.valueOneOf(['recessive', 'additive'])), }, { 'name': 'selModelAllDSL', 'default': 'additive', 'label': 'Multi-locus selection model', 'description': '''Overall fitness values given fitness values for each DSL, fitness values are Prod(f_i) for multiplicative model and 1-Sum(1-f_i) for additive model. You can also choose customized. In this case, you will have to provide your own fitness table in selCoef. For example, for a 2-locus model, you need to provide [w11,w12,w13,w21,w22,w23,w31,w32,w33] where, for example, w21 is the fitness value for genotype AaBB.''', 'type': [str], 'chooseOneOf': ['additive', 'multiplicative', 'customized']