MATLAB Answers

Cannot run system commands from matlab macOS catalina; zsh:1: command not found: blastp

31 views (last 30 days)
kyllen87 on 30 Nov 2020
Commented: Michael on 4 Aug 2021
I am trying to run the bioinformatics software blast+ from within matlab environment.
>> addpath("/usr/local/ncbi/blast/bin")
>> ! blastp -h
zsh:1: command not found: blastp
The software runs fine when I run it from the terminal.
Initially I tried to run it with the system(command) function but it was not working. As suggested on other posts I tried to add it to the matlab path but still Matlab R2020b cannot locate it. Any suggestions?

Accepted Answer

Ameer Hamza
Ameer Hamza on 30 Nov 2020
The command addpath() add the folder to MATLAB's path. ! or system() do not use MATLAB's path. You need to use setenv() to change the PATH variable as shows here:
Michael on 4 Aug 2021
Okay. Thanks. I didn't make the link. It was created when I installed the package with homebrew. Your solution to the related issue is getting me along without needing to noodle with this link. Thanks so much!

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!