Entering edit mode
13 months ago
George
▴
10
I am attempting to combine two BCF (Binary Variant Call Format) files into a single file using the command bcftools merge output1.bcf output2.bcf --force-samples -o test.bcf
. However, when I try to view the resulting BCF file, I encounter an error message:
[W::bcf_record_check] Bad BCF record at chr01:28: Invalid INFO id 20
Error: BCF read error
To provide context, prior to merging, I filtered the BCF files using the command bcftools filter -e 'QUAL < 30 || TYPE!="snp"' input.bcf -o output_filtered.bcf
. Additionally, I indexed the filtered files using bcftools index output_filtered.bcf
.
show us the INFO field at chr01:28 , and show us the ##INFO lines in the VCF header.
Here are two files with the same problem. In the second picture, I tried changing IDs.
04-e8a86266
the ##fileformat line is missing and here is NO
##INFO
or##FORMAT
in your VCF header. Those lines are required by bcftools to read the VCF body. Your VCF is malformed.https://samtools.github.io/hts-specs/VCFv4.2.pdf
Isn't the ##INFO lines the last /t (par example: 1/1:70,6,0) and the ##FORMAT ones the /t with the GT:PL
yes, but the definition of those fields must be defined in the HEADER. For example, can you tell me what is SGB ?
First of all, thank you for all your help. I believe the INFO is available in the header. Here is a screenshot of the header.