From 1734e66dbfcd7d15399953ed8d227ae2a92084d4 Mon Sep 17 00:00:00 2001 From: Chienchi Lo Date: Fri, 26 May 2023 16:58:53 -0600 Subject: [PATCH] fix bug: cannot concat str with Nonetype --- amplicov/amplicov | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/amplicov/amplicov b/amplicov/amplicov index 4977589..8e21a56 100755 --- a/amplicov/amplicov +++ b/amplicov/amplicov @@ -167,10 +167,10 @@ def parse_gff_file(input,RefID): continue annotations = dict(x.split("=") for x in gffline[8].split(";")) for i in range(int(gffline[3]),int(gffline[4])+1): - anno_dict[i]['name']= annotations['Name'] if 'Name' in annotations else None - anno_dict[i]['locus_tag']= annotations['locus_tag'] if 'locus_tag' in annotations else None - anno_dict[i]['product']= annotations['product'] if 'product' in annotations else None - anno_dict[i]['protein_id']= annotations['protein_id'] if 'protein_id' in annotations else None + anno_dict[i]['name']= annotations['Name'] if 'Name' in annotations else '' + anno_dict[i]['locus_tag']= annotations['locus_tag'] if 'locus_tag' in annotations else '' + anno_dict[i]['product']= annotations['product'] if 'product' in annotations else '' + anno_dict[i]['protein_id']= annotations['protein_id'] if 'protein_id' in annotations else '' f.close() return anno_dict