Closed josemanuel097 closed 6 years ago
Looks like the file you provided in the labels_train source in WORC is not formatted correctly. It should be a text file, in which the first column is headed patient and contains the patientnames. The other columns should head the label name and contain the labels, e.g.:
Patient Label1 Label2 Pname1 1 0 Pname2 3 5 Pname3 0 1
Note: as the fields are separated by spaces, you cannot use spaces in the patient names!
I will implement a catch for this in PREDICT.
That fixed the issue. Thanks .
Traceback (most recent call last): File "/home/jose/anaconda3/envs/worc_pro/lib/python2.7/site-packages/WORC/resources/fastr_tools/predict/bin/TrainClassifier.py", line 64, in
main()
File "/home/jose/anaconda3/envs/worc_pro/lib/python2.7/site-packages/WORC/resources/fastr_tools/predict/bin/TrainClassifier.py", line 60, in main
fixedsplits=args.fs)
File "/home/jose/anaconda3/envs/worc_pro/lib/python2.7/site-packages/PREDICT/trainclassifier.py", line 120, in trainclassifier
load_features(feat_train, patientinfo_train, label_type)
File "/home/jose/anaconda3/envs/worc_pro/lib/python2.7/site-packages/PREDICT/trainclassifier.py", line 276, in load_features
label_type, modnames)
File "/home/jose/anaconda3/envs/worc_pro/lib/python2.7/site-packages/PREDICT/IOparser/file_io.py", line 77, in load_data
image_features)
File "/home/jose/anaconda3/envs/worc_pro/lib/python2.7/site-packages/PREDICT/genetics/genetic_processing.py", line 179, in findmutationdata
mutation_data_temp = load_mutation_status(patientinfo, mutation_type)
File "/home/jose/anaconda3/envs/worc_pro/lib/python2.7/site-packages/PREDICT/genetics/genetic_processing.py", line 41, in load_mutation_status
genetic_file)
File "/home/jose/anaconda3/envs/worc_pro/lib/python2.7/site-packages/PREDICT/genetics/genetic_processing.py", line 79, in load_genetic_file
data = np.loadtxt(input_file, np.str)
File "/home/jose/anaconda3/envs/worc_pro/lib/python2.7/site-packages/numpy/lib/npyio.py", line 1101, in loadtxt
for x in read_data(_loadtxt_chunksize):
File "/home/jose/anaconda3/envs/worc_pro/lib/python2.7/site-packages/numpy/lib/npyio.py", line 1025, in read_data
% line_num)
ValueError: Wrong number of columns at line 2