Closed saskra closed 5 years ago
It should be part of the download. It's a file in the tarball that is downloaded and unpacked. What are the contents of the directory? Maybe there's an issue with how we're unpacking the file on Windows.
(btw: No difference between Windows and Linux.)
Are you hitting this issue on Linux as well?
What are the contents of the directory?
The directory "C:\Users\XXX\AppData\Local\mhcflurry\mhcflurry\4\1.2.0\models_class1\models" is empty.
Are you hitting this issue on Linux as well?
Yes, but the download was done via Windows as my Linux is currently offline.
Maybe there's an issue with how we're unpacking the file on Windows.
This might actually be the problem - manually downloading and unpacking the file helped. At least it lead further to the next error being:
(mhcflurry) C:\>mhcflurry-predict --alleles HLA-A0201 HLA-A0301 --peptides SIINFEKL SIINFEKD SIINFEKQ --out /tmp/predictions.csv
Traceback (most recent call last):
File "XXX\Scripts\mhcflurry-predict-script.py", line 11, in <module> load_entry_point('mhcflurry==1.2.2', 'console_scripts', 'mhcflurry-predict')()
File "XXX\lib\site-packages\mhcflurry-1.2.2-py3.6.egg\mhcflurry\predict_command.py", line 206, in run
File "XXX\lib\site-packages\mhcflurry-1.2.2-py3.6.egg\mhcflurry\class1_affinity_predictor.py", line 996, in predict_to_dataframe
File "XXX\lib\site-packages\mhcflurry-1.2.2-py3.6.egg\mhcflurry\class1_neural_network.py", line 774, in predict
File "XXX\lib\site-packages\mhcflurry-1.2.2-py3.6.egg\mhcflurry\class1_neural_network.py", line 239, in network
File "XXX\lib\site-packages\mhcflurry-1.2.2-py3.6.egg\mhcflurry\class1_neural_network.py", line 321, in load_weights
File "XXX\lib\site-packages\mhcflurry-1.2.2-py3.6.egg\mhcflurry\class1_affinity_predictor.py", line 1066, in load_weights
File "XXX\lib\site-packages\numpy\lib\npyio.py", line 384, in load fid = open(file, "rb")
OSError: [Errno 22] Invalid argument: 'C:\\Users\\XXX\\AppData\\Local\\mhcflurry\\mhcflurry\\4\\1.2.0\\models_class1\\models\\weights_HLA-A*02:01-0-bff74107e39ddcc1.npz'
(mhcflurry) C:\
(Same on Linux.)
Actually, in this directory there is a file called "weights_HLA-A_02_01-0-bff74107e39ddcc1.npz" which seems to be meant. How can I make mhcflurry recognize that one? (Shall I rename the issue or open a new one?)
Ah I guess unpacking on Windows may have removed the special characters like *
and :
from the filenames? That is kind of bad on our part to have characters like that in the filenames. We can fix that in the next models release but that may not be for some time. For now one thing you can try is modifying manifest.csv to remove the '*' and ':' characters from the model names, so they match the file names.
One word of warning though: as you can probably tell, we don't test on windows. Happy to help you when possible but I don't have a good way of testing on windows so you may keep hitting various issues. Docker may be a better way to go.
we don't test on windows
I only wanted to use Windows for the download part due to offline Linux. Unfortunately, downloading seems to be linked with unpacking and this does not work as expected on Windows. Manually downloading on Windows and manually unpacking on Linux is inconvenient - but it works...
Is there a way to use the download script for "download only"? It even crashes when trying to unpack.
Extracting: 0%| | 0/1659 [00:00<?, ?it/s]
Traceback (most recent call last):
File "XXX\Scripts\mhcflurry-downloads-script.py", line 11, in <module> load_entry_point('mhcflurry==1.2.2', 'console_scripts', 'mhcflurry-downloads')()
File "XXX\lib\site-packages\mhcflurry-1.2.2-py3.6.egg\mhcflurry\downloads_command.py", line 106, in run
File "XXX\lib\site-packages\mhcflurry-1.2.2-py3.6.egg\mhcflurry\downloads_command.py", line 222, in fetch_subcommand
File "XXX\lib\tarfile.py", line 2008, in extractall numeric_owner=numeric_owner)
File "XXX\lib\tarfile.py", line 2050, in extract numeric_owner=numeric_owner)
File "XXX\lib\tarfile.py", line 2120, in _extract_member self.makefile(tarinfo, targetpath)
File "XXX\lib\tarfile.py", line 2161, in makefile with bltn_open(targetpath, "wb") as target:
OSError: [Errno 22] Invalid argument: 'C:\\Users\\XXX\\AppData\\Local\\mhcflurry\\mhcflurry\\4\\1.2.0\\models_class1_selected_no_mass_spec\\models\\weights_HLA-A*26:01-11-a27e2cd3e6978963.npz'
Sorry we we couldn't help with this. I don't have a windows machine to debug these issues on but we'd certainly consider PRs to improve windows compatibility
I am testing the workflow from the README.md, but it gets stuck at the third command although installation and download worked well. (btw: No difference between Windows and Linux.) Here is what I get:
The error message is "true" - the directory exists, but the file does not. But where should it come from: Was it part of the download, or should it have been created during the prediction?