-
Notifications
You must be signed in to change notification settings - Fork 13
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
Variant method to return actual states #739
Milestone
Comments
This is useful all right, we use something like this in a bunch of places. |
Adding to 0.3.1 as this is a trivial but useful addition |
hyanwong
added a commit
to hyanwong/tskit
that referenced
this issue
Oct 30, 2022
3 tasks
hyanwong
added a commit
to hyanwong/tskit
that referenced
this issue
Oct 30, 2022
hyanwong
added a commit
to hyanwong/tskit
that referenced
this issue
Oct 30, 2022
hyanwong
added a commit
to hyanwong/tskit
that referenced
this issue
Oct 31, 2022
hyanwong
added a commit
to hyanwong/tskit
that referenced
this issue
Oct 31, 2022
hyanwong
added a commit
to hyanwong/tskit
that referenced
this issue
Jan 7, 2023
hyanwong
added a commit
to hyanwong/tskit
that referenced
this issue
Jan 7, 2023
+1 on this as I got very confused writing the sgkit ancestral allele tests. |
Over in tskit-dev/tskit#2617 @jeromekelleher suggested we call this method |
hyanwong
added a commit
to hyanwong/tskit
that referenced
this issue
Sep 24, 2024
hyanwong
added a commit
to hyanwong/tskit
that referenced
this issue
Sep 24, 2024
benjeffery
pushed a commit
to hyanwong/tskit
that referenced
this issue
Oct 16, 2024
benjeffery
pushed a commit
to hyanwong/tskit
that referenced
this issue
Oct 16, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@szhan and others are finding it pretty inconvenient to deal with mismatching between the underlying integers in the
genotypes
array returned bysample_data.variants()
andts.variants()
. How about if we provided a method on the two variant classes to return the encoded variation as a numpy string array. It would be inefficient for large-scale stuff, but I think it might save many errors in smaller-scale testing, etc. Something like the following would probably work forSampleData
instances, and an equivalent function could be created for tskit variants. Hopefully making it a function would make it clear to the user that a potentially inefficient calculation was going on under the hood.The text was updated successfully, but these errors were encountered: