From b47a0dfdc7e7445a59eea29c3a78a412ff26a369 Mon Sep 17 00:00:00 2001 From: Suhrid Marwah Date: Fri, 17 Apr 2026 16:42:17 +0530 Subject: [PATCH] fix: guard against empty data in plot_cnv_hmm_coverage_track Signed-off-by: Suhrid Marwah --- malariagen_data/anoph/cnv_data.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/malariagen_data/anoph/cnv_data.py b/malariagen_data/anoph/cnv_data.py index 181e1b8b3..06a055e58 100644 --- a/malariagen_data/anoph/cnv_data.py +++ b/malariagen_data/anoph/cnv_data.py @@ -745,6 +745,9 @@ def plot_cnv_hmm_coverage_track( debug("remove data where HMM is not called") data = data.query("call_CN >= 0") + if len(data) == 0: + return None + debug("set up y range") if y_max == "auto": y_max_float = data["call_CN"].max() + 2