samtools 安装过程出现的问题及解决

2018-11-28  本文已影响127人  看远方的星

使用以下步骤安装 :

mkdir -p ~/biosoft/samtools
echo 'export PATH=/home/vip41/biosoft/samtools/bin:$PATH' >>~/.bashrc 
source ~/.bashrc
cd ~/biosoft/samtools
wget https://github.com/samtools/samtools/releases/download/1.9/samtools-1.9.tar.bz2
tar -jxvf samtools-1.9.tar.bz2
cd  samtools-1.9
./configure --prefix=/home/vip41/biosoft/samtools  
make && make install

出现的问题:
samtools可用,但是基本命令如ls、pwd等无法使用,使用该命令(export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin
)解决ls等基本命令无法使用问题,但是samtools又变成无法使用,重新添加环境变量,samtools可用,但是ls等基本命令又无法使用:

vip41@VM-0-15-ubuntu:~/biosoft/samtools$ echo 'export PATH=/home/vip41/biosoft/samtools/bin:$PATH'>>~/.bashrc
vip41@VM-0-15-ubuntu:~/biosoft/samtools$ source ~/.bashrc
vip41@VM-0-15-ubuntu:~/biosoft/samtools$ ls
Command 'ls' is available in '/bin/ls'
The command could not be located because '/bin' is not included in the PATH environment variable.
ls: command not found
vip41@VM-0-15-ubuntu:~/biosoft/samtools$ samtools

Program: samtools (Tools for alignments in the SAM format)
Version: 1.9 (using htslib 1.9)

Usage:   samtools <command> [options]

Commands:
  -- Indexing
     dict           create a sequence dictionary file
     faidx          index/extract FASTA
     fqidx          index/extract FASTQ
     index          index alignment

使用命令vi ~/.bashrc查看软件路径:

# added by Miniconda3 installer
export PATH="/home/vip41/miniconda3/bin:$PATH"
export PATH=/home/vip41/biosoft/lzma/bin:$PATH
export PATH=/home/vip41/biosoft/htslib/bin:$PATH
export PATH=/home/vip41/biosoft/samtools/bin:$PATH

尝试删除samtools的路径,发现问题解决了。samtools居然能用,且常用命令不受影响,就使用命令which samtools查看路径 :

vip41@VM-0-15-ubuntu:~$ which samtools
/home/vip41/miniconda3/bin/samtools

找到问题所在,路径冲突了,之前使用conda install 安装过有默认路径。


附:


软件安装步骤参考:http://www.cnblogs.com/ctfighting/p/7491280.html


友情阅读推荐:

上一篇下一篇

猜你喜欢

热点阅读