Closed wutron closed 1 year ago
Thanks for reporting @wutron ! Fancy creating a PR with a fix for this issue and #369 ? Your timing is great because I am planning to release tomorrow.
Fixed in https://github.com/nf-core/viralrecon/pull/370
Invited you to become a member of the nf-core Github org too. Thanks for providing the fix! Fancy reviewing and approving the PR? You will be able to test dev
once that PR is merged to confirm everything is ok.
nextflow pull nf-core/viralrecon -r dev
nextflow run nf-core/viralrecon <YOUR_PARAMETERS> -r dev
Description of the bug
When read depth is very high,
ivar variants
outputs depth in scientific notation.variants_long_table
reports only the part of the number before the decimal, resulting in inaccurate depths and allele frequencies.I believe the issue can be resolved by modifying https://github.com/nf-core/viralrecon/blob/master/bin/ivar_variants_to_vcf.py#L123 to
INFO = f"DP={int(float(line[11]))}"
to always report depth in vcf as an integer.$ grep 'e+' out/variants/ivar/ww.tsv
$ awk -F, '$10>1' out/variants/ivar/variants_long_table.csv
Command used and terminal output
No response
Relevant files
No response
System information
Nextflow version: 19.01.0.5050 Hardware: Cloud VM Executor: local Container engine: Docker OS: Linux Version of nf-core/viralrecon: 2.5