Skip to content

Conversation

@hyanwong
Copy link
Member

@hyanwong hyanwong commented Jan 7, 2026

Makes good use of tskit 1.0 functions like PCA and legends on plots. Also completes the TODO in the topology counting section.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

```{code-cell}
```
samples = ts.samples()
for sample_id, h in zip(samples, ts.haplotypes(samples=samples)):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line should stay in

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But looking at the code around here I am confused what you want to achieve with this loop - you only obtain pop = 3 at the end of the loop hence the metadata string below is always ADMIX.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mostly thought to take it out because .haplotypes() is inefficient, and we should be pointing people towards the efficient .variants() operator in preference, if that also works for them?

@gregorgorjanc
Copy link
Member

Spotted some minor bits.

hyanwong and others added 2 commits January 8, 2026 08:33
Co-authored-by: Gregor Gorjanc <gregor.gorjanc@gmail.com>
Co-authored-by: Gregor Gorjanc <gregor.gorjanc@gmail.com>
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.

2 participants