-
Notifications
You must be signed in to change notification settings - Fork 260
Open
Description
Hello developers!
I noticed that the fixref plugin (v1.22.1) will round up float numbers, and flatten small numbers to 0. Is this expected?
Example input vcf:
##fileformat=VCFv4.2
##INFO=<ID=AF,Number=A,Type=Float>
##INFO=<ID=SmallNumber,Number=A,Type=Float>
##contig=<ID=chr1,length=1000000000000>
#CHROM POS ID REF ALT QUAL FILTER INFO
chr1 55038469 . C A . . AF=0.123894357;SmallNumber=2.03e-78
Example output vcf:
##fileformat=VCFv4.2
##FILTER=<ID=PASS,Description="All filters passed">
##INFO=<ID=AF,Number=A,Type=Float>
##INFO=<ID=SmallNumber,Number=A,Type=Float>
##contig=<ID=chr1,length=1000000000000>
##INFO=<ID=FIXREF,Number=.,Type=String,Description="The change made by bcftools/fixref">
##bcftools_pluginVersion=6b463daf-dirty+htslib-1.22.1
##bcftools_pluginCommand=plugin fixref -Ov -o out.vcf -- test.vcf -f /data/human_ref/Homo_sapiens_assembly38.fasta.gz -m swap; Date=Thu Nov 27 11:11:24 2025
#CHROM POS ID REF ALT QUAL FILTER INFO
chr1 55038469 . C A . . AF=0.123894;SmallNumber=0;FIXREF=none
Notice that AF is rounded up to the sixth digit after decimal point and SmallNumber got flattened to 0.
command:
bcftools +fixref test.vcf -Ov -o out.vcf -- -f <ref> -m swapMetadata
Metadata
Assignees
Labels
No labels