Consider this simulation of a simple quantitative trait on a Y chromosome.
initialize() {
setSeed(35);
initializeSLiMOptions(keepPedigrees=T);
initializeSex();
quant1T = initializeTrait("quant1T", "a", 0.0, 0.0, 0.0, directFitnessEffect=F);
initializeMutationType("m1", 0.4, "e", 0.05);
initializeGenomicElementType("g1", m1, c(1));
symbols = c("Y");
types = c("Y");
names = c("Y");
ids = seqAlong(names);
lengths = rdunif(size(ids), 1e3, 2e3);
for (id in ids, symbol in symbols, length in lengths, type in types, name in names)
{
initializeChromosome(id, length, type, symbol, name);
initializeMutationRate(1e-3);
initializeRecombinationRate(1e-4);
initializeGenomicElement(g1);
}
}
1 late() {
sim.addSubpop("p1", 20);
}
1: late() {
sim.demandPhenotype(sim.subpopulations);
inds = p1.individuals;
f = inds[inds.sex == "F"];
catn(sum(sim.substitutions.effectSize));
catn(f.quant1T);
}
10 late() {
sim.demandPhenotype(sim.subpopulations);
sim.simulationFinished();
}
This is printing the phenotypes of the females, whch should all be 0.0, having no offsets. However, I get the following, which the first number being the sum of all substitutions effects, and the vector being female phenotypes:
0.0
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
0.0
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
0.0
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
0.0
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
0.0
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
0.0
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
0.0
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
0.211879
0.423758 0.423758 0.423758 0.423758 0.423758 0.423758 0.423758 0.423758 0.423758 0.423758
0.211879
0.423758 0.423758 0.423758 0.423758 0.423758 0.423758 0.423758 0.423758 0.423758 0.423758
0.211879
0.423758 0.423758 0.423758 0.423758 0.423758 0.423758 0.423758 0.423758 0.423758 0.423758
As you can see, the baselineOffset is applying to females as well, but AFAICT it should not?
This is another wrinkle with the baselineOffset. I haven't thought hard about this, but won't this be solved by having more than one baseline offset? If there was one baselineOffset per chromosome, then individuals not carrying that chromosome could simply not include that term. (And tangentially, if each chromosome had its own diploidBaselineOffset and hemizygousBaselineOffset then that would remove the restriction that hemizygous dominance coefficients by 1.0, I think?)
Otherwise, I think we just can't use baseline accumulation with Y-like chromosomes?
ps. I caught this since my calculation of traits on the tree sequence didn't match SLiM's values.
Consider this simulation of a simple quantitative trait on a Y chromosome.
This is printing the phenotypes of the females, whch should all be 0.0, having no offsets. However, I get the following, which the first number being the sum of all substitutions effects, and the vector being female phenotypes:
As you can see, the baselineOffset is applying to females as well, but AFAICT it should not?
This is another wrinkle with the baselineOffset. I haven't thought hard about this, but won't this be solved by having more than one baseline offset? If there was one baselineOffset per chromosome, then individuals not carrying that chromosome could simply not include that term. (And tangentially, if each chromosome had its own diploidBaselineOffset and hemizygousBaselineOffset then that would remove the restriction that hemizygous dominance coefficients by 1.0, I think?)
Otherwise, I think we just can't use baseline accumulation with Y-like chromosomes?
ps. I caught this since my calculation of traits on the tree sequence didn't match SLiM's values.