I followed this tutoral (https://icb.med.cornell.edu/wiki/index.php/Elementolab/BWA_tutorial) to installed BWA (bwa-0.7.17.tar) on my Mac. After I did everything (till "execute the command", ~/.bash_profile)
, BWA still couldn't be run. When I type bwa, it shows "-bash: bwa: command not found"
.
the use path for the Terminal is:
(base) mean-machine:bwa-0.7.17 Admin$ echo $PATH
/Library/Frameworks/Python.framework/Versions/3.7/bin:/Library/Frameworks/Python.framework/
Versions/3.7/bin:/anaconda3/bin:/anaconda3/condabin:/Library/Frameworks/Python.framework/Versions/
3.7/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/Admin/Library/Python/3.7/bin://Users/Admin/Desktop/BWA/bwa-0.7.17://Users/Admin/Desktop/BWA/bwa-0.7.17source:/Users/Admin/Desktop/BWA/bwa-0.7.17:/Users/Admin/Desktop/BWA/bwa-0.7.17
It looks lots of repeats exist in my terminal PATH. I'm not sure if that's the reason I can't run BWA?
Can someone guid me to correct the problem? Thanks
Thank you ATpoint.
I did run source ~/.bash_profile and it didn't say anything wrong in the Terminal.
I tried to list what it contains in the folder:
As you can see, these is a "bwa" in the list, but I couldn't found in the folder. By the way, the folder I placed on the desktop.
What can I do to add "bwa" to the PATH? Sorry, the question is so stupid, but I just know very little about computer and computer programming.
Go into the folder where the executable is, then type
pwd
, copy the output, e.g./path/to/this/folder
, then add this to.bash_profile
:export PATH=$PATH:/path/to/this/folder
then save and close.bash_profile
, open a new tab and it should be ok.The problem solved. Thank you ATpoint!