-
Notifications
You must be signed in to change notification settings - Fork 11
Transform coordinates by a RateMap #490
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
please take a glance at this when you have a chance @hyanwong . The plan is ultimately to internally transform the tree sequence to a "mutational unit" coordinate system (which might imply removing some edges/mutations in zero-rate intervals), do the dating, then copy the dates/posteriors over the the tree sequence in the original coordinate system. There's some tricky details to sort out, so I'm going to do this in pieces. |
hyanwong
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Two very minor comments.
|
This is a great start to being able to test a more flexible definition of mutation rates. I see that the function can be used to mask out a region by setting the underlying rate to NaN, but might we eventually also want a more standard masking approach, e.g. which doesn't change the underlying coordinate system? I think this is fine for the time being, though. |
|
Thanks!
Not sure I'm understanding what you mean-- we won't be changing the coordinate system in the output. The coordinate system will only be changed internally for the EP algorithm, to express things in terms of mutational units, which lets us support ratemaps with minimal changes to the code. For example, even if the mutation rate is constant, unsequenced intervals could be modeled as zero-rate intervals: this is similar to using There's already tskit infrastructure for "hard masking" via delete_intervals, so I don't think we need to do anything there. |
fa90cbd to
cfac191
Compare
cleanup Yan comments
cfac191 to
de19258
Compare
Ah, this is a good plan, internally. Thanks for merging. Also I see you suggested this as an internal approach for tskit "soft masking", which seems like a good start. |
Some infrastructure for supporting mutation rate maps