Issue with Merging BCF Files: Invalid INFO id Error
0
0
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.

bcftools • 1.5k views
ADD COMMENT
0
Entering edit mode

show us the INFO field at chr01:28 , and show us the ##INFO lines in the VCF header.

ADD REPLY
0
Entering edit mode

Here are two files with the same problem. In the second picture, I tried changing IDs.

picture_204-e8a86266

ADD REPLY
0
Entering edit mode

chnaged_ids

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

yes, but the definition of those fields must be defined in the HEADER. For example, can you tell me what is SGB ?

ADD REPLY
0
Entering edit mode

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. Header

ADD REPLY

Login before adding your answer.

Traffic: 2131 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6