bcftools filter not parsing sample FORMAT fields correctly

Open
#420 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
c
Domain
cli

Research direction

Start by reproducing the bcftools filter -R target.bed input.vcf command with a multisample FreeBayes-generated VCF containing a decimal GQ value. Trace the FORMAT-field parsing used by the filter command and confirm that the decimal GQ remains one field while DP and later fields retain their original values.

Written by the indexing model from the issue text.

Description

bug

bcftools --version
bcftools 1.3 (same result with 1.2 and 1.0)

When using the command "bcftools filter -R target.bed input.vcf > output.vcf" on a multisample FreeBayes-generated vcf, the FORMAT fields do not seem to deal with a decimal in the GQ position correctly (deals with it fine in other entries). As can be seen below, the existing DP value is getting replaced by the digits past the decimal of the floating value GQ (the GL value seems okay). Is anyone else seeing this effect?

"… GT:GQ:DP:DPR:RO:QR:AO:QA:GL 1/1:131.721:67:67,67:0:0:67:2311:-208.242,-20.169,0 …"
becomes
"… GT:GQ:DP:DPR:RO:QR:AO:QA:GL 1/1:131:721:67,67:0:0:67:2311:-208.242,-20.169,0 …"

Dominant language
C
Stars
891
Forks
277
Avg merge
2d 23h
Merged PRs (30d)
2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from samtools/bcftools

All issues in samtools/bcftools

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.