-
Notifications
You must be signed in to change notification settings - Fork 17
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
BCF.chrom always returns 1 #25
Comments
An update: This does seem to be a bug in GeneticVariation's handling of BCF files. Long story short, instead of storing the explicit chromosome name like in plaintext VCF format, the CHROM field in BCF files stores indices to the list of 'contig' field headers. In the example file, there is only one ##contig, with corresponding value Per the VCFv4.3 specs:
|
Can you test how this is with TranscodingStreams.jl? All the IO packages are to be upgraded to use transcoding streams eventually for their 2.0 releases. If there's an issue with BGZFStreams, it may be better to use this issue as a reason to get a move on with moving GeneticVariation over to using TranscodingStreams, rather than bug hunt in a package we intend to drop eventually. |
I'm fairly sure the issue involves the handling of correctly-decoded data (looks like I updated my post seconds before you commented), so moving to TranscodingStreams.jl shouldn't move the needle much on this particular problem. If GeneticVariation is still intended as the main package for BCF/VCF handling, I'm happy to contribute PR on both fronts, though |
Hello,
I am unable to get
BCF.chrom
to output anything other than1
(Julia 1.1.0; RHEL 7.6).I tested this with multiple BCF files. When inspected with
bcftools view
, these same files show the correct chromosome name, in the expected field:However,
BCF.chrom
tells a different story:The issue doesn't seem connected to the actual implementation of
BCF.chrom()
. Reading straight from theBGZFStream
causes the same issue:Reproducible example attached: bcftest.bcf.gz
The text was updated successfully, but these errors were encountered: