macsy-models / TXSScan

Bacterial secretion systems and Type IV-filament models for MacsyFinder
Other
2 stars 1 forks source link

FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/share/macsyfinder/data/models' #1

Closed dineshkumarsrk closed 2 years ago

dineshkumarsrk commented 3 years ago

Macsyfinder version

Macsyfinder 2.0rc1
Python 3.6.9 (default, Jan 26 2021, 15:33:00) [GCC 8.4.0]
NetworkX 2.5.1
MacsyFinder is distributed under the terms of the GNU General Public License (GPLv3).
See the COPYING file for details.

If you use this software please cite:
Abby SS, Néron B, Ménager H, Touchon M, Rocha EPC (2014)
MacSyFinder: A Program to Mine Genomes for Molecular Systems with an Application to CRISPR-Cas Systems.
PLoS ONE 9(10): e110726. doi:10.1371/journal.pone.0110726

and don't forget to cite models used:
macsydata cite
OS
Linux : Ubuntu 18.04

I tried to install the TXSS model using macsydata by following the command macsydata install TXSS-1.0rc1.tar.gz macsydata install TXSS and end up with an error as follows,

dbtserver@dbtserver-CELSIUS-R970:/home/hdd2/dinesh/tools/macsyfinder$ macsydata install TXSS-1.0rc1.tar.gz 
Traceback (most recent call last):
  File "/home/dbtserver/.local/bin/macsydata", line 11, in <module>
    sys.exit(main())
  File "/home/dbtserver/.local/lib/python3.6/site-packages/macsypy/scripts/macsydata.py", line 803, in main
    parsed_args.func(parsed_args)
  File "/home/dbtserver/.local/lib/python3.6/site-packages/macsypy/scripts/macsydata.py", line 252, in do_install
    inst_pack_loc = _find_installed_package(pack_name)
  File "/home/dbtserver/.local/lib/python3.6/site-packages/macsypy/scripts/macsydata.py", line 228, in _find_installed_package
    registry = _find_all_installed_packages()
  File "/home/dbtserver/.local/lib/python3.6/site-packages/macsypy/scripts/macsydata.py", line 213, in _find_all_installed_packages
    for model_loc in scan_models_dir(model_dir, profile_suffix=config.profile_suffix):
  File "/home/dbtserver/.local/lib/python3.6/site-packages/macsypy/registries.py", line 71, in scan_models_dir
    for models_type in os.listdir(models_dir):
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/share/macsyfinder/data/models'

I got proper displays when I use macsydata available macsydata -h macsydata download TXSS. But, after downloading TXSS, i could not install it. I am in need of using your tool for my research work. please help me to fix the issue.

Thank you in advance.

saphia commented 3 years ago

Hi,

I am not sure what series of command you've used.

macsydata is made to automatically fetch from the repo, and install the macsy-model package. Thus, the only command line you should run is:

macsydata install TXSS

And this should do the job! See here for more details (and let us know if we could improve the doc if this was not clear for you...)

Could you please try this and see if this works?

Thanks!

Sophie

dineshkumarsrk commented 2 years ago

Thank you @saphia , for your prompt response on my request. The manual doc provided here is very clear and easily understandable. However, while following the manual I ended up with the error. I just reproduced the error statement with the error messages here.

dinesh@dinesh7k:~$ macsydata search TXSS
TXSS (1.0rc1)              - TXSScan - Models for 15 types of bacterial protein secretion systems and appendages (T1SS, T2SS, T3SS, T4P, pT4SS, T5SSs, T6SSs, Flagellum, Tad pilus, T9SS).
dinesh@dinesh7k:~$ macsydata search -S secretion
TXSS (1.0rc1)              - TXSScan - Models for 15 types of bacterial protein secretion systems and appendages (T1SS, T2SS, T3SS, T4P, pT4SS, T5SSs, T6SSs, Flagellum, Tad pilus, T9SS).
dinesh@dinesh7k:~$ macsydata install TXSS
Traceback (most recent call last):
  File "/home/dinesh/.local/bin/macsydata", line 11, in <module>
    sys.exit(main())
  File "/home/dinesh/.local/lib/python3.6/site-packages/macsypy/scripts/macsydata.py", line 803, in main
    parsed_args.func(parsed_args)
  File "/home/dinesh/.local/lib/python3.6/site-packages/macsypy/scripts/macsydata.py", line 252, in do_install
    inst_pack_loc = _find_installed_package(pack_name)
  File "/home/dinesh/.local/lib/python3.6/site-packages/macsypy/scripts/macsydata.py", line 228, in _find_installed_package
    registry = _find_all_installed_packages()
  File "/home/dinesh/.local/lib/python3.6/site-packages/macsypy/scripts/macsydata.py", line 213, in _find_all_installed_packages
    for model_loc in scan_models_dir(model_dir, profile_suffix=config.profile_suffix):
  File "/home/dinesh/.local/lib/python3.6/site-packages/macsypy/registries.py", line 71, in scan_models_dir
    for models_type in os.listdir(models_dir):
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/share/macsyfinder/data/models'

I have a problem with the command macsydata install TXSS, therefore, please help me to fix this issue.

bneron commented 2 years ago

I will investigate the problem. But I propose a workaround for now. Install the models in your home with the following command macsydata install -u TXSS

dineshkumarsrk commented 2 years ago

Thank you @bneron for your suggestion. I followed your comment, however end up with the same error as mentioned above.

dinesh@dinesh7k:/home$ macsydata install -u TXSS
Traceback (most recent call last):
  File "/home/dinesh/.local/bin/macsydata", line 11, in <module>
    sys.exit(main())
  File "/home/dinesh/.local/lib/python3.6/site-packages/macsypy/scripts/macsydata.py", line 803, in main
    parsed_args.func(parsed_args)
  File "/home/dinesh/.local/lib/python3.6/site-packages/macsypy/scripts/macsydata.py", line 252, in do_install
    inst_pack_loc = _find_installed_package(pack_name)
  File "/home/dinesh/.local/lib/python3.6/site-packages/macsypy/scripts/macsydata.py", line 228, in _find_installed_package
    registry = _find_all_installed_packages()
  File "/home/dinesh/.local/lib/python3.6/site-packages/macsypy/scripts/macsydata.py", line 213, in _find_all_installed_packages
    for model_loc in scan_models_dir(model_dir, profile_suffix=config.profile_suffix):
  File "/home/dinesh/.local/lib/python3.6/site-packages/macsypy/registries.py", line 71, in scan_models_dir
    for models_type in os.listdir(models_dir):
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/share/macsyfinder/data/models'

If it possible, please add the installed models in your docker images, so that we can use it without any installation issues.

bneron commented 2 years ago

We will not provide models in docker as there are many models and evolve quickly, and some models are not provide by us but third party. but this message means that something wrong during the macsyfinder installation How did you install macsyfinder?

dineshkumarsrk commented 2 years ago

@bneron I have installed the macsyfinder by using the command pip3 install macsyfinder . Though I have successfully installed the macsyfinder, but I ended up with an error as AttributeError: module 'colorlog' has no attribute 'logging' As per the instruction given by you #40, I have downgraded the colorlog to 4.8.0 by using the command pip3 install colorlog==4.8.0 This is how I installed the macsyfinder, however, now I am facing the problem while installing the TXSS module as mentioned above. Please help me to fix this issue.

bneron commented 2 years ago

do you ran the command pip3 install macsyfinder with the root permission like sudo pip3 install macsyfinder ?

dineshkumarsrk commented 2 years ago

Thank you @bneron With sudo pip3 install macsyfinder command, I could able to successfully install the TXSS model. Earlier, I faced the installation issue because, I have installed macsyfinder without sudo command. Now it works perfectly.