Closed ashander closed 7 years ago
oh the one to the diff in msprime? oops. I'm at the vet. On Thursday, November 10, 2016, Peter Ralph notifications@github.com wrote:
@petrelharp commented on this pull request.
In devel/notes.md https://github.com/ashander/ftprime/pull/1:
} else {
if (in_count != out_count) {
ret = MSP_ERR_BAD_COALESCENCE_RECORDS_12;
goto out;
}
+ +The in_count and +out_count +both accumulate the number of children (less 1 for some reason) in or out when adding or removing a set of records. + +The above snippet appears just before 'returning' the tree and seems to be +a check that, at any given point after the first tree, the cumulative number of +children (beyond the first child) added or removed is +equal. +For binary trees (like we have) this is just that the number of records in and +out match.
link doesn't work. very nice writeup tho
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ashander/ftprime/pull/1, or mute the thread https://github.com/notifications/unsubscribe-auth/AAfLOAXZCYcRbX3x7AHvyZCl2r9PjVMuks5q85W9gaJpZM4KuKBq .
-Jaime
I can't fully respond right now but maybe this link works. look for my comment in tree_sequence.c https://github.com/ashander/msprime/commit/dc8b8cc14b8f0f90aae9ed91db26582a2b32a6ed
On Thursday, November 10, 2016, Peter Ralph notifications@github.com wrote:
@petrelharp commented on this pull request.
In devel/notes.md https://github.com/ashander/ftprime/pull/1:
} else {
if (in_count != out_count) {
ret = MSP_ERR_BAD_COALESCENCE_RECORDS_12;
goto out;
}
+ +The in_count and +out_count +both accumulate the number of children (less 1 for some reason) in or out when adding or removing a set of records. + +The above snippet appears just before 'returning' the tree and seems to be +a check that, at any given point after the first tree, the cumulative number of +children (beyond the first child) added or removed is +equal. +For binary trees (like we have) this is just that the number of records in and +out match.
So: For any rooted tree, the sum over nodes of (the number of children minus one) is equal to the number of tips minus one. (proof: order the tips, then from each draw the path from that tip towards the root until it hits an already-drawn path; associate each tip with the last edge in its path.) If we've just constructed the first tree, in_count is this number.
This suggests that the above tree sequence should fail the _firsttree check, since self-> sample_size should be 3, while the tree has 4 tips.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ashander/ftprime/pull/1, or mute the thread https://github.com/notifications/unsubscribe-auth/AAfLOCd28SZfb5HbGHsEO7KcncmtcEtaks5q85rDgaJpZM4KuKBq .
-Jaime
OK I've applied T to the corrected records an it's unclear why it would fail. This is currently in
devel/notes.md
. I'll try it in code and report back