From 24243c6b7deabea992650f5bfb9f6ef42d377095 Mon Sep 17 00:00:00 2001 From: jonas-fuchs Date: Wed, 13 Nov 2024 10:36:41 +0100 Subject: [PATCH] rm redundant code --- virheat/scripts/data_prep.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/virheat/scripts/data_prep.py b/virheat/scripts/data_prep.py index fd7aca2..65cfab8 100644 --- a/virheat/scripts/data_prep.py +++ b/virheat/scripts/data_prep.py @@ -309,10 +309,10 @@ def parse_gff3(file, reference): # create a new dict for each ID if identifier == "ID" and identifier not in gff3_dict: attribute_id = val - gff3_dict[gff_values[2]][attribute_id] = {} + gff3_dict[gff_values[2]][val] = {} # add attributes if identifier != "ID": - gff3_dict[gff_values[2]][attribute_id][identifier] = val.replace("\n", "") + gff3_dict[gff_values[2]][attribute_id][identifier] = val # add start, stop and strand gff3_dict[gff_values[2]][attribute_id]["start"] = int(gff_values[3]) gff3_dict[gff_values[2]][attribute_id]["stop"] = int(gff_values[4])