BCFTools query regex or boolean expression
Hello,
I would like to extract only some columns from my vcf files like this:
bcftools query --format '%CHROM\t%POS\t%ID\t%REF\t%ALT\t%HF\n' {my_files}.vcf > {out}.txt
My problem is for some vcf outputs (different variant calling tools) I have column named HF for others AF, is it possible to use regex or boolean to extract that columns using only one command line?
• 1,810 views
•
link
0 answers
No answers yet.
Log in to answer this question.
no
so I have to launch the same command line twice changing the HF to AF, right?
you can print both tags with
bcftools query --allow-undef-tags --format ...this prints me only
.and notAForHFvaluesExample input and expected output would help others to understand the issue.