Skip to content

Conversation

hyanwong
Copy link
Member

@hyanwong hyanwong commented Jun 13, 2023

Description

Pull out the logic that iterates over trees and variants into a single base class, and allow this class to return a length.
Also allows left, right, copy to be passed to the trees() iterator (to match the variants() iterator), so that we can
iterate over a subset of the genome.

Also implements next() and prev() for trees, to match the variants iterator (they are handy anyway, right?)

Fixes #2625, #24

PR Checklist:

  • Tests that fully cover new/changed functionality.
  • Documentation including tutorial content if appropriate.
  • Changelogs, if there are API changes.

@hyanwong
Copy link
Member Author

BTW, this renders ts.aslist() a bit obsolete, as you can do ts.trees(copy=True), in the same way you do for variants.

Also allows left and right to be passed to the trees iterator.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make tqdm(ts.variants()) work better
2 participants