Skip to content

Commit be602ea

Browse files
author
Jan Ludwiczak
committed
Fix output write fail when some input sequences were filtered due to size limitations
1 parent 3d3290d commit be602ea

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

bin/deepcoil

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,15 @@ print('Predicting...')
4747
preds = dc.predict(data)
4848

4949
print('Writing output...')
50-
for entry in data.keys():
50+
51+
inp_keys = set(data.keys())
52+
out_keys = set(preds.keys())
53+
54+
if len(out_keys) < len(inp_keys):
55+
print('WARNING: Predictions for some sequences were not calculated due to length limitations and/or other errors.' \
56+
' Inspect the warnings and results carefully!')
57+
58+
for entry in out_keys:
5159
f = open(f'{args.out_path}/{entry}.out', 'w')
5260
cc_pred_raw = preds[entry]['cc']
5361
cc_pred = sharpen_preds(cc_pred_raw)

0 commit comments

Comments
 (0)