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
681 stars 240 forks source link

error while running bcftools to split vcf file #1978

Open FrancisNietzsche opened 1 year ago

FrancisNietzsche commented 1 year ago

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?

pd3 commented 1 year ago

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.