Closed ChrystelleDelord closed 2 years ago
Well, that's a confusing one. I have good news - (1) I get the same error, and (2) it can be avoided by doing instead
rts = pyslim.recapitate(ts, recombination_rate=rate_map, ancestral_Ne=22850, random_seed=1)
Are you using the most recent pyslim version? You should have got a message suggesting that you use pyslim.recapitate
instead of ts.recapitate( )
when you ran that code, if you were.
Ah-ha - and, I've found the bug. It comes because you've passed in rate_map
using recombination_rate=rate_map
; if instead you did recombination_map=rate_map
then it would work as it should. (Now, what you did should work fine, or at least not have such a confusing error... but, that's where the problem came from - my code tried to treat the rate map as if it were a single number). But, I recommend you use pyslim.recapitate( )
as above.
I'm going to close this and open a new issue documenting the underlying cause, but feel free to re-open if it doesn't solve your problem.
Dear Peter,
Sorry for the delay and thank you so much for your answer! It does work, and I was indeed not using the last version of pyslim so this is probably why!
Have a wonderful week-end and thank you again!
Dear all,
I want to simulate multiple chromosomes with SLiM (and pyslim recapitation). The reason I am doing this, rather than performing independent runs to mimic independant chromosomes, is that I need to keep the same individuals pedigree from SLiM.
So, I initiated my SLiM run in that way, and everything seemed to work fine and I am able to get my treeseq at the end.
However, when I load that tree within pyslim and try to launch recapitation, while accounting for the advice given in Recapitation with a non-uniform recombination map and also some documentation from msprime:
I get the following error message:
I am most probably doing something wrong but am not sure how to fix this? My
rate_map
works fine if I use it on msprime with the StandardCoalescent (I know I am not supposed to do this though) and I get the same error message when using msprime with thatrate_map
and the DTWF model.Is there a mismatch between the ways I am coding recombination maps between SLiM and pyslim?
Thank you very much;
Best regards, Chrys