Skip to content

Commit 36a181b

Browse files
committed
fixed parsing PSSM from custom msa
1 parent ab2882d commit 36a181b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pipred.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,11 @@
9090
parsed_pssm = np.genfromtxt(pssm_fn, skip_header=3, skip_footer=5, usecols=(i for i in range(2, 22)))
9191
if parsed_pssm.shape[0] == len(seq) - 2:
9292
parsed_pssm = np.genfromtxt(pssm_fn, skip_header=3, skip_footer=3, usecols=(i for i in range(2, 22)))
93-
93+
elif parsed_pssm.shape[0] != len(seq):
94+
raise ValueError
9495
except ValueError:
9596
print("ERROR: Malformed PSSM file for entry %s!" % entry)
9697
exit()
97-
98-
9998
pssm_files.append(pssm_fn)
10099

101100
print("Encoding sequences...")

0 commit comments

Comments
 (0)