diff --git a/gene_model/collapse_annotation.py b/gene_model/collapse_annotation.py index c51ae239..e9afadb7 100644 --- a/gene_model/collapse_annotation.py +++ b/gene_model/collapse_annotation.py @@ -63,6 +63,8 @@ def __init__(self, gtfpath): attributes = defaultdict(list) for a in row[8].replace('"', '').replace('_biotype', '_type').split(';')[:-1]: kv = a.strip().split(' ') + if len(kv) < 2: + continue if kv[0]!='tag': attributes[kv[0]] = kv[1] else: