-
Notifications
You must be signed in to change notification settings - Fork 17
Finish the "intro to popgen tutorial" #296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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)): |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
|
Spotted some minor bits. |
Co-authored-by: Gregor Gorjanc <gregor.gorjanc@gmail.com>
Co-authored-by: Gregor Gorjanc <gregor.gorjanc@gmail.com>
Makes good use of tskit 1.0 functions like PCA and legends on plots. Also completes the TODO in the topology counting section.