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
640 stars 241 forks source link

bcftools split vep miss variant without allele frequency when using -f to print gnom_af #2104

Closed liuhankui closed 5 months ago

liuhankui commented 5 months ago

bcftools +split-vep vep.vcf -s worst -f "%CHROM %POS %REF %ALT\n"

chr18 12312939 G C chr18 12312971 C T chr18 12314310 G C

bcftools +split-vep vep.vcf -s worst -f "%CHROM %POS %REF %ALT %gnomADg_AF\n"

chr18 12312939 G C 0.800479 chr18 12314310 G C 0.790057


miss chr18 12312971

pd3 commented 5 months ago

I updated the documentation to emphasize that unlike bcftools query -f, the plugin bcftools +split-vep -f drops lines where all queried VEP fields are empty.

Assuming you are using a recent version of the plugin (1.18+), you can change this behavior by providing the option -X, --keep-sites.

-x, --drop-sites      Drop sites without consequences after -s is applied (the default with -f)
-X, --keep-sites      Do not drop sites without consequences (the default without -f)

I hope this helps

liuhankui commented 5 months ago

-X, a nice option, thanks a lot!