samtools / bcftools

This is the official development repository for BCFtools. See installation instructions and other documentation here http://samtools.github.io/bcftools/howtos/install.html
http://samtools.github.io/bcftools/
Other
634 stars 241 forks source link

Fix reference #2125

Open sonalipechlivanis opened 3 months ago

sonalipechlivanis commented 3 months ago

Hi,

I want to fix my data with the reference data using bcftools. However, I am getting the following error "[E::bgzf_read_block] Failed to read BGZF block data at offset 33357268 expected 7939 bytes; hread returned 538" when I run the following commands

./bcftools +fixref /path/mydatabcf -Ob -o /path/mydata-RefFixed.bcf -- -d -f $REF/human_g1k_v37.fasta.gz -i $REF/All_20170710.vcf.gz

./bcftools +fixref /path/mydata-RefFixed.bcf -- -f $REF/human_g1k_v37.fasta.gz

Could you please help me with this error?

Thank you very much.

Best, Sonali

pd3 commented 3 months ago

The error message suggests that the BCF is corrupted. Do commands like this work on the file?

bcftools index your.bcf
bcftools view -Ou -o /dev/null your.bcf

command work on this file? I suspect it will not, and then the next thing to check is how the file was produced

sonalipechlivanis commented 3 months ago

Thank you very much for the feedback. I will try to re-install the bcftools.