bugged stringlengths 4 228k | fixed stringlengths 0 96.3M | __index_level_0__ int64 0 481k |
|---|---|---|
def __getattr__(self, key): return getattr(self.file, key) | def __getattr__(self, key): return getattr(self.file, key) | 32,200 |
def swig_version(): ''' get the version of swig ''' fout = os.popen('swig -version') # try: version = re.match('SWIG Version\s*(\d+).(\d+).(\d+).*', fout.readlines()[1]).groups() except: print 'Can not obtain swig version, please install swig' sys.exit(1) return map(int, version) | def swig_version(): ''' get the version of swig ''' fout = os.popen('swig -version') # try: version = re.match('SWIG Version\s*(\d+).(\d+).(\d+).*', fout.readlines()[1]).groups() except: print 'Can not obtain swig version, please install swig' sys.exit(1) return map(int, version) | 32,201 |
def swig_version(): ''' get the version of swig ''' fout = os.popen('swig -version') # try: version = re.match('SWIG Version\s*(\d+).(\d+).(\d+).*', fout.readlines()[1]).groups() except: print 'Can not obtain swig version, please install swig' sys.exit(1) return map(int, version) | def swig_version(): ''' get the version of swig ''' fout = os.popen('swig -version') # try: version = re.match('SWIG Version\s*(\d+).(\d+).(\d+).*', fout.readlines()[1]).groups() except: print 'Can not obtain swig version, please install swig' sys.exit(1) return map(int, version) | 32,202 |
def testNumOfMale(self): 'Tsting counting number of male' pop = population(subPop=[200, 800]) for i in range(100): pop.individual(i,0).setSex(Male) pop.individual(i,1).setSex(Male) for i in range(100,200): pop.individual(i,0).setSex(Female) for i in range(100,800): pop.individual(i,1).setSex(Female) Stat(pop, numOfMale... | def testNumOfMale(self): 'Testing counting number of male' pop = population(subPop=[200, 800]) for i in range(100): pop.individual(i,0).setSex(Male) pop.individual(i,1).setSex(Male) for i in range(100,200): pop.individual(i,0).setSex(Female) for i in range(100,800): pop.individual(i,1).setSex(Female) Stat(pop, numOfMal... | 32,203 |
def testNumOfAffected(self): 'Tsting counting number of affected individuals' pop = population(subPop=[200, 800]) for i in range(100): pop.individual(i,0).setAffected(True) pop.individual(i,1).setAffected(True) for i in range(100,200): pop.individual(i,0).setAffected(False) for i in range(100,800): pop.individual(i,1).... | def testNumOfAffected(self): 'Testing counting number of affected individuals' pop = population(subPop=[200, 800]) for i in range(100): pop.individual(i,0).setAffected(True) pop.individual(i,1).setAffected(True) for i in range(100,200): pop.individual(i,0).setAffected(False) for i in range(100,800): pop.individual(i,1)... | 32,204 |
def simuCDCV(numDSL, initSpec, selModel, selModelAllDSL, selCoef, mutaModel, maxAllele, mutaRate, initSize, finalSize, burnin, noMigrGen, mixingGen, growth, numSubPop, migrModel, migrRate, update, dispPlot, saveAt, savePop, resume, resumeAtGen, name, dryrun): ''' parameters are self-expanary. See help info for detailed... | def simuCDCV(numDSL, initSpec, selModel, selModelAllDSL, selCoef, mutaModel, maxAllele, mutaRate, initSize, finalSize, burnin, noMigrGen, mixingGen, growth, numSubPop, migrModel, migrRate, update, dispPlot, saveAt, savePop, resume, resumeAtGen, name, dryrun): ''' parameters are self-expanary. See help info for detailed... | 32,205 |
def drawSamples(pop, peneFunc, penePara, numSample, saveFormat, dataDir, reAnalyzeOnly ): ''' get samples of different type using a penetrance function, and save samples in dataDir in saveFormat pop: population peneFunc: penetrance function name, can be recessive1 etc penePara: parameter of the penetrance function num... | def drawSamples(pop, peneFunc, penePara, numSample, saveFormat, dataDir, reAnalyzeOnly ): ''' get samples of different type using a penetrance function, and save samples in dataDir in saveFormat pop: population peneFunc: penetrance function name, can be recessive1 etc penePara: parameter of the penetrance function num... | 32,206 |
def allJobs(): ''' list all jobs ''' names = [] for job in alljobs: names.append(job['name']) return names | def allJobs(): ''' list all jobs ''' names = [] for job in alljobs: names.append(job['name']) return names | 32,207 |
def allJobs(): ''' list all jobs ''' names = [] for job in alljobs: names.append(job['name']) return names | def allJobs(): ''' list all jobs ''' names = [] for job in alljobs: names.append(job['name']) return names | 32,208 |
def allJobs(): ''' list all jobs ''' names = [] for job in alljobs: names.append(job['name']) return names | def allJobs(): ''' list all jobs ''' names = [] for job in alljobs: names.append(job['name']) return names | 32,209 |
def allJobs(): ''' list all jobs ''' names = [] for job in alljobs: names.append(job['name']) return names | def allJobs(): ''' list all jobs ''' names = [] for job in alljobs: names.append(job['name']) return names | 32,210 |
def allJobs(): ''' list all jobs ''' names = [] for job in alljobs: names.append(job['name']) return names | def allJobs(): ''' list all jobs ''' names = [] for job in alljobs: names.append(job['name']) return names | 32,211 |
def allJobs(): ''' list all jobs ''' names = [] for job in alljobs: names.append(job['name']) return names | def allJobs(): ''' list all jobs ''' names = [] for job in alljobs: names.append(job['name']) return names | 32,212 |
def allJobs(): ''' list all jobs ''' names = [] for job in alljobs: names.append(job['name']) return names | def allJobs(): ''' list all jobs ''' names = [] for job in alljobs: names.append(job['name']) return names | 32,213 |
def allJobs(): ''' list all jobs ''' names = [] for job in alljobs: names.append(job['name']) return names | def allJobs(): ''' list all jobs ''' names = [] for job in alljobs: names.append(job['name']) return names | 32,214 |
def allJobs(): ''' list all jobs ''' names = [] for job in alljobs: names.append(job['name']) return names | def allJobs(): ''' list all jobs ''' names = [] for job in alljobs: names.append(job['name']) return names | 32,215 |
def TDT(DSL, dataDir, data, epsFile, jpgFile): ''' use TDT method to analyze the results. Has to have rpy installed ''' if not hasRPy: return (0,[]) # write a batch file and call gh allPvalue = [] print "Applying TDT method to affected sibpairs " for ch in range(numChrom): inputfile = dataDir+data+ "_%d" % ch if not os... | def TDT(DSL, cutoff, dataDir, data, epsFile, jpgFile): ''' use TDT method to analyze the results. Has to have rpy installed ''' if not hasRPy: return (0,[]) # write a batch file and call gh allPvalue = [] print "Applying TDT method to affected sibpairs " for ch in range(numChrom): inputfile = dataDir+data+ "_%d" % ch i... | 32,216 |
def TDT(DSL, dataDir, data, epsFile, jpgFile): ''' use TDT method to analyze the results. Has to have rpy installed ''' if not hasRPy: return (0,[]) # write a batch file and call gh allPvalue = [] print "Applying TDT method to affected sibpairs " for ch in range(numChrom): inputfile = dataDir+data+ "_%d" % ch if not os... | def TDT(DSL, dataDir, data, epsFile, jpgFile): ''' use TDT method to analyze the results. Has to have rpy installed ''' if not hasRPy: return (0,[]) # write a batch file and call gh allPvalue = [] print "Applying TDT method to affected sibpairs " for ch in range(numChrom): inputfile = dataDir+data+ "_%d" % ch if not os... | 32,217 |
def TDT(DSL, dataDir, data, epsFile, jpgFile): ''' use TDT method to analyze the results. Has to have rpy installed ''' if not hasRPy: return (0,[]) # write a batch file and call gh allPvalue = [] print "Applying TDT method to affected sibpairs " for ch in range(numChrom): inputfile = dataDir+data+ "_%d" % ch if not os... | def TDT(DSL, dataDir, data, epsFile, jpgFile): ''' use TDT method to analyze the results. Has to have rpy installed ''' if not hasRPy: return (0,[]) # write a batch file and call gh allPvalue = [] print "Applying TDT method to affected sibpairs " for ch in range(numChrom): inputfile = dataDir+data+ "_%d" % ch if not os... | 32,218 |
def Linkage(DSL, dataDir, data, epsFile, jpgFile): ''' use Linkage method to analyze the results. Has to have rpy installed ''' if not hasRPy: return (0,[]) # write a batch file and call gh allPvalue = [] print "Applying Linkage (LOD) method to affected sibpairs " for ch in range(numChrom): inputfile = dataDir+data+ "_... | def Linkage(DSL, cutoff, dataDir, data, epsFile, jpgFile): ''' use Linkage method to analyze the results. Has to have rpy installed ''' if not hasRPy: return (0,[]) # write a batch file and call gh allPvalue = [] print "Applying Linkage (LOD) method to affected sibpairs " for ch in range(numChrom): inputfile = dataDir+... | 32,219 |
def Linkage(DSL, dataDir, data, epsFile, jpgFile): ''' use Linkage method to analyze the results. Has to have rpy installed ''' if not hasRPy: return (0,[]) # write a batch file and call gh allPvalue = [] print "Applying Linkage (LOD) method to affected sibpairs " for ch in range(numChrom): inputfile = dataDir+data+ "_... | def Linkage(DSL, dataDir, data, epsFile, jpgFile): ''' use Linkage method to analyze the results. Has to have rpy installed ''' if not hasRPy: return (0,[]) # write a batch file and call gh allPvalue = [] print "Applying Linkage (LOD) method to affected sibpairs " for ch in range(numChrom): inputfile = dataDir+data+ "_... | 32,220 |
def Linkage(DSL, dataDir, data, epsFile, jpgFile): ''' use Linkage method to analyze the results. Has to have rpy installed ''' if not hasRPy: return (0,[]) # write a batch file and call gh allPvalue = [] print "Applying Linkage (LOD) method to affected sibpairs " for ch in range(numChrom): inputfile = dataDir+data+ "_... | def Linkage(DSL, dataDir, data, epsFile, jpgFile): ''' use Linkage method to analyze the results. Has to have rpy installed ''' if not hasRPy: return (0,[]) # write a batch file and call gh allPvalue = [] print "Applying Linkage (LOD) method to affected sibpairs " for ch in range(numChrom): inputfile = dataDir+data+ "_... | 32,221 |
def processOnePopulation(dataDir, numChrom, numLoci, markerType, DSLafter, DSLdist, initSize, meanInitAllele, burnin, introGen, minAlleleFreq, maxAlleleFreq, fitness, mlSelModel, numSubPop, finalSize, noMigrGen, mixingGen, popSizeFunc, migrModel, mu, mi, rec, peneFunc, penePara, N, numSample, dryrun, popIdx): ''' this... | def processOnePopulation(dataDir, numChrom, numLoci, markerType, DSLafter, DSLdist, initSize, meanInitAllele, burnin, introGen, minAlleleFreq, maxAlleleFreq, fitness, mlSelModel, numSubPop, finalSize, noMigrGen, mixingGen, popSizeFunc, migrModel, mu, mi, rec, peneFunc, penePara, N, numSample, dryrun, popIdx): ''' this... | 32,222 |
def processOnePopulation(dataDir, numChrom, numLoci, markerType, DSLafter, DSLdist, initSize, meanInitAllele, burnin, introGen, minAlleleFreq, maxAlleleFreq, fitness, mlSelModel, numSubPop, finalSize, noMigrGen, mixingGen, popSizeFunc, migrModel, mu, mi, rec, peneFunc, penePara, N, numSample, dryrun, popIdx): ''' this... | def processOnePopulation(dataDir, numChrom, numLoci, markerType, DSLafter, DSLdist, initSize, meanInitAllele, burnin, introGen, minAlleleFreq, maxAlleleFreq, fitness, mlSelModel, numSubPop, finalSize, noMigrGen, mixingGen, popSizeFunc, migrModel, mu, mi, rec, peneFunc, penePara, N, numSample, dryrun, popIdx): ''' this... | 32,223 |
def writeReport(content, allParam, results): ''' write a HTML file. The parts for each population has been written but we need a summary table. ''' print "Writing a report (saved in summary.htm )" try: summary = open(outputDir + "/summary.htm", 'w') except: raise exceptions.IOError("Can not open a summary file : " + ou... | def writeReport(content, allParam, results): ''' write a HTML file. The parts for each population has been written but we need a summary table. ''' print "Writing a report (saved in summary.htm )" try: summary = open(outputDir + "/summary.htm", 'w') except: raise exceptions.IOError("Can not open a summary file : " + ou... | 32,224 |
def writeReport(content, allParam, results): ''' write a HTML file. The parts for each population has been written but we need a summary table. ''' print "Writing a report (saved in summary.htm )" try: summary = open(outputDir + "/summary.htm", 'w') except: raise exceptions.IOError("Can not open a summary file : " + ou... | def writeReport(content, allParam, results): ''' write a HTML file. The parts for each population has been written but we need a summary table. ''' print "Writing a report (saved in summary.htm )" try: summary = open(outputDir + "/summary.htm", 'w') except: raise exceptions.IOError("Can not open a summary file : " + ou... | 32,225 |
def writeReport(content, allParam, results): ''' write a HTML file. The parts for each population has been written but we need a summary table. ''' print "Writing a report (saved in summary.htm )" try: summary = open(outputDir + "/summary.htm", 'w') except: raise exceptions.IOError("Can not open a summary file : " + ou... | def writeReport(content, allParam, results): ''' write a HTML file. The parts for each population has been written but we need a summary table. ''' print "Writing a report (saved in summary.htm )" try: summary = open(outputDir + "/summary.htm", 'w') except: raise exceptions.IOError("Can not open a summary file : " + ou... | 32,226 |
def writeReport(content, allParam, results): ''' write a HTML file. The parts for each population has been written but we need a summary table. ''' print "Writing a report (saved in summary.htm )" try: summary = open(outputDir + "/summary.htm", 'w') except: raise exceptions.IOError("Can not open a summary file : " + ou... | def writeReport(content, allParam, results): ''' write a HTML file. The parts for each population has been written but we need a summary table. ''' print "Writing a report (saved in summary.htm )" try: summary = open(outputDir + "/summary.htm", 'w') except: raise exceptions.IOError("Can not open a summary file : " + ou... | 32,227 |
def writeReport(content, allParam, results): ''' write a HTML file. The parts for each population has been written but we need a summary table. ''' print "Writing a report (saved in summary.htm )" try: summary = open(outputDir + "/summary.htm", 'w') except: raise exceptions.IOError("Can not open a summary file : " + ou... | def writeReport(content, allParam, results): ''' write a HTML file. The parts for each population has been written but we need a summary table. ''' print "Writing a report (saved in summary.htm )" try: summary = open(outputDir + "/summary.htm", 'w') except: raise exceptions.IOError("Can not open a summary file : " + ou... | 32,228 |
def FreqTrajectoryMultiStochWithSubPop( curGen, numLoci, freq, NtFunc, fitness, minMutAge, maxMutAge, mode = 'uneven', ploidy=2, restartIfFail=True): ''' Simulate frequency trajectory with subpopulation structure, migration is currently ignored. The essential part of this script is to simulate the trajectory of each su... | def FreqTrajectoryMultiStochWithSubPop( curGen, numLoci, freq, NtFunc, fitness, minMutAge, maxMutAge, mode = 'uneven', ploidy=2, restartIfFail=True): ''' Simulate frequency trajectory with subpopulation structure, migration is currently ignored. The essential part of this script is to simulate the trajectory of each su... | 32,229 |
def FreqTrajectoryMultiStochWithSubPop( curGen, numLoci, freq, NtFunc, fitness, minMutAge, maxMutAge, mode = 'uneven', ploidy=2, restartIfFail=True): ''' Simulate frequency trajectory with subpopulation structure, migration is currently ignored. The essential part of this script is to simulate the trajectory of each su... | def FreqTrajectoryMultiStochWithSubPop( curGen, numLoci, freq, NtFunc, fitness, minMutAge, maxMutAge, mode = 'uneven', ploidy=2, restartIfFail=True): ''' Simulate frequency trajectory with subpopulation structure, migration is currently ignored. The essential part of this script is to simulate the trajectory of each su... | 32,230 |
def FreqTrajectoryMultiStochWithSubPop( curGen, numLoci, freq, NtFunc, fitness, minMutAge, maxMutAge, mode = 'uneven', ploidy=2, restartIfFail=True): ''' Simulate frequency trajectory with subpopulation structure, migration is currently ignored. The essential part of this script is to simulate the trajectory of each su... | def FreqTrajectoryMultiStochWithSubPop( curGen, numLoci, freq, NtFunc, fitness, minMutAge, maxMutAge, mode = 'uneven', ploidy=2, restartIfFail=True): ''' Simulate frequency trajectory with subpopulation structure, migration is currently ignored. The essential part of this script is to simulate the trajectory of each su... | 32,231 |
def FreqTrajectoryMultiStochWithSubPop( curGen, numLoci, freq, NtFunc, fitness, minMutAge, maxMutAge, mode = 'uneven', ploidy=2, restartIfFail=True): ''' Simulate frequency trajectory with subpopulation structure, migration is currently ignored. The essential part of this script is to simulate the trajectory of each su... | def FreqTrajectoryMultiStochWithSubPop( curGen, numLoci, freq, NtFunc, fitness, minMutAge, maxMutAge, mode = 'uneven', ploidy=2, restartIfFail=True): ''' Simulate frequency trajectory with subpopulation structure, migration is currently ignored. The essential part of this script is to simulate the trajectory of each su... | 32,232 |
def simuComplexDisease(numChrom, numLoci, markerType, DSLafter, DSLdistTmp, introFree, selFreeIntensity, initSize, endingSize, growthModel, burninGen, splitGen, mixingGen, endingGen, numSubPop, migrModel, migrRate, alleleDistInSubPop, curAlleleFreqTmp, minMutAge, maxMutAge, fitnessTmp, mlSelModelTmp, mutaRate, recRate,... | def simuComplexDisease(numChrom, numLoci, markerType, DSLafter, DSLdistTmp, initSize, endingSize, growthModel, burninGen, splitGen, mixingGen, endingGen, numSubPop, migrModel, migrRate, alleleDistInSubPop, curAlleleFreqTmp, minMutAge, maxMutAge, fitnessTmp, mlSelModelTmp, mutaRate, recRate, savedGen, numOffspring, numO... | 32,233 |
def saveAncestors(gen): if gen >= endingGen - savedGen: return savedGen else: return 1 | def saveAncestors(gen): if gen >= endingGen - savedGen: return savedGen else: return 1 | 32,234 |
def saveAncestors(gen): if gen >= endingGen - savedGen: return savedGen else: return 1 | def saveAncestors(gen): if gen >= endingGen - savedGen: return savedGen else: return 1 | 32,235 |
def readConfigFile(): ''' read variables from configuration file ''' config = os.path.join(os.environ['HOME'], '.simuCluster') tmp = {} res = {} if os.path.isfile(config): execfile(config, tmp, res) return res | def readConfigFile(): ''' read variables from configuration file ''' config = os.path.join(os.environ['HOME'], '.simuCluster') tmp = {} res = {} if os.path.isfile(config): execfile(config, tmp, res) return res | 32,236 |
def testRecRate(self): ' see if we actually recombine at this rate ' pop = population(10000, loci=[2,3,2]) InitByValue(pop, value=[1]*7+[2]*7) simu = simulator(pop, randomMating()) simu.step( [ stat( haploFreq = [[0,1], [2,3], [3,4], [4,5], [5,6]]), recombinator(rate = 0.1) ] ) # the supposed proportions are 1-1: 0.5-r... | def testRecRate(self): ' see if we actually recombine at this rate ' pop = population(10000, loci=[2,3,2]) InitByValue(pop, value=[1]*7+[2]*7) simu = simulator(pop, randomMating()) simu.step( [ stat( haploFreq = [[0,1], [2,3], [3,4], [4,5], [5,6]]), recombinator(rate = 0.1) ] ) # the supposed proportions are 1-1: 0.5-r... | 32,237 |
def testCrossBetweenChrom(self): ' see if chromsomes are crossed by default' pop = population(10000, loci=[2,3,2]) InitByValue(pop, value=[1]*7+[2]*7) simu = simulator(pop, randomMating()) #TurnOnDebug(DBG_RECOMBINATOR) simu.step( [ stat( haploFreq = [[0,1], [2,3], [2,4], [5,6], [0,2], [0,6], [3,6]], stage=PrePostMatin... | deftestCrossBetweenChrom(self):'seeifchromsomesarecrossedbydefault'pop=population(10000,loci=[2,3,2])InitByValue(pop,value=[1]*7+[2]*7)simu=simulator(pop,randomMating())#TurnOnDebug(DBG_RECOMBINATOR)simu.step([stat(haploFreq=[[0,1],[2,3],[2,4],[5,6],[0,2],[0,6],[3,6]],stage=PrePostMating),##fordebugpurpose,outputhaploF... | 32,238 |
def testRecombine(self): ' verify table 4 of H&C 3nd edition P49 ' N = 10000 r = 0.1 genoDad = [[1,1],[1,1],[1,1],[1,1],[1,2],[1,2],[1,2],[2,1],[2,1],[2,2]] genoMom = [[1,1],[1,2],[2,1],[2,2],[1,2],[2,1],[2,2],[2,1],[2,2],[2,2]] prop = [ [1, 0, 0, 0], [.5, .5, 0, 0], [.5, 0, 0.5, 0], [0.5-r/2, r/2, r/2, 0.5-r/2], [0, ... | def testRecProportion(self): ' verify table 4 of H&C 3nd edition P49 ' N = 10000 r = 0.1 genoDad = [[1,1],[1,1],[1,1],[1,1],[1,2],[1,2],[1,2],[2,1],[2,1],[2,2]] genoMom = [[1,1],[1,2],[2,1],[2,2],[1,2],[2,1],[2,2],[2,1],[2,2],[2,2]] prop = [ [1, 0, 0, 0], [.5, .5, 0, 0], [.5, 0, 0.5, 0], [0.5-r/2, r/2, r/2, 0.5-r/2], ... | 32,239 |
def testNoMaleRec(self): ' male chromosome is not supposed to recombine ' # create such an situation | def testNoMaleRec(self): ' male chromosome is not supposed to recombine ' # create such an situation | 32,240 |
def simuCDCV( numDSL, initSpec, selModel, selModelAllDSL, selCoef, mutaModel, maxAllele, mutaRate, initSize, finalSize, burnin, noMigrGen, mixingGen, growth, numSubPop, migrModel, migrRate, update, dispPlot, saveAt, savePop, resume, resumeAtGen, name, dryrun): ''' parameters are self-expanary. See help info for detaile... | def simuCDCV( numDSL, initSpec, selModel, selModelAllDSL, selCoef, mutaModel, maxAllele, mutaRate, initSize, finalSize, burnin, noMigrGen, mixingGen, growth, numSubPop, migrModel, migrRate, update, dispPlot, saveAt, savePop, resume, resumeAtGen, name, dryrun): ''' parameters are self-expanary. See help info for detaile... | 32,241 |
def simuCDCV( numDSL, initSpec, selModel, selModelAllDSL, selCoef, mutaModel, maxAllele, mutaRate, initSize, finalSize, burnin, noMigrGen, mixingGen, growth, numSubPop, migrModel, migrRate, update, dispPlot, saveAt, savePop, resume, resumeAtGen, name, dryrun): ''' parameters are self-expanary. See help info for detaile... | def simuCDCV( numDSL, initSpec, selModel, selModelAllDSL, selCoef, mutaModel, maxAllele, mutaRate, initSize, finalSize, burnin, noMigrGen, mixingGen, growth, numSubPop, migrModel, migrRate, update, dispPlot, saveAt, savePop, resume, resumeAtGen, name, dryrun): ''' parameters are self-expanary. See help info for detaile... | 32,242 |
def simuCDCV( numDSL, initSpec, selModel, selModelAllDSL, selCoef, mutaModel, maxAllele, mutaRate, initSize, finalSize, burnin, noMigrGen, mixingGen, growth, numSubPop, migrModel, migrRate, update, dispPlot, saveAt, savePop, resume, resumeAtGen, name, dryrun): ''' parameters are self-expanary. See help info for detaile... | def simuCDCV( numDSL, initSpec, selModel, selModelAllDSL, selCoef, mutaModel, maxAllele, mutaRate, initSize, finalSize, burnin, noMigrGen, mixingGen, growth, numSubPop, migrModel, migrRate, update, dispPlot, saveAt, savePop, resume, resumeAtGen, name, dryrun): ''' parameters are self-expanary. See help info for detaile... | 32,243 |
def simuCDCV( numDSL, initSpec, selModel, selModelAllDSL, selCoef, mutaModel, maxAllele, mutaRate, initSize, finalSize, burnin, noMigrGen, mixingGen, growth, numSubPop, migrModel, migrRate, update, dispPlot, saveAt, savePop, resume, resumeAtGen, name, dryrun): ''' parameters are self-expanary. See help info for detaile... | def simuCDCV( numDSL, initSpec, selModel, selModelAllDSL, selCoef, mutaModel, maxAllele, mutaRate, initSize, finalSize, burnin, noMigrGen, mixingGen, growth, numSubPop, migrModel, migrRate, update, dispPlot, saveAt, savePop, resume, resumeAtGen, name, dryrun): ''' parameters are self-expanary. See help info for detaile... | 32,244 |
def allJobs(): ''' list all jobs ''' names = [] for job in alljobs: names.append(job['name']) return names | def allJobs(): ''' list all jobs ''' names = [] for job in alljobs: names.append(job['name']) return names | 32,245 |
def testBinormialSelection(self): 'Testing binomialSelection mating scheme (FIXME: imcomplete)' simu = simulator(population(10, loci=[1], ploidy=1), binomialSelection()) | def testBinomialSelection(self): 'Testing binomialSelection mating scheme (FIXME: imcomplete)' simu = simulator(population(10, loci=[1], ploidy=1), binomialSelection()) | 32,246 |
def getFamSize(self, mate, endGen=0, size=1000 ): TurnOnDebug(DBG_MATING) simu = simulator(population(size, loci=[1]), mate) simu.evolve(ops=[], end=endGen) return simu.population(0).dvars().famSizes | def getFamSize(self, mate, endGen=0, size=1000): TurnOnDebug(DBG_MATING) simu = simulator(population(size, loci=[1]), mate) simu.evolve(ops=[], end=endGen) return simu.population(0).dvars().famSizes | 32,247 |
def testNumOffspring(self): 'Testing means to control number of offspring (FIXME: check distribution)' self.assertEqual( self.getFamSize( binomialSelection(numOffspring=2) ), [2]*500) # numOffspringFunc def nos(gen): return gen%2+1 self.assertEqual( self.getFamSize( binomialSelection(numOffspringFunc=nos), endGen=1), [... | def testNumOffspring(self): 'Testing means to control number of offspring (FIXME: check distribution)' self.assertEqual( self.getFamSize(binomialSelection(numOffspring=2)), [2]*500) # numOffspringFunc def nos(gen): return gen%2+1 self.assertEqual( self.getFamSize( binomialSelection(numOffspringFunc=nos), endGen=1), [2]... | 32,248 |
def nos(gen): return gen%2+1 | def nos(gen): return gen%2+1 | 32,249 |
def nos(gen): return gen%2+1 | def nos(gen): return gen%2+1 | 32,250 |
def nos(gen): return random.randrange(1,4) | def nos(gen): return random.randrange(1,4) | 32,251 |
def rmatrix(mat): ''' VERY IMPORTANT convert a Python 2d list to r matrix format that can be passed to functions like image directly. ''' return with_mode(NO_CONVERSION, r.do_call)('rbind', mat) | def rmatrix(mat): ''' VERY IMPORTANT convert a Python 2d list to r matrix format that can be passed to functions like image directly. ''' return r.do_call('rbind', mat) | 32,252 |
def __init__(self, nplot, update, title, xlab, ylab, axes, lty, col, mfrow, plotType, saveAs, leaveOpen, dev='', width=0, height=0): """ initialization function of base properties (layout etc) of all plotters """ # save parameters self.nplot = nplot self.axes = axes if lty==[]: self.lty = range(1, nplot+1) else: self.l... | def __init__(self, nplot, update, title, xlab, ylab, axes, lty, col, mfrow, plotType, saveAs, leaveOpen, dev='', width=0, height=0): """ initialization function of base properties (layout etc) of all plotters """ # save parameters self.nplot = nplot self.axes = axes if lty==[]: self.lty = range(1, nplot+1) else: self.l... | 32,253 |
def layout(self): # calculate layout if self.mfrow != [1,1] and self.mfrow[0]*self.mfrow[1] < self.nplot: raise ValueError("mfrow is not enough to hold " + str(self.nplot) + " figures") | def layout(self): # calculate layout if self.mfrow != [1,1] and self.mfrow[0]*self.mfrow[1] < self.nplot: raise ValueError("mfrow is not enough to hold " + str(self.nplot) + " figures") | 32,254 |
def layout(self): # calculate layout if self.mfrow != [1,1] and self.mfrow[0]*self.mfrow[1] < self.nplot: raise ValueError("mfrow is not enough to hold " + str(self.nplot) + " figures") | def layout(self): # calculate layout if self.mfrow != [1,1] and self.mfrow[0]*self.mfrow[1] < self.nplot: raise ValueError("mfrow is not enough to hold " + str(self.nplot) + " figures") | 32,255 |
def layout(self): # calculate layout if self.mfrow != [1,1] and self.mfrow[0]*self.mfrow[1] < self.nplot: raise ValueError("mfrow is not enough to hold " + str(self.nplot) + " figures") | def layout(self): # calculate layout if self.mfrow != [1,1] and self.mfrow[0]*self.mfrow[1] < self.nplot: raise ValueError("mfrow is not enough to hold " + str(self.nplot) + " figures") | 32,256 |
def colorBar(self, level, lim): " draw a color bar to the right of the plot" mar = [0]*4 mar[0] = [5, 1, 4, 2] self.color = r.rainbow(level, start=.7, end=.1) r.par(mar=mar) levels = r.seq(lim[0], lim[1], length=level) r.plot_new() r.plot_window(xlim = [0, 1], ylim = lim, xaxs = "i", yaxs = "i") r.rect(0, levels[:(len... | def colorBar(self, level, lim): " draw a color bar to the right of the plot" mar = [0]*4 mar[0] = [5, 1, 4, 2] self.color = r.rainbow(level, start=.7, end=.1) r.par(mar=mar) levels = with_mode(BASIC_CONVERSION, r.seq)(lim[0], lim[1], length=level) r.plot_new() r.plot_window(xlim = [0, 1], ylim = lim, xaxs = "i", yaxs ... | 32,257 |
def plot(self, pop, expr): gen = pop.gen() rep = pop.rep() data = pop.evaluate(expr) # if type(data) == type(0) or type(data) == type(0.): data = [data] if rep >= self.numRep: raise ValueError("Replicate out of range. (forget to set numRep?)") # plot data if rep==-1 or rep == 0: # inc ... if not self.CanUpdate(True):... | def plot(self, pop, expr): gen = pop.gen() rep = pop.rep() data = pop.evaluate(expr) # if type(data) == type(0) or type(data) == type(0.): data = [data] if rep >= self.numRep: raise ValueError("Replicate out of range. (forget to set numRep?)") # plot data if rep==-1 or rep == 0: # inc ... if not self.CanUpdate(True):... | 32,258 |
def plot(self, pop, expr): gen = pop.gen() rep = pop.rep() data = pop.evaluate(expr) _data = data # now start! if type(_data) == type(0) or type(_data) == type(0.): _data = [_data] | def plot(self, pop, expr): gen = pop.gen() rep = pop.rep() data = pop.evaluate(expr) _data = data # now start! if type(_data) == type(0) or type(_data) == type(0.): _data = [_data] | 32,259 |
def plot(self, pop, expr): gen = pop.gen() rep = pop.rep() data = pop.evaluate(expr) _data = data # now start! if type(_data) == type(0) or type(_data) == type(0.): _data = [_data] | def plot(self, pop, expr): gen = pop.gen() rep = pop.rep() data = pop.evaluate(expr) _data = data # now start! if type(_data) == type(0) or type(_data) == type(0.): _data = [_data] | 32,260 |
def plot(self, pop, expr): gen = pop.gen() rep = pop.rep() data = pop.evaluate(expr) _data = data # now start! if type(_data) == type(0) or type(_data) == type(0.): _data = [_data] | def plot(self, pop, expr): gen = pop.gen() rep = pop.rep() data = pop.evaluate(expr) _data = data # now start! if type(_data) == type(0) or type(_data) == type(0.): _data = [_data] | 32,261 |
def getScript(name): ''' return the script for simulation 'name' ''' if not globals().has_key('script'): print 'Vairable script is not defined' sys.exit(0) # for job in alljobs: # a dictionary if job['name'] == name: s = script print alljobs, job for k,v in job.items(): # subsitute in script if '"' in 'v': s = re.sub(r... | def getScript(name, options): ''' return the script for simulation 'name' ''' if not globals().has_key('script'): print 'Vairable script is not defined' sys.exit(0) # for job in alljobs: # a dictionary if job['name'] == name: s = script print alljobs, job for k,v in job.items(): # subsitute in script if '"' in 'v': s =... | 32,262 |
def getScript(name): ''' return the script for simulation 'name' ''' if not globals().has_key('script'): print 'Vairable script is not defined' sys.exit(0) # for job in alljobs: # a dictionary if job['name'] == name: s = script print alljobs, job for k,v in job.items(): # subsitute in script if '"' in 'v': s = re.sub(r... | def getScript(name): ''' return the script for simulation 'name' ''' if not globals().has_key('script'): print 'Vairable script is not defined' sys.exit(0) # for job in alljobs: # a dictionary if job['name'] == name: s = script for k,v in (job.items() + options.items()): # subsitute in script if '"' in 'v': s = re.sub(... | 32,263 |
def getScript(name): ''' return the script for simulation 'name' ''' if not globals().has_key('script'): print 'Vairable script is not defined' sys.exit(0) # for job in alljobs: # a dictionary if job['name'] == name: s = script print alljobs, job for k,v in job.items(): # subsitute in script if '"' in 'v': s = re.sub(r... | def getScript(name): ''' return the script for simulation 'name' ''' if not globals().has_key('script'): print 'Vairable script is not defined' sys.exit(0) # for job in alljobs: # a dictionary if job['name'] == name: s = script print alljobs, job for k,v in job.items(): # subsitute in script if True in [x in str(v) for... | 32,264 |
def getScript(name): ''' return the script for simulation 'name' ''' if not globals().has_key('script'): print 'Vairable script is not defined' sys.exit(0) # for job in alljobs: # a dictionary if job['name'] == name: s = script print alljobs, job for k,v in job.items(): # subsitute in script if '"' in 'v': s = re.sub(r... | def getScript(name): ''' return the script for simulation 'name' ''' if not globals().has_key('script'): print 'Vairable script is not defined' sys.exit(0) # for job in alljobs: # a dictionary if job['name'] == name: s = script print alljobs, job for k,v in job.items(): # subsitute in script if '"' in 'v': s = re.sub(r... | 32,265 |
def allJobs(): ''' list all jobs ''' names = [] for job in alljobs: names.append(job['name']) return names | def allJobs(): ''' list all jobs ''' names = [] for job in alljobs: names.append(job['name']) return names | 32,266 |
def allJobs(): ''' list all jobs ''' names = [] for job in alljobs: names.append(job['name']) return names | def allJobs(): ''' list all jobs ''' names = [] for job in alljobs: names.append(job['name']) return names | 32,267 |
def allJobs(): ''' list all jobs ''' names = [] for job in alljobs: names.append(job['name']) return names | def allJobs(): ''' list all jobs ''' names = [] for job in alljobs: names.append(job['name']) return names | 32,268 |
def allJobs(): ''' list all jobs ''' names = [] for job in alljobs: names.append(job['name']) return names | def allJobs(): ''' list all jobs ''' names = [] for job in alljobs: names.append(job['name']) return names | 32,269 |
def allJobs(): ''' list all jobs ''' names = [] for job in alljobs: names.append(job['name']) return names | def allJobs(): ''' list all jobs ''' names = [] for job in alljobs: names.append(job['name']) return names | 32,270 |
def buildStaticLibrary(sourceFiles, libName, libDir, compiler): '''Build libraries to be linked to simuPOP modules''' # get a c compiler print 'Creating library', libName comp = new_compiler(compiler=compiler, verbose=True) objFiles = comp.compile(sourceFiles, include_dirs=['.']) comp.create_static_lib(objFiles, libNam... | def buildStaticLibrary(sourceFiles, libName, libDir, compiler): '''Build libraries to be linked to simuPOP modules''' # get a c compiler print 'Creating library', libName comp = new_compiler(compiler=compiler, verbose=True) objFiles = comp.compile(sourceFiles, include_dirs=['.']) comp.create_static_lib(objFiles, libNam... | 32,271 |
def testRearrange(self): 'Test if info and genotype are migrated with individuals' if alleleType() == 'binary': return #TurnOnDebug(DBG_POPULATION) pop = population(subPop=[4, 6], loci=[1], infoFields=['a','b']) pop.arrGenotype(True)[:] = range(20) pop.arrIndInfo(True)[:] = range(20) self.assertEqual([x.allele(0,0) for... | def testRearrange(self): 'Test if info and genotype are migrated with individuals' if alleleType() == 'binary': return #TurnOnDebug(DBG_POPULATION) pop = population(subPop=[4, 6], loci=[1], infoFields=['a','b']) pop.arrGenotype(True)[:] = range(20) pop.arrIndInfo(True)[:] = range(20) self.assertEqual([x.allele(0,0) for... | 32,272 |
def testClone(self): 'Testing cloning of simulator' pop = population(subPop=[10,4], loci=[2,5]) simu = simulator(pop, randomMating(), rep = 3) simu.evolve( preOps = [initByFreq([0.3, .7])], ops = [stat(alleleFreq=range(pop.totNumLoci()))], end = 10 ) simu1 = simu.clone() for i in range(3): self.assertEqual(simu.populat... | def testClone(self): 'Testing cloning of simulator' pop = population(subPop=[10,4], loci=[2,5]) simu = simulator(pop, randomMating(), rep = 3) simu.evolve( preOps = [initByFreq([0.3, .7])], ops = [stat(alleleFreq=range(pop.totNumLoci()))], end = 10 ) simu1 = simu.clone() for i in range(3): self.assertEqual(simu.populat... | 32,273 |
def addCarrayEntry(file): ' add a line at the wrap file for carray type definition' shutil.copy(file, file+'tmp') ofile = open(file, 'w') ifile = open(file+'tmp', 'r') for line in ifile.readlines(): if line.find('static PyMethodDef SwigMethods[] = ') != -1: ofile.write('''static PyMethodDef SwigMethods[] = { /* add car... | def addCarrayEntry(file): ' add a line at the wrap file for carray type definition' shutil.copy(file, file+'tmp') ofile = open(file, 'w') ifile = open(file+'tmp', 'r') for line in ifile.readlines(): if line.find('static PyMethodDef SwigMethods[] = ') != -1: ofile.write('''static PyMethodDef SwigMethods[] = { /* add car... | 32,274 |
def addCarrayEntry(file): ' add a line at the wrap file for carray type definition' shutil.copy(file, file+'tmp') ofile = open(file, 'w') ifile = open(file+'tmp', 'r') for line in ifile.readlines(): if line.find('static PyMethodDef SwigMethods[] = ') != -1: ofile.write('''static PyMethodDef SwigMethods[] = { /* add car... | def addCarrayEntry(file): ' add a line at the wrap file for carray type definition' shutil.copy(file, file+'tmp') ofile = open(file, 'w') ifile = open(file+'tmp', 'r') for line in ifile.readlines(): if line.find('static PyMethodDef SwigMethods[] = ') != -1: ofile.write('''static PyMethodDef SwigMethods[] = { /* add car... | 32,275 |
def addCarrayEntry(file): ' add a line at the wrap file for carray type definition' shutil.copy(file, file+'tmp') ofile = open(file, 'w') ifile = open(file+'tmp', 'r') for line in ifile.readlines(): if line.find('static PyMethodDef SwigMethods[] = ') != -1: ofile.write('''static PyMethodDef SwigMethods[] = { /* add car... | def addCarrayEntry(file): ' add a line at the wrap file for carray type definition' shutil.copy(file, file+'tmp') ofile = open(file, 'w') ifile = open(file+'tmp', 'r') for line in ifile.readlines(): if line.find('static PyMethodDef SwigMethods[] = ') != -1: ofile.write('''static PyMethodDef SwigMethods[] = { /* add car... | 32,276 |
def addCarrayEntry(file): ' add a line at the wrap file for carray type definition' shutil.copy(file, file+'tmp') ofile = open(file, 'w') ifile = open(file+'tmp', 'r') for line in ifile.readlines(): if line.find('static PyMethodDef SwigMethods[] = ') != -1: ofile.write('''static PyMethodDef SwigMethods[] = { /* add car... | def addCarrayEntry(file): ' add a line at the wrap file for carray type definition' shutil.copy(file, file+'tmp') ofile = open(file, 'w') ifile = open(file+'tmp', 'r') for line in ifile.readlines(): if line.find('static PyMethodDef SwigMethods[] = ') != -1: ofile.write('''static PyMethodDef SwigMethods[] = { /* add car... | 32,277 |
def simuCDCV(numDSL, initSpec, selModel, selModelAllDSL, selCoef, mutaModel, maxAllele, mutaRate, initSize, finalSize, burnin, noMigrGen, mixingGen, growth, numSubPop, migrModel, migrRate, update, dispPlot, saveAt, savePop, resume, resumeAtGen, name, dryrun): ''' parameters are self-expanary. See help info for detailed... | def simuCDCV(numDSL, initSpec, selModel, selModelAllDSL, selCoef, mutaModel, maxAllele, mutaRate, initSize, finalSize, burnin, noMigrGen, mixingGen, growth, numSubPop, migrModel, migrRate, update, dispPlot, saveAt, savePop, resume, resumeAtGen, name, dryrun): ''' parameters are self-expanary. See help info for detailed... | 32,278 |
def getStats(v, highest): # the following are statistics for each DSL perc = [] # percentage numAllele = [] # number of alleles effNumAllele = [] # effective number of alleles overallFreq = [] # size of disease percMostCommon = []... | def getStats(v, highest): # the following are statistics for each DSL perc = [] # percentage numAllele = [] # number of alleles effNumAllele = [] # effective number of alleles overallFreq = [] # size of disease percMostCommon = []... | 32,279 |
def swig_version(): ''' get the version of swig ''' fout = os.popen('swig -version') # try: version = re.match('SWIG Version\s*(\d+).(\d+).(\d+).*', fout.readlines()[1]).groups() except: print 'Can not obtain swig version, please install swig' sys.exit(1) return map(int, version) | def swig_version(): ''' get the version of swig ''' fout = os.popen('swig -version') # try: version = re.match('SWIG Version\s*(\d+).(\d+).(\d+).*', fout.readlines()[1]).groups() except: print 'Can not obtain swig version, please install swig' sys.exit(1) return map(int, version) | 32,280 |
def swig_version(): ''' get the version of swig ''' fout = os.popen('swig -version') # try: version = re.match('SWIG Version\s*(\d+).(\d+).(\d+).*', fout.readlines()[1]).groups() except: print 'Can not obtain swig version, please install swig' sys.exit(1) return map(int, version) | def swig_version(): ''' get the version of swig ''' fout = os.popen('swig -version') # try: version = re.match('SWIG Version\s*(\d+).(\d+).(\d+).*', fout.readlines()[1]).groups() except: print 'Can not obtain swig version, please install swig' sys.exit(1) return map(int, version) | 32,281 |
def indFunc1(ind, param): 'do something to info2' ind.setInfo(ind.info('info2')+param[1], 'info2') return True | def indFunc1(ind, param): 'do something to info2' ind.setInfo(ind.info('info2')+param[1], 'info2') return True | 32,282 |
def buildStaticLibrary(sourceFiles, libName, libDir, compiler): '''Build libraries to be linked to simuPOP modules''' # get a c compiler print 'Creating library', libName comp = new_compiler(compiler=compiler, verbose=True) objFiles = comp.compile(sourceFiles, include_dirs=['.']) comp.create_static_lib(objFiles, libNam... | defMODU_INFO[modu]['src'].extend(GSL_FILES + SERIAL_FILES + IOSTREAMS_FILES) buildStaticLibrary(sourceFiles,MODU_INFO[modu]['src'].extend(GSL_FILES + SERIAL_FILES + IOSTREAMS_FILES) libName,MODU_INFO[modu]['src'].extend(GSL_FILES + SERIAL_FILES + IOSTREAMS_FILES) libDir,MODU_INFO[modu]['src'].extend(GSL_FILES + SERIAL_... | 32,283 |
def buildStaticLibrary(sourceFiles, libName, libDir, compiler): '''Build libraries to be linked to simuPOP modules''' # get a c compiler print 'Creating library', libName comp = new_compiler(compiler=compiler, verbose=True) objFiles = comp.compile(sourceFiles, include_dirs=['.']) comp.create_static_lib(objFiles, libNam... | def buildStaticLibrary(sourceFiles, libName, libDir, compiler): '''Build libraries to be linked to simuPOP modules''' # get a c compiler print 'Creating library', libName comp = new_compiler(compiler=compiler, verbose=True) objFiles = comp.compile(sourceFiles, include_dirs=['.']) comp.create_static_lib(objFiles, libNam... | 32,284 |
def outputStatistics(pop, args): ''' this function will be working with a pyOperator to output statistics. Many parameters will be passed, packed as a tuple. We need to output 1. LD (D') from a central marker to all others on a non-DSL chromosome, at burnin and before and after migration 2. LD (D') from a central DSL ... | def outputStatistics(pop, args): ''' this function will be working with a pyOperator to output statistics. Many parameters will be passed, packed as a tuple. We need to output 1. LD (D') from a central marker to all others on a non-DSL chromosome, at burnin and before and after migration 2. LD (D') from a central DSL ... | 32,285 |
def simuComplexDisease( numChrom, numLoci, markerType, DSLafter, DSLdist, initSize, meanInitAllele, burnin, introGen, minAlleleFreq, maxAlleleFreq, fitness, mlSelModel, numSubPop, finalSize, noMigrGen, mixingGen, popSizeFunc, migrModel, mu, mi, rec, dryrun, logFile): ''' run a simulation of complex disease with given p... | def simuComplexDisease( numChrom, numLoci, markerType, DSLafter, DSLdist, initSize, meanInitAllele, burnin, introGen, minAlleleFreq, maxAlleleFreq, fitness, mlSelModel, numSubPop, finalSize, noMigrGen, mixingGen, popSizeFunc, migrModel, mu, mi, rec, dryrun, logFile): ''' run a simulation of complex disease with given p... | 32,286 |
def simuComplexDisease( numChrom, numLoci, markerType, DSLafter, DSLdist, initSize, meanInitAllele, burnin, introGen, minAlleleFreq, maxAlleleFreq, fitness, mlSelModel, numSubPop, finalSize, noMigrGen, mixingGen, popSizeFunc, migrModel, mu, mi, rec, dryrun, logFile): ''' run a simulation of complex disease with given p... | def simuComplexDisease( numChrom, numLoci, markerType, DSLafter, DSLdist, initSize, meanInitAllele, burnin, introGen, minAlleleFreq, maxAlleleFreq, fitness, mlSelModel, numSubPop, finalSize, noMigrGen, mixingGen, popSizeFunc, migrModel, mu, mi, rec, dryrun, logFile): ''' run a simulation of complex disease with given p... | 32,287 |
def simuComplexDisease( numChrom, numLoci, markerType, DSLafter, DSLdist, initSize, meanInitAllele, burnin, introGen, minAlleleFreq, maxAlleleFreq, fitness, mlSelModel, numSubPop, finalSize, noMigrGen, mixingGen, popSizeFunc, migrModel, mu, mi, rec, dryrun, logFile): ''' run a simulation of complex disease with given p... | def simuComplexDisease( numChrom, numLoci, markerType, DSLafter, DSLdist, initSize, meanInitAllele, burnin, introGen, minAlleleFreq, maxAlleleFreq, fitness, mlSelModel, numSubPop, finalSize, noMigrGen, mixingGen, popSizeFunc, migrModel, mu, mi, rec, dryrun, logFile): ''' run a simulation of complex disease with given p... | 32,288 |
def simuComplexDisease( numChrom, numLoci, markerType, DSLafter, DSLdist, initSize, meanInitAllele, burnin, introGen, minAlleleFreq, maxAlleleFreq, fitness, mlSelModel, numSubPop, finalSize, noMigrGen, mixingGen, popSizeFunc, migrModel, mu, mi, rec, dryrun, logFile): ''' run a simulation of complex disease with given p... | def simuComplexDisease( numChrom, numLoci, markerType, DSLafter, DSLdist, initSize, meanInitAllele, burnin, introGen, minAlleleFreq, maxAlleleFreq, fitness, mlSelModel, numSubPop, finalSize, noMigrGen, mixingGen, popSizeFunc, migrModel, mu, mi, rec, dryrun, logFile): ''' run a simulation of complex disease with given p... | 32,289 |
def simuComplexDisease( numChrom, numLoci, markerType, DSLafter, DSLdist, initSize, meanInitAllele, burnin, introGen, minAlleleFreq, maxAlleleFreq, fitness, mlSelModel, numSubPop, finalSize, noMigrGen, mixingGen, popSizeFunc, migrModel, mu, mi, rec, dryrun, logFile): ''' run a simulation of complex disease with given p... | def simuComplexDisease( numChrom, numLoci, markerType, DSLafter, DSLdist, initSize, meanInitAllele, burnin, introGen, minAlleleFreq, maxAlleleFreq, fitness, mlSelModel, numSubPop, finalSize, noMigrGen, mixingGen, popSizeFunc, migrModel, mu, mi, rec, dryrun, logFile): ''' run a simulation of complex disease with given p... | 32,290 |
def simuComplexDisease( numChrom, numLoci, markerType, DSLafter, DSLdist, initSize, meanInitAllele, burnin, introGen, minAlleleFreq, maxAlleleFreq, fitness, mlSelModel, numSubPop, finalSize, noMigrGen, mixingGen, popSizeFunc, migrModel, mu, mi, rec, dryrun, logFile): ''' run a simulation of complex disease with given p... | def simuComplexDisease( numChrom, numLoci, markerType, DSLafter, DSLdist, initSize, meanInitAllele, burnin, introGen, minAlleleFreq, maxAlleleFreq, fitness, mlSelModel, numSubPop, finalSize, noMigrGen, mixingGen, popSizeFunc, migrModel, mu, mi, rec, dryrun, logFile): ''' run a simulation of complex disease with given p... | 32,291 |
def last_two(gen): if gen >= endGen -2: return 2 else: return 1 | def last_two(gen): if gen >= endGen -2: return 2 else: return 1 | 32,292 |
def plotLD(pop, epsFile, jpgFile): ''' plot LD values in R and convert to jpg if possible ''' # return max LD res = {} # dist: distance (location) of marker # ldprime: D' value dist = [] ldprime = [] # D' ldvalue = [] # D for ld in pop.dvars().ctrDSLLD: if ld[1] == pop.dvars().ctrChromDSL: dist.append(pop.locusDist(ld[... | def plotLD(pop, epsFile, jpgFile): ''' plot LD values in R and convert to jpg if possible ''' # return max LD res = {} # dist: distance (location) of marker # ldprime: D' value dist = [] ldprime = [] # D' ldvalue = [] # D for ld in pop.dvars().ctrDSLLD: if ld[1] == pop.dvars().ctrChromDSL: dist.append(pop.locusPos(ld[0... | 32,293 |
def plotLD(pop, epsFile, jpgFile): ''' plot LD values in R and convert to jpg if possible ''' # return max LD res = {} # dist: distance (location) of marker # ldprime: D' value dist = [] ldprime = [] # D' ldvalue = [] # D for ld in pop.dvars().ctrDSLLD: if ld[1] == pop.dvars().ctrChromDSL: dist.append(pop.locusDist(ld[... | def plotLD(pop, epsFile, jpgFile): ''' plot LD values in R and convert to jpg if possible ''' # return max LD res = {} # dist: distance (location) of marker # ldprime: D' value dist = [] ldprime = [] # D' ldvalue = [] # D for ld in pop.dvars().ctrDSLLD: if ld[1] == pop.dvars().ctrChromDSL: dist.append(pop.locusDist(ld[... | 32,294 |
def plotLD(pop, epsFile, jpgFile): ''' plot LD values in R and convert to jpg if possible ''' # return max LD res = {} # dist: distance (location) of marker # ldprime: D' value dist = [] ldprime = [] # D' ldvalue = [] # D for ld in pop.dvars().ctrDSLLD: if ld[1] == pop.dvars().ctrChromDSL: dist.append(pop.locusDist(ld[... | def plotLD(pop, epsFile, jpgFile): ''' plot LD values in R and convert to jpg if possible ''' # return max LD res = {} # dist: distance (location) of marker # ldprime: D' value dist = [] ldprime = [] # D' ldvalue = [] # D for ld in pop.dvars().ctrDSLLD: if ld[1] == pop.dvars().ctrChromDSL: dist.append(pop.locusDist(ld[... | 32,295 |
def plotLD(pop, epsFile, jpgFile): ''' plot LD values in R and convert to jpg if possible ''' # return max LD res = {} # dist: distance (location) of marker # ldprime: D' value dist = [] ldprime = [] # D' ldvalue = [] # D for ld in pop.dvars().ctrDSLLD: if ld[1] == pop.dvars().ctrChromDSL: dist.append(pop.locusDist(ld[... | def plotLD(pop, epsFile, jpgFile): ''' plot LD values in R and convert to jpg if possible ''' # return max LD res = {} # dist: distance (location) of marker # ldprime: D' value dist = [] ldprime = [] # D' ldvalue = [] # D for ld in pop.dvars().ctrDSLLD: if ld[1] == pop.dvars().ctrChromDSL: dist.append(pop.locusPos(ld[0... | 32,296 |
def plotLD(pop, epsFile, jpgFile): ''' plot LD values in R and convert to jpg if possible ''' # return max LD res = {} # dist: distance (location) of marker # ldprime: D' value dist = [] ldprime = [] # D' ldvalue = [] # D for ld in pop.dvars().ctrDSLLD: if ld[1] == pop.dvars().ctrChromDSL: dist.append(pop.locusDist(ld[... | def plotLD(pop, epsFile, jpgFile): ''' plot LD values in R and convert to jpg if possible ''' # return max LD res = {} # dist: distance (location) of marker # ldprime: D' value dist = [] ldprime = [] # D' ldvalue = [] # D for ld in pop.dvars().ctrDSLLD: if ld[1] == pop.dvars().ctrChromDSL: dist.append(pop.locusDist(ld[... | 32,297 |
def plotLD(pop, epsFile, jpgFile): ''' plot LD values in R and convert to jpg if possible ''' # return max LD res = {} # dist: distance (location) of marker # ldprime: D' value dist = [] ldprime = [] # D' ldvalue = [] # D for ld in pop.dvars().ctrDSLLD: if ld[1] == pop.dvars().ctrChromDSL: dist.append(pop.locusDist(ld[... | def plotLD(pop, epsFile, jpgFile): ''' plot LD values in R and convert to jpg if possible ''' # return max LD res = {} # dist: distance (location) of marker # ldprime: D' value dist = [] ldprime = [] # D' ldvalue = [] # D for ld in pop.dvars().ctrDSLLD: if ld[1] == pop.dvars().ctrChromDSL: dist.append(pop.locusDist(ld[... | 32,298 |
def writeReport(content, allParam, numChrom, numLoci, DSLafter, peneFunc, numSample, results): ''' write a HTML file. The parts for each population has been written but we need a summary table. ''' print "Writing a report (saved in summary.htm )" try: summary = open(outputDir + "/summary.htm", 'w') except: raise except... | def writeReport(content, allParam, numChrom, numLoci, DSLafter, peneFunc, numSample, results): ''' write a HTML file. The parts for each population has been written but we need a summary table. ''' print "Writing a report (saved in summary.htm )" try: summary = open(outputDir + "/summary.htm", 'w') except: raise except... | 32,299 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.