iqbal-lab-org / minos

Variant call adjudication
MIT License
16 stars 5 forks source link

Invalid DP FORMAT header #77

Closed mbhall88 closed 4 years ago

mbhall88 commented 5 years ago

https://samtools.github.io/hts-specs/VCFv4.2.pdf FORMAT headers can only have the following keys: ID, Number, Type, and Description.

I have a depth header from minos (v0.5.1 according to the header) which is the folllowing:

##FORMAT=<ID=DP,Number=1,Type=Integer,Description="total kmer depth from gramtools",Source="minos">

Source keys can only be in INFO fields. So I guess remove it from FORMAT and create an INFO field also for DP? Either way it needs to be removed from the DP FORMAT header

bricoletc commented 5 years ago

@martinghunt what do you think about this? what was the rationale for having Source in the DP FORMAT field?

martinghunt commented 4 years ago

@bricoletc The rationale was to have a record that minos was the source of the information.

@mbhall88 Looks like this is valid to me. Was it breaking a tool/parser for you? From the VCF spec v4.2 on page 3:

For all of the ##INFO, ##FORMAT, ##FILTER, and ##ALT metainformation, extra fields can be included after the default fields. For example:

##INFO=<ID=ID,Number=number,Type=type,Description="description",Source="description",Version="128">

In the above example, the extra fields of “Source” and “Version” are provided. Optional fields should be stored as strings even for numeric values.

martinghunt commented 4 years ago

Ideally, I'd add Source="minos",Version="x.y.z" to all the FILTER and FORMAT lines in the header of the VCF made by minos. But not if it's breaking other tools.

martinghunt commented 4 years ago

I've left out the source = foo from the header lines.

mbhall88 commented 4 years ago

Ah yeah you're right. It was breaking a tool - can't remember which one though. If it is valid as per the specs then keep it in and it is then an issue for the associated breaking tool to fix.