From f397a53e3d820423f3082ce741db6c8f92bbfda2 Mon Sep 17 00:00:00 2001 From: jonas-fuchs Date: Fri, 17 Nov 2023 11:21:23 +0100 Subject: [PATCH] added error message if 'region' is missing in gff3 --- virheat/scripts/data_prep.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/virheat/scripts/data_prep.py b/virheat/scripts/data_prep.py index edea269..45ca30e 100644 --- a/virheat/scripts/data_prep.py +++ b/virheat/scripts/data_prep.py @@ -271,6 +271,8 @@ def get_genome_end(gff3_dict): genome_end = 0 + if "region" not in gff3_dict: + sys.exit("\033[31m\033[1mERROR:\033[0m Region annotation is missing in the gff3!") for attribute in gff3_dict["region"].keys(): stop = gff3_dict["region"][attribute]["stop"] if stop > genome_end: