phac-nml / staramr

Scans genome contigs against the ResFinder, PlasmidFinder, and PointFinder databases.
Apache License 2.0
116 stars 26 forks source link

staramr db info error #129

Closed srosales712 closed 3 years ago

srosales712 commented 3 years ago

Hi, I installed staramr by running conda create -c bioconda --name staramr staramr==0.7.2 I then tested the database installation by running staramr db info, which resulted in the error below.

$ staramr db info 2021-01-07 15:10:42 ERROR: Could not run mlst, error b'perl: symbol lookup error: /space/home/rosales/perl5/lib/perl5/x86_64-linux-thread-multi/auto/List/MoreUtils/MoreUtils.so: undefined symbol: Perl_xs_apiversion_bootcheck' Traceback (most recent call last): File "/space/home/rosales/miniconda3/envs/staramr/lib/python3.7/site-packages/staramr/blast/JobHandler.py", line 202, in _get_mlst_version output = subprocess.run(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=True) File "/space/home/rosales/miniconda3/envs/staramr/lib/python3.7/subprocess.py", line 512, in run output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['mlst', '--version']' returned non-zero exit status 127.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/space/home/rosales/miniconda3/envs/staramr/bin/staramr", line 68, in args.run_command(args) File "/space/home/rosales/miniconda3/envs/staramr/lib/python3.7/site-packages/staramr/subcommand/Database.py", line 298, in run database_info['mlst_version'] = JobHandler.get_mlst_version(JobHandler) File "/space/home/rosales/miniconda3/envs/staramr/lib/python3.7/site-packages/staramr/blast/JobHandler.py", line 257, in get_mlst_version return self._get_mlst_version(self) # type: ignore File "/space/home/rosales/miniconda3/envs/staramr/lib/python3.7/site-packages/staramr/blast/JobHandler.py", line 212, in _get_mlst_version raise Exception('Could not run mlst, error {}'.format(err_msg)) Exception: Could not run mlst, error b'perl: symbol lookup error: /space/home/rosales/perl5/lib/perl5/x86_64-linux-thread-multi/auto/List/MoreUtils/MoreUtils.so: undefined symbol: Perl_xs_apiversion_bootcheck'

(staramr) [rosales@gattaca 2018_TissueLoss]$ staramr --version staramr 0.7.2

(staramr) [rosales@gattaca 2018_TissueLoss]$ python --version Python 3.7.9

Any idea what may be the problem. Thanks!

Stephanie

srosales712 commented 3 years ago

I found a solution to this issue in https://github.com/bioconda/bioconda-recipes/issues/4390 The problem was resolved by running PERL5LIB="" on my terminal and then running staramr db info.

apetkau commented 3 years ago

Thank you for updating this issue with your solution @srosales712. And sorry for the lack of response, I must have missed this issue.

I do sometimes encounter issues with Perl and certain Perl libraries when they're all installed via conda. I sometimes have to downgrade Perl to the version that the Perl library (installed via conda) expects. I'm not sure if it is related to your issue but it sounds like you found a different solution anyways.

FeMa94 commented 1 year ago

Hi, I'm having a similar error with staramr version 0.10.0.dev0 and python 3.9. In particular when I test the database installation by running staramr db info , I have the error below:

:~/staramr$ staramr db info 2023-03-02 11:08:22 ERROR: [Errno 2] No such file or directory: 'mlst' Traceback (most recent call last): File "/home/federica/anaconda3/bin/staramr", line 68, in args.run_command(args) File "/home/federica/anaconda3/lib/python3.9/site-packages/staramr/subcommand/Database.py", line 304, in run write_database_info(database_repos) File "/home/federica/anaconda3/lib/python3.9/site-packages/staramr/subcommand/Database.py", line 291, in write_database_info database_info['mlst_version'] = JobHandler.get_mlst_version(JobHandler) File "/home/federica/anaconda3/lib/python3.9/site-packages/staramr/blast/JobHandler.py", line 257, in get_mlst_version return self._get_mlst_version(self) # type: ignore File "/home/federica/anaconda3/lib/python3.9/site-packages/staramr/blast/JobHandler.py", line 202, in _get_mlst_version output = subprocess.run(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=True) File "/home/federica/anaconda3/lib/python3.9/subprocess.py", line 505, in run with Popen(*popenargs, **kwargs) as process: File "/home/federica/anaconda3/lib/python3.9/subprocess.py", line 951, in init self._execute_child(args, executable, preexec_fn, close_fds, File "/home/federica/anaconda3/lib/python3.9/subprocess.py", line 1821, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'mlst'

Any idea what may be the problem? Thanks!

Federica