Ben Jeffery

Results 132 comments of Ben Jeffery

I agree that this would be an in-place operation on a TableCollection. If it found wider use you can always add a TreeSequence method later that does the operation on...

Nice! In the round trip example @jeromekelleher, do you mean that just the topology would round trip? Or other things like populations and migrations? (I guess these could be included...

> AFAIK when NetworkX imports from dict of dicts you can only set attributes on edges: I don't know how to set them on nodes. So round tripping might be...

So I'm assuming this would be a method on `TableCollection` that would take an array for each table that specifies the new order (or `None` for no change)? Sounds do-able....

> Are there any misgivings about adding the functionality to tskit? I don't think so - is this a perf sensitive application? We normally add these things in at the...

> However, I guess we want to decide on whether (as @petrelharp says) we want to roll this into the "subset" method? I'd rather have a separate method so the...

Hi @a-ignatieva, Thanks for the suggestion and example code. I believe the first function in your code (`get_num_lineages`) is being discussed at https://github.com/tskit-dev/tskit/issues/386, with reference to using it for the...

> I assumed there are no unary nodes and a binary tree, so just seemed like a shortcut to count nodes that are older than the given node (as each...

I'd be much more motivated to do this if tskit had any sense of being able to use _part_ of a file, as `zarr` for example does. `tskit` needs the...

We have pre-exisiting tests for sockets: https://github.com/tskit-dev/tskit/blob/main/python/tests/test_fileobj.py#L289 and streams: https://github.com/tskit-dev/tskit/blob/main/python/tests/test_fileobj.py#L246