hts-specs icon indicating copy to clipboard operation
hts-specs copied to clipboard

Reserved FORMAT field 'FT' should probably have 'Number=.'

Open dancooke opened this issue 6 years ago • 3 comments

In version 4.3 of the VCF specification, there is a field reserved for sample level filtering FT:

##FORMAT=<ID=FT,Number=1,Type=String,Description="Filter indicating if this genotype was “called”">

I think it makes more sense for this field to have variable length (i.e. Number=.) so that multiple failing filters can be listed, as in FILTER. In fact, although the specification does not seem to suggest this, I would expect the range of values of FT to be the same as FILTER.

dancooke avatar Mar 06 '18 16:03 dancooke

Any thoughts on this?

dancooke avatar Jun 01 '21 10:06 dancooke

Allowing other than Number=1 would mean that you would specify multiple failing filters as a list of comma-separated items.

However the specification already describes a different way to indicate multiple failing filters:

[§1.6.2] FT (String): Sample genotype filter indicating if this genotype was “called” (similar in concept to the FILTER field). Again, use PASS to indicate that all filters have been passed, a semicolon-separated list of codes for filters that fail, or ‘.’ to indicate that filters have not been applied. […]

A semicolon-separated list uses the same delimiter as the main FILTER field (column 7) and constitutes a single item for the purposes of Number. This means that each sample has a single FT entry, just as each VCF record has a single FILTER entry — regardless of multiple ALT alleles or other considerations in each case. So IMHO Number=1 is appropriate.

jmarshall avatar Feb 01 '22 13:02 jmarshall

As you allude to, it would be worth adding something like the following to §1.4.3 (“Filter field format”):

It is recommended in VCF and required in BCF that the header includes a ##FILTER line describing each of the codes that appear in the FILTER column or in FORMAT/FT fields of the file's data lines.

(Assuming that's true about required in BCF…)

jmarshall avatar Feb 01 '22 14:02 jmarshall