how to install samtools
1
0
Entering edit mode
6.9 years ago
Chenglin ▴ 230

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 • 30k views
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).

1
Entering edit mode
6.9 years ago
GenoMax 123k

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".

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.

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.

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)?

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.