Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QUAL gets changed from unknown (.) to zero. #291

Open
al-dunstan opened this issue Jun 25, 2020 · 1 comment
Open

QUAL gets changed from unknown (.) to zero. #291

al-dunstan opened this issue Jun 25, 2020 · 1 comment

Comments

@al-dunstan
Copy link

If I read a VCF record with an unknown QUAL (a period) and write it back out, it gets changed from '.' to '0'. My (limited) understanding of the VCF format is that unknown and zero mean different things.

I think it could be fixed by setting Variant::quality to infinity() if the value read from the file is ".". Then, on output, check for isinf(var.quality) - if true, write a ".". Otherwise, write the value.

If QUAL is unknown and calculations are made with it, the value of infinity() will taint all subsequent values. But I'd expect something like that, since I don't actually have a value to start with.

@pjotrp
Copy link
Contributor

pjotrp commented Dec 16, 2020

Hi @al-dunstan, feel free to submit a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants