Hi everyone,
I am trying to use Beacon Network Inference tool (https://github.com/BeaconProjectAtVirginiaTech/beacon_network_inference.git) in order to predict the direct or indirect targets of transcription factors. When I executed the file called evaluation.py, i got this error:
Traceback (most recent call last): File "evaluation.py", line 80, in <module> main() File "evaluation.py", line 44, in main y_train.append(int(info[-1])) ValueError: invalid literal for int() with base 10: '-0.953618'
To run this tool, it requires two files called positive.txt and negative.txt which I have included here (Or you can get these files from the tool in folder called svm/fus3). Moreover, the command line that I used was: python evaluation.py --trainFile pos_1.txt --testFile neg_2.txt
For positive file.txt
AT3G14067 -1.128864 -1.283323 -0.590808 -0.083152 0.002338 -0.953618
AT1G67090 6.307772 4.221723 2.706678 2.033445 -1.752120 -2.655792
AT5G20045 0.000000 -10.053483 -7.663682 -11.033126 -11.377300 0.000000
AT1G80940 0.302549 0.081742 0.281875 1.133927 1.124760 1.890247
AT3G02470 3.371130 2.538541 2.560603 3.268237 2.655800 3.138520
AT1G54730 -1.307362 -1.218130 -1.463016 -1.110154 -2.715458 -2.397096
AT3G51890 -0.740286 -1.320471 -1.574202 -1.432614 -3.023596 -2.256556
For negative file.txt
AT3G12080 -1.294248 -3.807249 -4.238581 -3.720120 -3.932114 -1.935316
AT4G11140 -4.114085 -8.570255 -8.654330 -8.711276 -4.712420 -0.126913
AT2G28760 -4.414567 -5.709783 -6.508662 -6.478518 -11.152154 0.000000
AT5G07120 -1.791486 -2.690756 -2.890756 -2.988624 -4.116666 -2.887506
AT5G66590 -2.179326 -4.959561 -5.470245 -4.805980 -2.402196 -0.472285
AT5G08750 -1.740284 -1.883873 -2.257590 -1.830005 -2.432825 -1.460025
AT4G19640 -0.383439 -0.891730 -0.792165 0.011047 -0.214636 0.627712
AT1G78050 -0.159232 -1.112051 -1.928648 -2.238642 -3.971617 -4.610536
In addition, this is the code in evaluation.py:
with open(args.trainFile) as it: for line in it: info = line.strip().split('\t') temp = [] for i in info[1:-1]: temp.append(float(i)) y_train.append(int(info[-1])) x_train.append(temp)
#x_test is the feture vector list of testing gene pairs.
#y_test is the label of each testing gene pair.
with open(args.testFile) as it:
for line in it:
info = line.strip().split('\t')
temp = []
for i in info[1:-1]:
temp.append(float(i))
y_test.append(int(info[-1]))
x_test.append(temp)
I am not familiar with python so if anyone know how to fix this error, please help me. I really appreciate your help. Thank you in advance.
0 answers
No answers yet.
Log in to answer this question.