Installing Samtools
Procedure
- Use PuTTY to log in to the server as the root user.
- Run the following command to go to the SAMtools installation directory:
cd /path/to/SAMTOOL
- Run the following command to decompress the SAMtools installation package:
Install SAMtools and HTSlib separately. Do not use SAMtools that contains HTSlib. Otherwise, errors may occur during compilation.
tar -xvf samtools-0.1.19.tar.gz
- Run the following command to switch to the directory generated after the package is decompressed:
cd samtools-0.1.19
- Run the following command to obtain the GNU absolute directory:
which gcc
- Modify the Makefile file.
- Open Makefile.
vi Makefile
- Press i to enter the insert mode and modify the file as follows:
Before the modification:
CC = gcc
After the modification:
CC = /path/to/GNU/bin/gcc
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open Makefile.
- Run the following commands to perform compilation and installation:
make
- Run the following commands to copy the generated binary files to the default path of the root directory so that Cufflinks can directly identify the SAMtools and HTSlib files:
mkdir /usr/local/include/bam cp /path/to/SAMTOOL/samtools-0.1.19/libbam.a /usr/local/lib cp /path/to/SAMTOOL/samtools-0.1.19/*.h /usr/local/include/bam/ cp /path/to/SAMTOOL/samtools-0.1.19/samtools /usr/bin/
Parent topic: Configuring the Compilation Environment