From ce698ac8cf1359bc9664d42fc740596ae9cb75e4 Mon Sep 17 00:00:00 2001 From: Shing Zhan Date: Sun, 25 Feb 2024 20:41:09 +0000 Subject: [PATCH] Print rounded results --- python/tests/beagle_numba.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/tests/beagle_numba.py b/python/tests/beagle_numba.py index 855f103880..f0180b4d69 100644 --- a/python/tests/beagle_numba.py +++ b/python/tests/beagle_numba.py @@ -766,7 +766,7 @@ def write_vcf(ref_ts, impdata, out_file, chr_name="1"): for i in range(impdata.num_sites): a1, ap1, a2, ap2 = impdata.get_alleles_at_site(i) gt_probs, dosages = compute_individual_scores(a1, ap1, a2, ap2) - ar2 = compute_estimated_allelic_r_squared(gt_probs) + ar2 = round(compute_estimated_allelic_r_squared(gt_probs), 2) line_str = "" line_str += chr_name + "\t" line_str += impdata.site_pos[i] + "\t" @@ -782,8 +782,8 @@ def write_vcf(ref_ts, impdata, out_file, chr_name="1"): filter_str = "PASS" line_str += filter_str + "\t" # INFO - dr2 = 0 - af = 0 + dr2 = round(0, 2) + af = round(0, 2) info_str = f"AR2{ar2};DR2{dr2};AF{af}" line_str += info_str + "\t" # FORMAT