From 7b8c6c2a5e03a70a17bce220bf994613ed44a3fd Mon Sep 17 00:00:00 2001 From: Guillaume GAUTREAU Date: Wed, 18 Sep 2024 16:10:35 +0200 Subject: [PATCH] fix an error in the formula to calculate chao displayed on the ucurve plot --- ppanggolin/figures/ucurve.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ppanggolin/figures/ucurve.py b/ppanggolin/figures/ucurve.py index ec82f367..485055e1 100644 --- a/ppanggolin/figures/ucurve.py +++ b/ppanggolin/figures/ucurve.py @@ -39,7 +39,7 @@ def draw_ucurve(pangenome: Pangenome, output: Path, soft_core: float = 0.95, di data_plot = [] chao = "NA" if count[1]["pangenome"] > 0: - chao = round(pangenome.number_of_gene_families + ((count[0]["pangenome"] ^ 2) / (count[1]["pangenome"] * 2)), 2) + chao = round(pangenome.number_of_gene_families + (pow(count[1]["pangenome"], 2) / (count[2]["pangenome"] * 2)), 2) colors = {"pangenome": "black", "exact_accessory": "#EB37ED", "exact_core": "#FF2828", "soft_core": "#c7c938", "soft_accessory": "#996633", "shell": "#00D860", "persistent": "#F7A507", "cloud": "#79DEFF", "undefined": "#828282"}