欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

bcftools的安装问题

程序员文章站 2022-05-29 08:19:23
...

bcftools安装缺乏liblzma.dev文件问题解决办法

#这是我的第一个博客,可能不太好看,仅作为个人学习记录,若有问题,欢迎各位与我交流并指导。

##安装需要sudo命令,如果apt-get不能下载,可使用yum -y,安装步骤可参考其他人的博客,安装过程比较简单。但我遇到小问题,是缺少liblzma-dev,安装liblzma-dev方法如下

sudo apt-get update -y
sudo apt-get install -y liblzma-dev

#得到以下结果

Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
No package liblzma-dev available.
Error: Nothing to do

#在谷歌上找该文件,并下载。经过很多方法安装这个文件后发现没能解决问题。

wget http://mirrors.kernel.org/ubuntu/pool/universe/g/golang-github-remyoudompheng-go-liblzma/golang-github-remyoudompheng-go-liblzma-dev_0.0~git20190506.81bf2d4-2_all.deb

#得到golang-github-remyoudompheng-go-liblzma-dev_0.0~git20190506.81bf2d4-2_all.deb文件。这又得学习deb文件的安装。百度有人推荐dpkg -i 文件名 的方法安装deb文件,谁知学校的主机没有这个命令,我恨!

sudo: dpkg: command not found

#查到原因应该是学校用的系统的版本问题,需要包支撑。需要找dpkg包,没想到这个包还是deb。谷歌上的这个老外回答的问题把我绕我回来了,

wget http://ftp.us.debian.org/debian/pool/main/d/dpkg/dpkg_1.19.7_amd64.deb~~  

解决方法(缺啥补啥)

#尝试很多方法,这个问题产生原因是bcftools版本更新了(目前是1.10.2),需要更多依赖包。废话少说,直接上代码。我的主机是红帽版,这个方法适合红帽解决该问题。

 yum install xz-devel

#再安装一次估计能行,这些包是解析文件所用。再次安装,代码如下

[[email protected] bcftools-1.10.2]# ./configure --prefix=/home/xuchang/software/bcftools-1.10.2/bcftools1.10.2
[[email protected] bcftools-1.10.2]# make
[[email protected] bcftools-1.10.2]# make install
[[email protected] bcftools-1.10.2]# export PATH=/home/xuchang/software/bcftools-1.10.2/bcftools1.10.2/bin:$PATH
[[email protected] bcftools-1.10.2]# source ~/.bashrc
[[email protected] bcftools-1.10.2]# bcftools

Program: bcftools (Tools for variant calling and manipulating VCFs and BCFs)
Version: 1.10.2 (using htslib 1.10.2)

Usage:   bcftools [--version|--version-only] [--help] <command> <argument>

Commands:

 -- Indexing
    index        index VCF/BCF files

 -- VCF/BCF manipulation
    annotate     annotate and edit VCF/BCF files
    concat       concatenate VCF/BCF files from the same set of samples
    convert      convert VCF/BCF files to different formats and back
    isec         intersections of VCF/BCF files
    merge        merge VCF/BCF files files from non-overlapping sample sets
    norm         left-align and normalize indels
    plugin       user-defined plugins
    query        transform VCF/BCF into user-defined formats
    reheader     modify VCF/BCF header, change sample names
    sort         sort VCF/BCF file
    view         VCF/BCF conversion, view, subset and filter VCF/BCF files

 -- VCF/BCF analysis
    call         SNP/indel calling
    consensus    create consensus sequence by applying VCF variants
    cnv          HMM CNV calling
    csq          call variation consequences
    filter       filter VCF/BCF files using fixed thresholds
    gtcheck      check sample concordance, detect sample swaps and contamination
    mpileup      multi-way pileup producing genotype likelihoods
    roh          identify runs of autozygosity (HMM)
    stats        produce VCF/BCF stats

 Most commands accept VCF, bgzipped VCF, and BCF with the file type detected
 automatically even when streaming from a pipe. Indexed VCF and BCF will work
 in all situations. Un-indexed VCF and BCF and streams will work in most but
 not all situations.

喜大奔普。弄了近8小时,我恨。
额外学习,这位大佬教咱认识bashrc。bashrc是bash recode吗?
链接: https://www.cnblogs.com/probemark/p/5886766.html.