jiarong / VirSorter2

customizable pipeline to identify viral sequences from (meta)genomic data
GNU General Public License v2.0
219 stars 30 forks source link

ModuleNotFoundError: No module named 'sklearn.preprocessing._data' #55

Open liupfskygre opened 3 years ago

liupfskygre commented 3 years ago

Hi, with a new install of virsorter2, I always get this error,

cat /home/dell/projects/Zanglin_virus/test.out/log/iter-0/step3-classify/all-score-RNA.log
Traceback (most recent call last):
  File "/home/dell/.conda/envs/VS2_1/lib/python3.6/site-packages/virsorter/./scripts/classify.py", line 77, in <module>
    main()
  File "/home/dell/.conda/envs/VS2_1/lib/python3.6/site-packages/virsorter/./scripts/classify.py", line 60, in main
    model = joblib.load(model_f)
  File "/home/dell/.conda/envs/vibrant/lib/python3.7/site-packages/joblib/numpy_pickle.py", line 585, in load
    obj = _unpickle(fobj, filename, mmap_mode)
  File "/home/dell/.conda/envs/vibrant/lib/python3.7/site-packages/joblib/numpy_pickle.py", line 504, in _unpickle
    obj = unpickler.load()
  File "/home/dell/.conda/envs/vibrant/lib/python3.7/pickle.py", line 1088, in load
    dispatch[key[0]](self)
  File "/home/dell/.conda/envs/vibrant/lib/python3.7/pickle.py", line 1385, in load_stack_global
    self.append(self.find_class(module, name))
  File "/home/dell/.conda/envs/vibrant/lib/python3.7/pickle.py", line 1426, in find_class
    __import__(module, level=0)
ModuleNotFoundError: No module named 'sklearn.preprocessing._data'

any idea on what's going wrong here, thanks.

jiarong commented 3 years ago

What command line did you use? Did you run it interactively or submit as a job?

liupfskygre commented 3 years ago

Hi, Jia rong, thanks for quick reply I submit a job with the following command,

virsorter run -w test.out -i test.fa -j 36 all --prep-for-dramv --min-length 5000 -d /home/dell/bio_db/virsorter2_db/db &> test.vs2.log

I have vs2 running properly by install with

conda create -n vs2 -c bioconda virsorter=2.1

then by checking all dependency one by one, mainly here

imbalanced-learn pandas seaborn hmmer==3.3 prodigal screed ruamel.yaml click mamba

I think it is the conda install do not have all dependency installed, one thing you may consider to improve.

best, Pengfei

jiarong commented 3 years ago

Can you try to run the virsorter run command interactively in terminal and see if it works?

liupfskygre commented 3 years ago

Hi, Jiarong thanks for your reply. I did not try interactively yet since I have virsorter run successfully after manually checking some dependency. what is difference between the interactively way and how to run virsorter run interactively? do you have toturial somewhere? Pengfei

jiarong commented 3 years ago

Running interactively means not submitting it as a batch job, just copy and paste the commands in terminal. If you submit as job, the env setup the tutorial might be changed, which varies depending on the specific job managing software. Consult you server admin if you have any issues with that. The "interactive way" tutorials are the one shown in the README and should be working without modifying dependencies.

zwmuam commented 2 years ago

(...) since I have virsorter run successfully after manually checking some dependency. (...)

Could you specify the mentioned dependency? I've encountered the same problem.