bioinfo-ut / PhenotypeSeeker

Identify phenotype-specific k-mers and predict phenotype using sequenced bacterial strains
GNU General Public License v3.0
18 stars 10 forks source link

Problem with prediction #10

Closed ctparson closed 4 years ago

ctparson commented 4 years ago

I have the package installed and the modeling component seems to have run satisfactorily, however whenever I try to run the prediction either with the sample data set or with the model I generated I get the error pasted below. Any assistance would be greatly appreciated.

Traceback (most recent call last): File "/usr/local/bin/phenotypeseeker", line 301, in Main() File "/usr/local/bin/phenotypeseeker", line 295, in Main args.func(args) File "/usr/local/lib/python3.6/dist-packages/PhenotypeSeeker/prediction.py", line 145, in prediction map_samples_prediction(samples, args.l, phenotypes_to_predict) AttributeError: 'Namespace' object has no attribute 'l'

erkiaun commented 4 years ago

Fixed the bug. Hope it works now.

ctparson commented 4 years ago

Hey, thanks for getting to this so quickly. We tried the updated version and are still getting an error, albeit a different one, pasted below. Again if there is any help you could offer it would be greatly appreciated, thank you again for all the help on this.

Segmentation fault (core dumped) Segmentation fault (core dumped) Segmentation fault (core dumped) Segmentation fault (core dumped) Segmentation fault (core dumped) Segmentation fault (core dumped) Segmentation fault (core dumped) Segmentation fault (core dumped) Segmentation fault (core dumped) Segmentation fault (core dumped) Traceback (most recent call last): File "/usr/local/bin/phenotypeseeker", line 301, in Main() File "/usr/local/bin/phenotypeseeker", line 295, in Main args.func(args) File "/usr/local/lib/python3.6/dist-packages/PhenotypeSeeker/prediction.py", line 150, in prediction predict(samples_order, phenotypes_to_predict)
File "/usr/local/lib/python3.6/dist-packages/PhenotypeSeeker/prediction.py", line 118, in predict model = joblib.load(phenotypes_to_predict[phenotype][0]) File "/usr/local/lib/python3.6/dist-packages/joblib/numpy_pickle.py", line 605, in load obj = _unpickle(fobj, filename, mmap_mode) File "/usr/local/lib/python3.6/dist-packages/joblib/numpy_pickle.py", line 529, in _unpickle obj = unpickler.load() File "/usr/lib/python3.6/pickle.py", line 1050, in load dispatchkey[0] File "/usr/lib/python3.6/pickle.py", line 1338, in load_global klass = self.find_class(module, name) File "/usr/lib/python3.6/pickle.py", line 1392, in find_class return getattr(sys.modules[module], name) AttributeError: module 'sklearn.utils.deprecation' has no attribute 'DeprecationDict'

erkiaun commented 4 years ago

Fixed this error. It was raised because the example model was created using Python2, but the PhenotypeSeeker is now upgraded to use Python3.