bcftools icon indicating copy to clipboard operation
bcftools copied to clipboard

error while running bcftools to split vcf file

Open FrancisNietzsche opened this issue 2 years ago • 1 comments

I employed bcftools to extract info of specific samples. And the sample I expected to extract is FD22608750.CEL_FD22608750.CEL. When I used bcftools to extract its own info from the merged vcf of 1700 samples--0811.b38.phased.imputed.merged.vcf.gz, the error showed that:

[E::bgzf_flush] File write failed (wrong size)
[main_vcfview] Error: cannot write to all_vcf/FD22608750.CEL_FD22608750.CEL.vcf.gz

My bcftools options are as follows:

bcftools view 0811.b38.phased.imputed.merged.vcf.gz -Oz -S all_list/FD22608750.CEL_FD22608750.CEL.list -o all_vcf/FD22608750.CEL_FD22608750.CEL.vcf.gz

Is there any potential solution to this?

FrancisNietzsche avatar Aug 17 '23 07:08 FrancisNietzsche

What version of bcftools are you using? I'd try to update to the latest and see if it changes anything. If not, a small test case would be necessary to reproduce the issue. From the error message alone it is hard to tell if the problem is in the data, htslib, or with your system.

pd3 avatar Aug 21 '23 14:08 pd3