Skip to content

Commit

Permalink
endpoint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
petrelharp committed Sep 11, 2023
1 parent 5d60e6f commit 0afc2b5
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions c/examples/multichrom_wright_fisher.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,14 +226,16 @@ simulate(
right_parent, child, NULL, 0);
check_tsk_error(ret);
} else {
assert(chunk_left < breakpoint && breakpoint < chunk_right);
assert(chunk_left < breakpoint && breakpoint <= chunk_right);
/* Breakpoint is within this chunk so need two edges */
ret = tsk_edge_table_add_row(&tcs[k].edges, chunk_left, breakpoint,
left_parent, child, NULL, 0);
check_tsk_error(ret);
ret = tsk_edge_table_add_row(&tcs[k].edges, breakpoint, chunk_right,
right_parent, child, NULL, 0);
check_tsk_error(ret);
if (breakpoint < chunk_right) {
ret = tsk_edge_table_add_row(&tcs[k].edges, breakpoint, chunk_right,
right_parent, child, NULL, 0);
check_tsk_error(ret);
}
}
chunk_left = chunk_right;
}
Expand Down

0 comments on commit 0afc2b5

Please sign in to comment.