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

Add support for arbitrary ploidy level (at least warn about incompatibility with polyploids) #97

Open
taprs opened this issue Jan 24, 2024 · 1 comment
Labels
enhancement New feature or request high priority

Comments

@taprs
Copy link

taprs commented Jan 24, 2024

Thank you for this tool! The idea is pretty elegant and we have been needing the "official" script to do these simple stats for so long...

I understand that this was likely addressed in #79 but I want it to be said explicitly : we would like to see arbitrary ploidy level support! From our test runs it seems that pixy silently takes first two alleles in polyploids and thus dramatically lowers the pi estimate for polyploids.

It would be good, as a first quick fix, to add a warning (or maybe even an error?) if any cells of the input VCF have ploidy other than 2. Then I have a dream of being able to use pixy with arbitrary ploidy level, including cases when different samples or genomic positions have different ploidy levels...

Best wishes,
Nikita

@taprs taprs added the enhancement New feature or request label Jan 24, 2024
@taprs
Copy link
Author

taprs commented Aug 3, 2024

I drafted a commit that outputs correct pi and dxy values for arbitrary ploidy levels provided that the maximum number of alleles per site is given as --ploidy argument in my fork: https://github.com/taprs/pixy

So far it messes the n_missing counts, but I can improve it further if it can be merged into pixy later. I do not want to maintain my own fork 😈

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request high priority
Projects
None yet
Development

No branches or pull requests

2 participants