ShortBRED installation/dependency errors

When I tried to run shortbred_identify.py, I got following dependency errors:

shortbred_identify.py --goi input_prots.faa --ref ref_prots.faa --markers mytestmarkers.faa --tmp example_identify --usearch /usr/local/bin/usearch
Checking dependencies…
Traceback (most recent call last):
File “/opt/anaconda3/envs/py2/bin/shortbred_identify.py”, line 156, in
src.CheckDependency(args.strUSEARCH,"",“usearch”)
File “/opt/anaconda3/envs/py2/bin/src/init.py”, line 43, in CheckDependency
pCmd = subprocess.Popen([strCmd],stdout=subprocess.PIPE,stderr=subprocess.PIPE)
File “/opt/anaconda3/envs/py2/lib/python2.7/subprocess.py”, line 394, in init
errread, errwrite)
File “/opt/anaconda3/envs/py2/lib/python2.7/subprocess.py”, line 1047, in _execute_child
raise child_exception
OSError: [Errno 86] Bad CPU type in executable

Since it might be an issue due to 32bit support by Catalina, I switched to a lower version OSX. However, when I tried to install from conda, I got:

UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:

Specifications:

  • shortbred -> python[version=’>=3.5,<3.6.0a0|>=3.6,<3.7.0a0|>=3.8,<3.9.0a0|>=3.7,<3.8.0a0’]

Your python: python=2.7

It looks like this ShortBRED conda install requires Python 3. If you’re already using conda, an easy way to solve this is to create a Python 3 environment and install ShortBRED into it.

$ conda create --name python3 python=3.7
$ conda activate python3
(python3) $ conda install -c biobakery shortbred
1 Like

That didnt work for me. It says that shortbred requires python 2.7

shortbred -> python[version='>=2.7,<2.8.0a0']

I installed it with python 2.7 but it could find usearch. Does the conda ShortBRED package include all dependencies?

I then downloaded the usearch binary from https://drive5.com/downloads/usearch6.1.544_i86linux32.gz. I couldnt find v6.0.307.

I got a different error:

Traceback (most recent call last):
  File "/home/amirza/.conda/envs/ShortBRED/bin/shortbred_identify.py", line 156, in <module>
    src.CheckDependency(args.strUSEARCH,"","usearch")
  File "/home/amirza/.conda/envs/ShortBRED/bin/src/__init__.py", line 43, in CheckDependency
    pCmd = subprocess.Popen([strCmd],stdout=subprocess.PIPE,stderr=subprocess.PIPE)
  File "/home/amirza/.conda/envs/ShortBRED/lib/python2.7/subprocess.py", line 394, in __init__
    errread, errwrite)
  File "/home/amirza/.conda/envs/ShortBRED/lib/python2.7/subprocess.py", line 1047, in _execute_child
    raise child_exception
OSError: [Errno 13] Permission denied
Checking dependencies...

UPDATE

Turns out I just needed to give usearch permissions :smiley:

chmod a+rx usearch