From 677d04d9866780971acff2383a712941a0f495b5 Mon Sep 17 00:00:00 2001 From: ViralVerity Date: Fri, 28 Jun 2024 16:30:31 +0200 Subject: [PATCH] new fix --- denv_pipeline/scripts/make_summary_files.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/denv_pipeline/scripts/make_summary_files.py b/denv_pipeline/scripts/make_summary_files.py index 164c4b6..5382404 100644 --- a/denv_pipeline/scripts/make_summary_files.py +++ b/denv_pipeline/scripts/make_summary_files.py @@ -206,8 +206,13 @@ def pull_low_coverage_seqs(config, all_coverage, high_coverage): lst.append(cov) in_order = sorted(lst, reverse=True) - if in_order[0] > (in_order[1] + 5): - top = [i for i in cov_dict if cov_dict[i]==in_order[0]][0] + if len(in_order) > 1: + if in_order[0] > (in_order[1] + 5): + top = [i for i in cov_dict if cov_dict[i]==in_order[0]][0] + else: + top = "NA" + elif len(in_order) == 1: + top = in_order[0] else: top = "NA"