We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 16ef234 + cfc343c commit fb44a71Copy full SHA for fb44a71
vcf_utils/extract_strelka_somatic_DP_AF.py
@@ -58,5 +58,8 @@
58
refCounts = int(variant.format[vtype]["TAR"].split(",")[0])
59
altCounts = int(variant.format[vtype]["TIR"].split(",")[0])
60
variant.format[vtype]["AD"] = str(refCounts) + "," + str(altCounts)
61
- variant.format[vtype]["AF"] = str(round(altCounts / float(refCounts + altCounts), 2))
+ if refCounts + altCounts != 0:
62
+ variant.format[vtype]["AF"] = str(round(altCounts / float(refCounts + altCounts), 2))
63
+ else:
64
+ variant.format[vtype]["AF"] = "0.00"
65
f_vcf_out.write(variant.write(somatic=True))
0 commit comments