Skip to content

Commit 4b45f4f

Browse files
author
Jan Ludwiczak
committed
Revert "change decoding prediction function"
This reverts commit 318a47d.
1 parent 318a47d commit 4b45f4f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

utils.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,11 @@ def enc_pssm(pssm_file, pad_length=None, pad_left=0):
7272

7373
# Decodes predictions (takes into the account padding of sequence)
7474
def decode(pred, enc_seq):
75-
return np.delete(pred, np.where(~enc_seq.any(axis=1)), axis=0)[:,1]
75+
decoded_pred = []
76+
for pos_pred, pos_seq in zip(pred, enc_seq):
77+
if not np.array_equal(pos_seq, np.zeros(40)):
78+
decoded_pred.append(pos_pred)
79+
return np.asarray(decoded_pred)
7680

7781
# Pipred model architecture
7882
def PiPred_Model():

0 commit comments

Comments
 (0)