Skip to content

get shared tree across an interval #3238

@petrelharp

Description

@petrelharp

A common thing we'd like to do is to visualize shared structure in the trees across a region of the genome. It occurs to me that one way to do this is would be to be able to do like ts.at( ), perhaps

tree = ts.at(interval=(left, right))

which returns the tree constructed by all edges that span the entire interval [left, right).

Probably, this would be like "if the argument to ts.at( ) is a tuple of length two, return the interval".

I do like the ts.at() syntax, but we might alternatively implement this as

def tree(at=None, interval=None):
    if at is not None:
        return self.at(at)

and deprecate ts.at().

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions