Skip to content
Snippets Groups Projects
Commit e626a12c authored by hmueller's avatar hmueller
Browse files

Prevent writing of empty string to json if mature lookup fails.

parent 4dda3c47
Branches
No related tags found
No related merge requests found
...@@ -45,12 +45,10 @@ with open(filename) as f: ...@@ -45,12 +45,10 @@ with open(filename) as f:
}) })
if include_mature: if include_mature:
mature_seq = ''
try: try:
mature_seq = mature[split[0]] results[-1]['mature sequence'] = mature[split[0]]
except ValueError: except ValueError:
print('SignalP Converter: No mature sequence received for protein: {}, although signal peptide present!'.format(split[0])) print('SignalP Converter: No mature sequence received for protein {}, although signal peptide present!'.format(split[0]))
results[-1]['mature sequence'] = mature_seq
else: else:
results.append({'signalpeptide': False}) results.append({'signalpeptide': False})
else: else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment