Commit e626a12c authored by hmueller's avatar hmueller
Browse files

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

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