Can any one help me please I want use BWA aligner, when I downloaded I cd into the file and made it and it create bwa program. Previously somebody made me bin folder in my home directory and placed the bwa program their, and they also did something with usr/local/bin. After they did this I was able to use BWA aligner from my MAC terminal anywhere. I recently had to erase my hard drive and need to reinstall BWA, and don't know how to make it where I can run BWA from my MAC terminal.
You can run a unix program from anywhere on the terminal if you specify the location. So for instance if, in your home directory, you make a bin directory and place it there. You can just specify the full path: ie. /Users/<your username="">/bin/bwa
Alternatively you can make the directory /usr/local/bin/ and place it there. Then be sure to add that directory to your path. You can also add other directories, like a bin directory in your home directory, to your path. You can specify your path in several different files. Mine is in a file, in my home directory, called .bash_profile and has a line like this:
I searched online and got some results that may be helpful.
Basically you should have gcc and xcode from Apple installed on your mac.
First you need to make hidden files visible. Type this in the command line:
defaults write com.apple.finder AppleShowAllFiles -bool true killall Finder
You need to get the to
paths.d folder. On my system, it's possible to just type "
However, you should be able to open Finder, navigate to the top most directory for your MAC hard drive. Find the
etc folder, then the
Inside this folder create any file you want, I created a file called "Bio" for all my bioinformatics software.
Here you can put the location of the binary files that you want to run universally. So you can write something like "
(Change "yourusername" to your actual username.)
Assuming bwa is in a folder on your Desktop for example.
To make the system files hidden again type:
defaults write com.apple.finder AppleShowAllFiles -bool false killall Finder
You might need to restart terminal, but you should to be able to use bwa from the commandline