-
Notifications
You must be signed in to change notification settings - Fork 78
User specified alleles #430
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
User specified alleles #430
Conversation
Codecov Report
@@ Coverage Diff @@
## master #430 +/- ##
=========================================
+ Coverage 86.74% 86.8% +0.06%
=========================================
Files 20 20
Lines 14136 14232 +96
Branches 2748 2774 +26
=========================================
+ Hits 12262 12354 +92
- Misses 963 964 +1
- Partials 911 914 +3
Continue to review full report at Codecov.
|
478dfc3 to
c76f7da
Compare
|
Very handy - I agree. I've gone through and commented. |
0ddcc28 to
bf0ee5c
Compare
|
Thanks for the comments @petrelharp and @hyanwong. Good catch on the fixed_alleles thing, that was a terrible choice of name! I've changed to "user alleles" throughout: better? |
|
Wow, this is a lot of work, and a very useful addition. There's quite a lot in here that I don't quite understand, but I've done my best to make useful comments. A few other points:
|
Sure, nothing stopping a user doing this (so long as there's less than 128 of them). I don't think we need functions for it right now though.
You can still get the ancestral state from the site object from variants, so getting the ancestral state index is just |
|
Looks good - "user_alleles" is ok, but I like it how the python interface just uses "alleles". |
OK, cool. Will think about it again in the new year. |
bf0ee5c to
f0465e8
Compare
|
Merging this --- |
This adds the ability to specify a fixed mapping for allelic values to genotypes. The motivation for this is that it can be quite annoying to have a different allele mapping for every site (especially when doing downstream things like haplotype matching). Allowing the user to specify a fixed mapping for this doesn't cover every possible situation, but it does make a very common one (fixed alphabet of ACGT) much simpler.