Thanks to visit codestin.com
Credit goes to github.com

Skip to content

vcfgo stricter than VCF spec in terms of sample filters #16

@carbocation

Description

@carbocation

vcfgo seems to expect the sample filter to be the same for all samples:

vcfgo/header.go

Lines 69 to 73 in aeb512d

func (h *Header) parseSample(format []string, s string) (*SampleGenotype, []error) {
values := strings.Split(s, ":")
if len(format) != len(values) {
return NewSampleGenotype(), []error{fmt.Errorf("bad sample string: %s", s)}
}

However, the VCF spec is more permissive: "Trailing fields can be dropped (with the exception of the GT field, which should always be present if specified in the FORMAT field)." See page 6.

I believe that, with the exception of GT, trailing fields should be allowed to be missing.

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