how to install samtools
1
0
Entering edit mode
8.8 years ago
Chenglin ▴ 260

I need to install samtools. I saw the instruction on the webpage (http://www.htslib.org/download/) but did not get it.

cd samtools-1.x    # and similarly for bcftools and htslib
make
make prefix=/where/to/install install

What does make prefix=/where/to/install install this mean? Do I need substitute "/where/to/install" with a real path and keep prefix and install?

If so, what is the real path for? Any help, please? Thanks!

Chenglin

next-gen-sequencing • 32k views
ADD COMMENT
1
Entering edit mode

If you are using a Linux system based on Debian (like Debian itself, Ubuntu, MInt, ...) then you can also install samtools with your system's package management tool. (From the command line: apt-get install samtools).

ADD REPLY
1
Entering edit mode
8.8 years ago
GenoMax 147k

Real path is a directory on your computer where you want to install samtools. If that directory is /usr/local/bin then you would add make prefix=/usr/local/bin install when you "make".

ADD COMMENT
0
Entering edit mode

Thank you very much for your answer. Can you please explain what is the command make prefix=/where/to/install install for? I appreciate very much.

ADD REPLY
0
Entering edit mode

prefix determines the directory where the executable will be installed. Make is a utility that is used to automatically build programs from source code.

ADD REPLY
0
Entering edit mode

Thank you very much! Do you think it will be a problem if I don't do the second command (make prefix=/usr/local/bin install)?

ADD REPLY
0
Entering edit mode

If you don't do that command (and you won't be able to if you don't have root privileges on this machine) then you would either need to run samtools by providing full path to the executable or you would need to add the directory containing samtools executables to $PATH.

ADD REPLY

Login before adding your answer.

Traffic: 2569 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