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 & GNOMAD rounded out #159

Open
jomoxi opened this issue Jul 18, 2024 · 2 comments
Open

QUAL & GNOMAD rounded out #159

jomoxi opened this issue Jul 18, 2024 · 2 comments

Comments

@jomoxi
Copy link

jomoxi commented Jul 18, 2024

Hi
We're very pleased with vcfanno performance but we found some modifications in the final vcf that annoys us a little.
Basically, vcfanno rounds out "QUAL" to 1 decimal point (from 2 in the original vcf) and fields like "gnomAD_WG_AF" to 4 decimals points (6 in the original gnomad vcf)

Is there any parameter we miss to fix this?
Thanks

INPUT VCF

chr1 13417 . C CGAGA **481.02** . AC=2;AF=1;AN=2;DP=13;ExcessHet=3.0103;FS=0;MLEAC=2;MLEAF=1;MQ=34.02;QD=25.36;SOR=2.494 GT:AD:DP:GQ:PL 1/1:0,11:11:33:495,33,0

GNOMAD VCF FOR THE SAME POSITION

chr1 13417 rs777038595 C CGAGA . . gnomAD_WG_AC=14710;gnomAD_WG_AC_POPMAX=159;**gnomAD_WG_AF=0.123607**;gnomAD_WG_AF_POPMAX=0.226496;gnomAD_WG_AN=119006;gnomAD_WG_AN_POPMAX=702;gnomAD_WG_POPMAX=ami;gnomAD_WG_filterStatus=Pass

VCFANNO VCF

chr1	13417	.	C	CGAGA	**481.0**	.	AC=2;AF=1;AN=2;DP=13;ExcessHet=3.0103;FS=0;MLEAC=2;MLEAF=1;MQ=34.02;QD=25.36;SOR=2.494;gnomAD_WG_AC=14710;gnomAD_WG_AC_POPMAX=159;**gnomAD_WG_AF=0.1236**;gnomAD
_WG_AF_POPMAX=0.2265;gnomAD_WG_AN=119006;gnomAD_WG_AN_POPMAX=702;gnomAD_WG_POPMAX=ami;gnomAD_WG_filterStatus=Pass;gnomAD_WG_lcr	GT:AD:DP:GQ:PL	1/1:0,11:11:33:495,33,0
@brentp
Copy link
Owner

brentp commented Jul 19, 2024

Hi, I see what you mean. That behavior is defined here: https://github.com/brentp/vcfgo/blob/master/variant.go#L186-L212
and here: https://github.com/brentp/vcfgo/blob/master/variant.go#L288 for QUAL.

maybe it's best to change all formatting to '%.6g' to match htslib

@jomoxi
Copy link
Author

jomoxi commented Jul 26, 2024

Thanks a lot! I see the problem
I've cloned vcfanno and vcfgo repos locally and tried to compile them with the modifications in variant.go but, since I don't have experience with go, I've not succeeded.
Do you think it's worth releasing a new version of variant.go with this change?
Thanks again

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