Update claspp_forward.py
Browse files- claspp_forward.py +4 -5
claspp_forward.py
CHANGED
|
@@ -245,13 +245,12 @@ def predict(input_batches):
|
|
| 245 |
outputpreds.append(p)
|
| 246 |
return outputpreds
|
| 247 |
|
| 248 |
-
|
| 249 |
def write_output(pred,listofpeps,file_output):
|
| 250 |
hf=open(f"{file_output}",'w+')
|
| 251 |
n="\n"
|
| 252 |
-
writethisline="pep
|
| 253 |
for i in range(len(labsoi)):
|
| 254 |
-
writethisline+=pos2lab[i]
|
| 255 |
hf.write(writethisline+n)
|
| 256 |
for p,ip in zip(pred,listofpeps):
|
| 257 |
writethisline=f"{ip}"
|
|
@@ -259,9 +258,9 @@ def write_output(pred,listofpeps,file_output):
|
|
| 259 |
#print(p)
|
| 260 |
easyreadlab=getlab(p,r)
|
| 261 |
for sp in easyreadlab:
|
| 262 |
-
writethisline+=f"{sp}
|
| 263 |
|
| 264 |
-
writethisline=writethisline[
|
| 265 |
hf.write(writethisline)
|
| 266 |
hf.close()
|
| 267 |
|
|
|
|
| 245 |
outputpreds.append(p)
|
| 246 |
return outputpreds
|
| 247 |
|
|
|
|
| 248 |
def write_output(pred,listofpeps,file_output):
|
| 249 |
hf=open(f"{file_output}",'w+')
|
| 250 |
n="\n"
|
| 251 |
+
writethisline="pep"
|
| 252 |
for i in range(len(labsoi)):
|
| 253 |
+
writethisline+=','+pos2lab[i]+
|
| 254 |
hf.write(writethisline+n)
|
| 255 |
for p,ip in zip(pred,listofpeps):
|
| 256 |
writethisline=f"{ip}"
|
|
|
|
| 258 |
#print(p)
|
| 259 |
easyreadlab=getlab(p,r)
|
| 260 |
for sp in easyreadlab:
|
| 261 |
+
writethisline+=f",{sp}"
|
| 262 |
|
| 263 |
+
writethisline=writethisline[:]+n
|
| 264 |
hf.write(writethisline)
|
| 265 |
hf.close()
|
| 266 |
|