Skip to content
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

feat: allow for specifying the order of population labels in Breakpoints.encode() #262

Merged
merged 4 commits into from
Dec 5, 2024

Conversation

aryarm
Copy link
Member

@aryarm aryarm commented Nov 20, 2024

...so that they can be made consistent across calls to encode() on different bp files

At the moment, encode() will choose integers to pair with each population label in the order that the labels appear in the bp file. So "AMR" will be assigned a value of 0 if it appears first in the file and "EUR" will be assigned a value of 1 if it appears second, etc. But what if you want the same ordering across a bunch of bp files? Wouldn't it be great if there was a way to just specify the integers for each pop label? This is that solution.

@aryarm aryarm marked this pull request as ready for review November 20, 2024 22:47
@aryarm aryarm changed the title feat: allow for specifying the order of the population labels in Breakpoints.encode() feat: allow for specifying the order of population labels in Breakpoints.encode() Nov 20, 2024
@aryarm
Copy link
Member Author

aryarm commented Nov 27, 2024

Thanks for the review, Michael!

Going to leave this PR open until at least tues in case Jessica has any other comments

@aryarm aryarm merged commit 09a916a into main Dec 5, 2024
14 checks passed
@aryarm aryarm deleted the feat/breakpoints-encode-labels branch December 5, 2024 18:19
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