--
SLiM forward genetic simulation: http://messerlab.org/slim/
---
You received this message because you are subscribed to the Google Groups "slim-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to slim-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/slim-discuss/6636f677-942a-4713-9a6d-3c2986a47bd9n%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to slim-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/slim-discuss/6636f677-942a-4713-9a6d-3c2986a47bd9n%40googlegroups.com.
--
Sent from mobile device
--
SLiM forward genetic simulation: http://messerlab.org/slim/
---
You received this message because you are subscribed to the Google Groups "slim-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to slim-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/slim-discuss/CANpJD8JQvX03926FHFP7Rmai4zpcT4AWUxJTvN2%3DCfrev0_Acw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/slim-discuss/CAJS1hFCONnzVjQu_-yo4zUgFdK9yFm5ATcEnDY81rCj-8-1eJQ%40mail.gmail.com.
function (s) getInbreedingLoad(o pop, i sampSize)
{
i = sample(pop.individuals, sampSize, F);
B_pop = c();
for (individual in i) {
//get all deleterious mutation types
del_muts = c(individual.genomes.mutationsOfType(m1));
B_ind = c();
if (del_muts.length()>0) {
for(m in del_muts){
//check if mut is heterozygous
if(individual.genomes.mutationCountsInGenomes(m)==1){
//protect against case where s < -1 (can happen with gamma DFE)
s = max(m.selectionCoeff,-1.0);
//difference in fitness between het and hom is s*(h-1) (1+sh -(1+s))
B_ind = c(B_ind, s*(m.mutationType.dominanceCoeff-1));
}
}
// this is summed rather than multiplied, even if fitness is multiplicative
B_pop = c(B_pop, sum(B_ind));
}
else{
B_pop = c(B_pop, 0.0);
}
}
return(asString(mean(B_pop)));
}
To view this discussion on the web visit https://groups.google.com/d/msgid/slim-discuss/c79c3eb4-b03f-4c40-bcd5-881a9a54cbacn%40googlegroups.com.