Skip to content

parsing converts QUAL == zero to period, inconsistent numeric type breaks downstream filtering #329

@katrinakalantar

Description

@katrinakalantar

Hello,

When parsing an input .vcf file with a QUAL value = 0.0, i.e.: MN908947.3 12739 . T TA 0.0 PASS DP=3.0;DPS=3.0,0.0 GT:GQ 1:0

the float QUAL value is converted to a . which breaks float comparison filters in downstream applications (specifically working with artic minion pipeline where the above line is parsed to create the following: MN908947.3 12739 . T TA . PASS DP=3.0;DPS=3.0,0.0;Pool=nCoV-2019_2 GT:GQ 1:0)

It appears that this occurs as a function of this logic: https://github.com/jamescasbon/PyVCF/blob/master/vcf/parser.py#L696

Would it be reasonable to require consistent types for the QUAL field when parsing (all numeric)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions