Comments (6)
This appears to be a problem in tree sequence recording and not about SLiM's internal state. Furthermore, trying to reload a tree sequence file with this problem results in the Inconsistent mutations
error, so there is no chance of invisible errors in SLiM simulation; only in analyzing which of the output mutations are SLiM mutations or not.
from slim.
After some printf debugging...
- the problem is that
derived_mutation_ids_at_position( )
is returning the wrong thing sometimes - that is because this method assumes that the mutations are in order by position in the thing they're looking in
- and so, deleteing the two lines starting here fixes the error
The problem seems to occur because the mutations we are adding go to a single genome not in order by position (position 9 comes before position 2). Changing the recipe to do
balancing_pos = sort(sample(0:(chr_len-1), 2));
also fixes the problem.
I don't understand the ramifications here, so I'm not proposing a fix.
from slim.
Nice debugging. Yes, the sort order of mutations in the genomes gets corrupted, and that is an error in SLiM's internal state, not just in the tree-seq stuff. I think I just neglected to consider that the positions given to addNewDrawnMutation() might not be in sorted order, and that case didn't get tested somehow. I have modified the addNewDrawnMutation() code to sort the mutations before adding them, when necessary.
from slim.
Thanks - I was pretty pleased with my debugging also. =)
from slim.
A quick look-over of the code didn't reveal anything obviously wrong, so this will require more thorough delving. Stay tuned.
from slim.
Interesting. I'm not sure whether/how/why the recorded TS information would be any different between the two patterns of Eidos calls, though, so the bug itself does presumably reside in SLiM's code...
from slim.
Related Issues (20)
- 4.1 Memory Issue HOT 6
- SLiMgui should offer to load external script changes HOT 7
- Wrap Eidos code edition/analysis features into a proper language server. HOT 1
- Slim 4.1 core dumping on computing cluster HOT 19
- small bug in docs HOT 1
- missing parents when using addRecombinant() HOT 2
- "pretty" option for serialize() HOT 2
- Inconsistent global-variable behavior from `x = 1` versus `x = x + 1` HOT 11
- Compiling Eidos script. HOT 13
- Software depends on Qt patch version? HOT 7
- improve recipe 17.5 by using tspop or link_ancestors
- SLiM 4.2 release process HOT 23
- QtSLiM *Open Recipe* list is sorted lexicographically rather than naturally HOT 5
- "buffer overflow detected" when trying to install SLiM on Linux HOT 29
- provide `make test` functionality to run tests after building `slim` and `eidos`
- SLiM 4.2.1 release process HOT 11
- Name collision between binaries and directories prevents linking with `ld` on RHEL 8 HOT 4
- Ubuntu SLiM install error HOT 20
- SLiM 4.2.1 fc 3 release process HOT 9
- 4.2.2 release process HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from slim.