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

NA causes export errors out #508

Closed
iris-garden opened this issue Apr 25, 2024 · 0 comments
Closed

NA causes export errors out #508

iris-garden opened this issue Apr 25, 2024 · 0 comments
Labels
discourse-old migrated from discuss.hail.is (last updated more than 31 days ago)

Comments

@iris-garden
Copy link
Owner

MCMC said:

I was trying to export a MatrixTable to Plink or VCF format. Both error out due to NA.

My export_plink code is:
hl.export_plink(mt, filePrefix+‘.HailQC’, ind_id = mt.s)

and it returns:
FatalError: HailException: unphased_diploid_gt_index only supports ploidy == 2. Found 0.

My export_vcf code is:
hl.export_vcf(mt, filePrefix+‘.HailQC.vcf’)

and it returns:
FatalError: HailException: VCF spec does not support phased haploid calls.

Both worked after I dropped variants that has NAs. My Hail version is 0.2.126-ee77707f4fab.

Please help. Thank you!

patrick-schultz said:

Hi MCMC, sorry you’re running into difficulty!

This isn’t about NAs. Your dataset has monoploid calls in it. export_vcf should be able to handle that, but there’s a bug which was fixed in this PR, which will be in the next release (which should be this week).

export_plink does not support monoploid calls. See the docs here for details.

MCMC said:

Hi patrick-schultz , thank you for your reply.

This is human variants called from WGS. Is it normal that it contains monoploid calls? Is it because of the sex chromosomes?

patrick-schultz said:

That’s most likely, yeah.

MCMC said:

Thank you!

@iris-garden iris-garden added the discourse-old migrated from discuss.hail.is (last updated more than 31 days ago) label Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discourse-old migrated from discuss.hail.is (last updated more than 31 days ago)
Projects
None yet
Development

No branches or pull requests

1 participant