bobeobibo / phigaro

Phigaro is a scalable command-line tool for predicting phages and prophages
MIT License
46 stars 15 forks source link

Config file error #22

Closed snayfach closed 3 years ago

snayfach commented 3 years ago

I've run into the error when using the -c option (to avoid running the setup script):

$ phigaro -c config.yml -f $FNA -o out/${SLURM_ARRAY_TASK_ID} --not-open -t 4 -e tsv
Traceback (most recent call last):
  File "/global/home/users/snayfach/.conda/envs/phigaro_env/bin/phigaro", line 8, in <module>
    sys.exit(main())
  File "/global/home/users/snayfach/.conda/envs/phigaro_env/lib/python3.7/site-packages/phigaro/cli/batch.py", line 206, in main
    hmmer_task=hmmer_task,
  File "/global/home/users/snayfach/.conda/envs/phigaro_env/lib/python3.7/site-packages/phigaro/cli/batch.py", line 35, in create_task
    task = task_class(*args, **kwargs)
  File "/global/home/users/snayfach/.conda/envs/phigaro_env/lib/python3.7/site-packages/phigaro/batch/task/run_phigaro.py", line 35, in __init__
    super().__init__()
  File "/global/home/users/snayfach/.conda/envs/phigaro_env/lib/python3.7/site-packages/phigaro/batch/task/base.py", line 25, in __init__
    self._prepare()
  File "/global/home/users/snayfach/.conda/envs/phigaro_env/lib/python3.7/site-packages/phigaro/batch/task/run_phigaro.py", line 44, in _prepare
    'threshold_min_%s' % self.mode
KeyError: 'threshold_min_basic'

My config file looks like:

hmmer:
  bin: /global/home/users/snayfach/.conda/envs/phigaro_env/bin/hmmsearch
  e_value_threshold: 0.00445
  pvog_path: /global/scratch/snayfach/projects/checkv/4_imgvr_dtrs/2_run_tools/phigaro/phigaro-db/allpvoghmms
phigaro:
  penalty_black: 2.2
  penalty_white: 0.7
  threshold_max: 46.0
  threshold_min: 45.39
  window_len: 32
prodigal:
  bin: /global/home/users/snayfach/.conda/envs/phigaro_env/bin/prodigal

Is there an easy fix to this?

PollyTikhonova commented 3 years ago

Hello, this problem will be solved if you use the given file: https://github.com/bobeobibo/phigaro/blob/master/config.yml

I am sorry, I forgot to update this part of READ.me while updating Phigaro up to 2.x.x version, I correct it now.

And thank you for the interest in our tool!)