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

F/mixed ploidy genotype array #171

Merged
merged 2 commits into from
Sep 22, 2020

Conversation

timothymillar
Copy link
Contributor

This fixes #169 by always using the value -2 to indicate non-alleles (i.e. padding) in a mixed-ploidy genotype array.
As mentioned in the issue I can make this value configurable if that is preferred.

I also added a test using an existing VCF though I think that the . value used for the first sample in the fourth variant is technically not within standard because there should be a value for each format field.

…p#169

This decodes non-allele values aka padding to -2 for mixed ploidy
data when using the Genotypes.array() method. Previously non-alleles
would overflow to -1 making lower ploidy genotypes indistinguishable
from partial genotypes of a higher ploidy.
@brentp brentp merged commit bb3c6d1 into brentp:master Sep 22, 2020
@brentp
Copy link
Owner

brentp commented Sep 22, 2020

thank you. i have tagged this as v0.20.7 and uploaded to pypi. it will automatically build on bioconda shortly and should be available there in a few hours.

@timothymillar
Copy link
Contributor Author

Awesome, thanks @brentp !

@timothymillar
Copy link
Contributor Author

Hi @brentp I finally got around to trying v0.20.7 installed from PyPI with pip install cyvcf2 --no-cache-dirand I'm still getting the old behavior.

It looks like pyvcf2.c is identical between the v0.20.6 and v0.20.7 packages on PyPI does it need to be rebuilt?

brentp added a commit that referenced this pull request Sep 29, 2020
@brentp
Copy link
Owner

brentp commented Sep 29, 2020

Ok. I think it should work as v0.20.8 from pypi now. Thanks for letting me know.

@timothymillar
Copy link
Contributor Author

Great v0.20.8 is working correctly, thanks again!

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.

Support mixed-ploidy data in Genotypes.array()
2 participants