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

Import Error for bcftools Compressed Files #32

Open
DarioS opened this issue Aug 5, 2019 · 1 comment
Open

Import Error for bcftools Compressed Files #32

DarioS opened this issue Aug 5, 2019 · 1 comment

Comments

@DarioS
Copy link

DarioS commented Aug 5, 2019

VCF files that are filtered using bcftools and have their data compressed by specifying -O z as part of the command can't be imported into R because of the error "scanBcfHeader(bf) : [internal] _hts_rewind() failed". Decompressing the file and re-compressing it using the R function bgzip enables it to be successfully imported, but it seems an inefficient workaround and it's unclear why it's required. This issue has been reported for an older version of VariantAnnotation #22

@LTLA
Copy link

LTLA commented Jan 2, 2024

Just ran into this problem, which is quite inconvenient.

Some investigative work suggests that VariantAnnotation already has a lot of the machinery required to decompress and read Gzipped (but not BGZF-compressed) files, based on the VariantAnnotation:::.vcf_scan_connection function.

It seems that the real blocker is that every readVcf method eventually calls Rsamtools::scanBcfHeader, which refuses to play nice with Gzip-compressed VCFs. If a connection method was added for that in Rsamtools, then everything in VariantAnnotation might just work. At least we'd be a step closer.

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

No branches or pull requests

2 participants