Project Description/Abstract
 This project uses a simulationbased approach to understand the impact of hybrid incompatibilities on the structure of hybrid zones
 We're using admixsimul (https://github.com/melop/admixsimul) written by Ray to simulate hybrid genomes and selection on these incompatibilities
Notes
9 June 2014
 Another prediction of Shai's model is that migration can generate the bimodal distribution we see in some hybrid zone
 to test this I have simulated migration of 50 parental individuals to the 5050 hybrid population each generation
 this does sort of give a bimodal distribution but it doesn't really look the hybrid populations we see:
Image:Migrants.pdf
8 June 2014
 I met with Shai about his model of this process and one the things that came up in our discussion was the important role of drift. I wasn't sure if the structure of the incompatibilities or the population size was more important in driving the skew we see.
 So to investigate this, I'm simulating as before but with population size of 10,000 to minimize drift (this is very slow)
 Updates to follow, but it seems like this halts the asymmetric skew process, and maintains populations near 5050
 Update: this just seems to slow the population skew, still occurs
4 June 2014
 One interesting thing I'm noticing is that the outcome with a 5050 population can be somewhat deterministic given starting a particular set of starting incompatibilitiesskew will develop towards on parent depending on the architecture of the incompatibilities.
31 May 2014
 Initial simulations looking promising for replicating the patterns we are seeing at hybrid zones, for populations that start at 5050.
Image:Hybrid index.pdf
28 May 2014 10 pm (10 am Ray's time!)
 Ray made some changes to the admixsimul script some time ago to make it so that offspring number is poisson distributed even though the sampling is necessarily weird because we don't want to write out many individuals that won't end up in the final population for computational reasons. He showed that the method does not generate distributions that significantly differ from a poisson distribution.
Twosample KolmogorovSmirnov test
data: x.pois and datCountTable[, 2]
D = 0.0223, pvalue = 0.9997
alternative hypothesis: twosided
 The scripts for this is in Dropbox and is called
seeIfIsPoisson.R
28 May 2014 12pm
 I'm now thinking that a preferable approach may be to go for more biological realism here
hybrid_size_limit = 800
avg_female_gamete = 30
std_female_gamete = 5.47
kids_per_female_func = Poisson
28 May 2014
 Due to yesterday's results, I'm thinking that we may want to draw s from the posterior distribution instead of an exponential distribution.
 Though, actually, looking at the values I assigned with rexp yesterday, they do look mainly contained within our posterior distribution of s from ABC simulations
 Also, it does seem that I was inadvertently adding a fair amount of drift in initial simulations allowing each female to only have 10 gametes. Without drift it seems that populations are somewhat stuck in a low fitness scenario when they admix at 5050 proportions. Individuals skewed towards either parent have higher fitness, generating equal proportions of birchmanni and malinche like individuals when selection is symmetrical, but with random mating, individuals near 5050 are regenerated. This leads to the prediction that slightly skewed populations will become more skewed rapidly.
27 May 2014
 Today I am simulating selection on hybrid genomes with different initial admixture proportions assuming dominant BDMIs
 I am drawing s from an exponential distribution using the upper bound of s from Tlatemaco and lower bound from Calnali estimated by Approximate Bayesian Computation methods (0.05)
s<(rexp(1,rate=1/.05))
 I am simulating 5050 admixture in a Xiphophorus population of 1000 individuals and also skewed admixture 7030
 these simulations are intensive in terms of time and memory but I'd like to do 100 of each
 I'm summarizing results using the script
sim_hybrid_index.pl
/home/schumer/ANDOLFATTO/molly/hybrid_genomes/whole_genome_simulation
 Preliminary results of today's simulations: skew is only around 510% in the current simulation conditions after 300 generations. I think the major difference compared to what I simulated before is that I've allowed females to have more offspring, thus minimizing the effects of drift driven by selection (?). Will look into it more tomorrow
26 May 2014
w<function(s,h1, h2, h3){matrix(c(
1, 1, 1h2*s, 1h1*s,
1, 1, 1h1*s, 1,
1h2*s, 1h1*s, 1h3*s, 1h2*s,
1h1*s, 1, 1h2*s, 1
), nrow=4,ncol=4)}
w_scenario2<function(s, h1, h2, h3){matrix(c(
1, 1h2*s, 1, 1h1*s,
1h2*s, 1h3*s, 1h1*s, 1h2*s,
1, 1h1*s, 1, 1,
1h1*s, 1h2*s, 1, 1
), nrow=4,ncol=4)}
 equivalent format for admixsimul
#matrix 1: dominant
if(fIs==10  fIs==20  fIs==11  fIs==12  fIs==16,1,if(fIs==15  fIs==14  fIs==18  fIs==19,1s,0))
#matrix 2: dominant
if(fIs==10  fIs==20  fIs==14  fIs==18  fIs==19,1,if(fIs==15  fIs==11  fIs==12  fIs==16,1s,0))
#coevolving: all hybrid genotypes under selection
if(fIs==10  fIs==20,1,if(fIs==15  fIs==11  fIs==12  fIs==16  fIs==14  fIs==18  fIs==19,1s,0))
generate_files_BDMI.pl
randomly_assign.R
/data/guest/schumer/assign_BDMIs
