Nemo- possible genetic map bug?

22 views
Skip to first unread message

Nathan White

unread,
Jan 18, 2021, 9:27:28 AM1/18/21
to nemo-...@googlegroups.com
Dear Fred,

Thanks for your previous help regarding Nemo, I continue to enjoy using it and have learnt a lot.

Sorry for this huge email, but I've come across a problem with the genetic map which I can only think is some kind of bug.

I'm trying to build a genetic map with a quanti locus in the middle of a chromosome and ntrl loci either side spaced further and further apart. In the attached Test1.ini file you can see what I'm aiming for- a quanti locus at 1000 cM with ntrl loci spanning 0-2000 cM.

My simulation is a simple 2-patch island model with divergent selection. So I would expect to see a peak of Fst in the middle of the chromosome around this quanti locus, falling away to either side. I have specified "ntrl_save_freq locus" to get the .freq files to look at Fst at each locus.But when I look at the .freq files, there seems to be no impact on Fst at all. Not even at the exact position where the quanti locus is. 

So I took the advice of somebody in Sam Yeaman's lab and looked at the map resolution with the same map positions. The results are in the image "Test1_Fst.png". Vertical panels show changes in ntrl_genetic_map_resolution whilst horizontal panels show changes in quanti_genetic_map_resolution.

It looks to me as though the quanti locus is only ever positioned at 0. Reducing the neutral resolution shrinks the map down to span 200, 20, 2 cM etc, bringing more ntrl loci into tight linkage like it should, but the peak is always at the left of the map at 0.

Changing the quanti resolution also seems to do something, but as it looks as though the quanti locus is always at 0, I can't be sure what it's doing.

I thought that maybe there was some bug at 0, so I tried shifting the entire map horizontally by 90,000. This is in 'Test2.ini'. The ntrl map positions should now span 90,000-92,000 cM, with a quanti locus at 91,000, but the distances between them are all the same as in Test1.

The results of this are in "Test2_Fst.png". Now I sometimes get the same pattern with a peak at 0, but only where ntrl_res is smaller than quanti_res. Strangely, when ntrl_res is bigger than quanti_res, the peak appears at the right of my map- there's never a peak in the middle.

It looks to me as if Nemo is unable to place the quanti locus in between ntrl loci. It's either to the left of all the nrtl loci, or to the right.

Have you ever come across anything like this before? I'm really at a loss to explain it.

All the best, and many thanks
Nathan
--
Nathan White
PhD Student
Dept. Animal & Plant Sciences
University of Sheffield
@NJWhite_Evo

Fst plots.R
Test1.ini
Test2_Fst.png
Test2.ini
Test1_Fst.png

Frederic Guillaume

unread,
Jan 18, 2021, 12:12:55 PM1/18/21
to nemo-simul
Dear Nathan,

Thanks for your detailed email!

I investigated the case, and indeed it is caused by a bug in the recombination map. The recombination events for the two traits were disconnected. I could trace the bug back to version 2.3.51 (Sept 2018). It originates in a faulty merge from a development branch.

The bug affects only simulations were loci from different traits are linked on the genetic map (e.g. in same linkage group). The result of the bug is to effectively unlink those loci, as if they were on different chromosomes.

It's a good catch! I have now corrected the bug and the corrected code is available at the download site:

I am really sorry for this. Please use the latest version, which gives the result you'd expect (see attached figure):
Test1_Fst_N0.01_Q0.01.png

that graph shows the Fst at the neutral sites (on the x-axis). Those in the center are linked to the QTL, at same map position as locus 30.
For the simulation above, I changed one parameter's value: ntrl_all 5 -> 256; I increased the number of alleles per neutral locus to avoid having mutations producing multiple copies of the same allele. With too few possible allelelic values, the identity by state at the neutral loci is not a good representation of the identity by descent. The Fst values per locus would differe more than shown in the graph. The scale of the genetic map is 0.01 cM, which means that the recombination rate between two adjacent loci is 1e-4. I also ran the simulation for 1600 generations to make sure the two populations diverged phenotypically by some reasonable amount (>2 units). The results are for a single replicate.

I hope this helps!

Best regards,
Fred
Reply all
Reply to author
Forward
0 new messages