Skip to content

Bug in VCF output when selected samples have all missing GTs. #289

@jeromekelleher

Description

@jeromekelleher

vcztools drops FORMAT fields with missing values when subsetting samples, instead of emitting . placeholders like bcftools

When subsetting chr22.vcf.gz to a single sample (-s HG00096), vcztools omits FORMAT fields where the selected sample has no data, while bcftools retains them with . placeholders.

  bcftools:  GT:AD:DP:GQ:PL     ./.:0,0:0:.:.                                                                                                                                       
  vcztools:  AD:DP      0,0:0                                     

This causes downstream tools (e.g. cyvcf2) to fail when they expect GT to be present.

I think this is a bug, because we can't have AD/DP with no GT.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions