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

Annotations of type float slightly differ from values in the resource #125

Open
bartcharbon opened this issue Aug 7, 2020 · 1 comment

Comments

@bartcharbon
Copy link

I'm using VCF anno to annotate a INFO field of the float datatype:
Input infofield:

##INFO=<ID=CAP,Number=A,Type=Float,Description="CAP">

The resource contains values for this INFO field like:
1.4696171E-4
0.13309044
7.423004E-5

conf.toml is very simple:

file="test/tmp/cap.vcf.gz"
fields = ["CAP"]
ops=["self"]
names=["CAP"]

After annotation the values I find in the resulting VCF are slightly different from the input:
0.00014696
0.1331
7.423e-05

I would expect the annotated values to be the exactly same as the one in the resource.

@brentp
Copy link
Owner

brentp commented Aug 7, 2020

vcfanno must decide how to render a 32 bit float. The method chosen is a good trade-off between side and precision. This is not unexpected.

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

No branches or pull requests

2 participants