GithubHelp home page GithubHelp logo

Comments (6)

petrelharp avatar petrelharp commented on June 11, 2024 1

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.

petrelharp avatar petrelharp commented on June 11, 2024 1

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.

bhaller avatar bhaller commented on June 11, 2024 1

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.

petrelharp avatar petrelharp commented on June 11, 2024 1

Thanks - I was pretty pleased with my debugging also. =)

from slim.

bhaller avatar bhaller commented on June 11, 2024

A quick look-over of the code didn't reveal anything obviously wrong, so this will require more thorough delving. Stay tuned.

from slim.

bhaller avatar bhaller commented on June 11, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.