You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's relatively common to want to restrict the genome coordinate space to show e.g. positions 1000...2000. One way we do this in the draw_svg() command is to look to see if the first and last trees are "empty" (i.e. have num_edges==0), and if so, change the X-coordinates to go from the left of the first non-empty tree to the right of the last non-empty tree. Coupled with the change in #69, that means it's possible to do
ts_arg=ts_arg.keep_intervals([[1000, 2000]], simplify=False)
# Now plot, without showing all the unreferenced nodes
The nice thing about this is that it only shows the "useful" sections of the tree sequence (e.g. in inferred tree sequences we often trim the flanking regions away, which cover telomeres etc).
An alternative, which we also have in draw_svg, is an x_lim parameter (under the hood, I think this simply does keep_intervals(..., simplify=False) before displaying).
The text was updated successfully, but these errors were encountered:
It's relatively common to want to restrict the genome coordinate space to show e.g. positions 1000...2000. One way we do this in the draw_svg() command is to look to see if the first and last trees are "empty" (i.e. have num_edges==0), and if so, change the X-coordinates to go from the left of the first non-empty tree to the right of the last non-empty tree. Coupled with the change in #69, that means it's possible to do
The nice thing about this is that it only shows the "useful" sections of the tree sequence (e.g. in inferred tree sequences we often trim the flanking regions away, which cover telomeres etc).
An alternative, which we also have in draw_svg, is an
x_lim
parameter (under the hood, I think this simply doeskeep_intervals(..., simplify=False)
before displaying).The text was updated successfully, but these errors were encountered: