Exemplo n.º 1
 def testFixationViews(self):
     temp = fwdpy.view_fixations(pops[0])
Exemplo n.º 2
nlist = np.array([N]*10*N,dtype=np.uint32)

rng = fp.GSLrng(101)

pops = fp.evolve_regions(rng,       #The random number generator
                         4,         #The number of pops to simulate = number of threads to use.
                         N,         #Initial population size for each of the 4 demes
                         nlist[0:], #List of population sizes over time.
                         0.005,     #Neutral mutation rate (per gamete, per generation)
                         0.01,      #Deleterious mutation rate (per gamete, per generation)
                         0.005,     #Recombination rate (per diploid, per generation)
                         nregions,  #Defined above
                         sregions,  #Defined above
                         recregions)#Defined above
##Get fixation views:
fixations = [fp.view_fixations(i) for i in pops]
##Get mutation views:
mviews = fp.view_mutations(pops)

class test_sample_details(unittest.TestCase):
    def test_CompareUsingView(self):
        Evolve some population, take samples,
        get details of those samples, make sure
        those details match up what 'views' think should
        be in the population.
        samples = [fp.get_samples(rng,i,100) for i in pops]
        details = [fp.get_sample_details(i[1],j) for i,j in zip(samples,pops)]