Skip to content

Commit

Permalink
fix bug: cannot concat str with Nonetype
Browse files Browse the repository at this point in the history
  • Loading branch information
Chienchi Lo committed May 26, 2023
1 parent 35bfdef commit 1734e66
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions amplicov/amplicov
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 1734e66

Please sign in to comment.