安装samtools心酸之路

1,github中下载

github samtolls 安装说明

git clone https://github.com/samtools/samtools.git
cd samtools
autoheader          
autoconf -Wno-syntax 
./configure          
make
make install

报错!!!

FAILED.  This error must be resolved in order to build HTSlib successfully.

各种方法无法解决后,想到使用conda安装,听说很简单。

2,使用conda安装

conda install samtools

调用samtools,报错

(base) [root@localhost samtools]# samtools
samtools: error while loading shared libraries: libcrypto.so.1.0.0: cannot open shared object fi

解决方法
参考资料

运行下面命令进行安装:

conda install -c bioconda samtools openssl=1.0

测试:

(base) [root@localhost ~]# 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

  -- Editing
     calmd          recalculate MD/NM tags and '=' bases
     fixmate        fix mate information
     reheader       replace BAM header
     targetcut      cut fosmid regions (for fosmid pool only)
     addreplacerg   adds or replaces RG tags
     markdup        mark duplicates

  -- File operations
     collate        shuffle and group alignments by name
     cat            concatenate BAMs
     merge          merge sorted alignments
     mpileup        multi-way pileup
     sort           sort alignment file
     split          splits a file by read group
     quickcheck     quickly check if SAM/BAM/CRAM file appears intact
     fastq          converts a BAM to a FASTQ
     fasta          converts a BAM to a FASTA

  -- Statistics
     bedcov         read depth per BED region
     depth          compute the depth
     flagstat       simple stats
     idxstats       BAM index stats
     phase          phase heterozygotes
     stats          generate stats (former bamcheck)

  -- Viewing
     flags          explain BAM flags
     tview          text alignment viewer
     view           SAM<->BAM<->CRAM conversion
     depad          convert padded BAM to unpadded BAM


搞定