Trouble installing cd-hit
1
0
Entering edit mode
4.6 years ago
nlehmann ▴ 120

Hi,

I'm trying to install cd-hit on a Mac osX el Capitan, but I can't find what's going wrong neither in the forum neither in the readme file. Any help would be welcome. make seems to go fine, and make openmp=no too. But then I cannot use any cd-hit command. Thanks !

This is what I get :

$ make
g++  -DNO_OPENMP -O2  cdhit-common.c++ -c
g++  -DNO_OPENMP -O2  cdhit-utility.c++ -c
g++  -DNO_OPENMP -O2  cdhit.c++ -c
g++  -DNO_OPENMP -O2  cdhit.o cdhit-common.o cdhit-utility.o -o cd-hit
g++  -DNO_OPENMP -O2  cdhit-est.c++ -c
g++  -DNO_OPENMP -O2  cdhit-est.o cdhit-common.o cdhit-utility.o -o cd-hit-est
g++  -DNO_OPENMP -O2  cdhit-2d.c++ -c
g++  -DNO_OPENMP -O2  cdhit-2d.o cdhit-common.o cdhit-utility.o -o cd-hit-2d
g++  -DNO_OPENMP -O2  cdhit-est-2d.c++ -c
g++  -DNO_OPENMP -O2  cdhit-est-2d.o cdhit-common.o cdhit-utility.o -o cd-hit-est-2d
g++  -DNO_OPENMP -O2  cdhit-div.c++ -c
g++  -DNO_OPENMP -O2  cdhit-div.o cdhit-common.o cdhit-utility.o -o cd-hit-div
g++  -DNO_OPENMP -O2  cdhit-454.c++ -c
g++  -DNO_OPENMP -O2  cdhit-454.o cdhit-common.o cdhit-utility.o -o cd-hit-454


$ make openmp=no
make: Nothing to be done for `all'.

$ cd-hit -i all.fasta -o clusters -c 0.4 -n 2 -M 6000 -T 6
-bash: cd-hit: command not found
cd-hit • 4.4k views
ADD COMMENT
2
Entering edit mode

nothing is wrong with make. You just have to append the directory to your PATH ... http://www.linfo.org/path_env_var.html

ADD REPLY
3
Entering edit mode
4.6 years ago
Neilfws 49k

The compiled executables are not in your PATH. So you have multiple options:

(1) add the directory where they reside to your PATH;

(2) move them to a directory which is in your PATH;

(3) run them from the directory where they are using e.g. ./cd-hit or by specifying the full path to the executable e.g. /path/to/cd-hit.

Since you're using OSX, consider Homebrew. It includes many science packages including CD-HIT and will place the executables in /usr/local/bin:

brew install cd-hit
ADD COMMENT
0
Entering edit mode

Thanks a lot ! It works when I add it to my PATH.

ADD REPLY

Login before adding your answer.

Traffic: 2660 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6