bcftools filter
1
0
Entering edit mode
6 weeks ago
Gregor Rot ▴ 490

Dear all,

I am doing some work on filtering variants, using bcftools for now:

bcftools view -i '%QUAL>=20' calls.bcf

Why the % at %QUAL? Trying to figure out looking at manuals for bcftools expressions:

Thanks & Cheers,
Gregor

filter bcftools • 142 views
1
Entering edit mode
6 weeks ago

I thinK '%ID' and '%QUAL' are used to make them distinct from INFO/ID and INFO/QUAL

and in fact, you can use both: https://github.com/samtools/bcftools/blob/682949a368ea0d4844b7b1791caf7f3df91a9a50/filter.c#L2641

        else if ( !strncasecmp(str,"QUAL",len) || !strncmp(str,"%QUAL",len) /* for backward compatibility */ )

0
Entering edit mode

Thanks, this is great. Just to be sure: when you write INFO/ID and INFO/QUAL, you mean that in the 8th field (INFO field) where we can have several values separated by ; we could have a value with name INFO or ID? (distinct from the 6th field QUAL and 3rd ID). Looking at VCF ref here: https://samtools.github.io/hts-specs/VCFv4.2.pdf