From 3a7b74588edc881e5a274efdc4894f4559addacf Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Fri, 8 Oct 2021 16:02:41 +0200 Subject: [PATCH] gff3 allow trailing ; in last column example: https://github.com/galaxyproject/tools-iuc/blob/7998bbefd9bfd03bc0e92a922297b503832c0419/tools/aegean/test-data/TAIR10_GFF3_genes.gff#L7 note: clearly the example is gff2 but its used by the tool as gff3 wondering if this function should also be called in the Gff sniffer --- lib/galaxy/datatypes/util/gff_util.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/galaxy/datatypes/util/gff_util.py b/lib/galaxy/datatypes/util/gff_util.py index 7656870f02c..0092d478b7e 100644 --- a/lib/galaxy/datatypes/util/gff_util.py +++ b/lib/galaxy/datatypes/util/gff_util.py @@ -369,7 +369,10 @@ def parse_gff3_attributes(attr_str): attributes_list = attr_str.split(";") attributes = {} for tag_value_pair in attributes_list: - pair = tag_value_pair.strip().split("=") + tag_value_pair = tag_value_pair.strip() + if tag_value_pair == '': + continue + pair = tag_value_pair.split("=") if len(pair) == 1: raise Exception("Attribute '%s' does not contain a '='" % tag_value_pair) if pair == '':