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

+split-vep --include not able to properly filter float columns extracted from CSQ #2039

Closed SpikyClip closed 10 months ago

SpikyClip commented 11 months ago

Version: bcftools 1.18

Problem

When the following code is used, BCFtools +split-vep is unable to recognise the type of the field MAX_AF as Float and is therefore unable to filter MAX_AF.

bcftools +split-vep test.vcf -c 'MAX_AF:Float' -i 'MAX_AF<0.001'

[E::bcf_get_info_values] Unexpected type 7 at chr1:20815486
[E::bcf_get_info_values] Unexpected type 7 at chr1:20815541
[E::bcf_get_info_values] Unexpected type 7 at chr1:20815567
[E::bcf_get_info_values] Unexpected type 7 at chr1:20815861
[E::bcf_get_info_values] Unexpected type 7 at chr1:20816198
[E::bcf_get_info_values] Unexpected type 7 at chr1:20816713
[E::bcf_get_info_values] Unexpected type 7 at chr1:20817681
[E::bcf_get_info_values] Unexpected type 7 at chr1:20819475
[E::bcf_get_info_values] Unexpected type 7 at chr1:20821669
...

Expected Behavior

What I've tried

bcftools +split-vep test.vcf -d -c 'MAX_AF:Float' -i 'MAX_AF<0.001'
bcftools +split-vep test.vcf -c 'MAX_AF:FLOAT' -i 'MAX_AF<0.001'
bcftools +split-vep test.vcf -i 'MAX_AF<0.001'

I can confirm the column type is correct if I pass it through split-vep -c "-":

##INFO=<ID=MAX_AF,Number=.,Type=Float,Description="The MAX_AF field from INFO/CSQ">

What did work, however, was to +split-vep then pipe it to bcftools filter:

bcftools +split-vep test.vcf -c '-' | bcftools filter -i 'MAX_AF < 0.001'

At least there is a workaround but its still a bug that ought to get fixed. Apologies for not being able to provide a test file, but this should be reproducible on any vep annotated file I think.

pd3 commented 10 months ago

Thank you for the bug report, this is now fixed.