【SV分析】03如何安装smartie-sv

作者: EvoPopGenQ | 来源:发表于2019-08-27 21:55 被阅读0次

    前言

    在后台小伙伴的催促下,小Q终于把拖欠了N久的第3篇SV分析--软件安装篇写完了。废话不多说。

    内容目录

    预安装依赖软件

    1.安装Miniconda

    软件说明

    官网:https://docs.conda.io/en/latest/miniconda.html
    安装说明:https://conda.io/projects/conda/en/latest/user-guide/install/linux.html#install-linux-silent

    安装步骤

    1)下载安装包。
    2)运行。注意你所在的服务器IP必须是联网的.

    # 默认选项
    bash Miniconda3-latest-Linux-x86_64.sh
    
    # 如果为了方便,安装完conda后可以用以下命令,这样以后每次进入linux终端时会自动进入conda 虚拟环境
    conda init fish
    
    # 搜索所需软件
    conda search bedtools
    
    # 安装所需软件
    # 软件名可以后面跟version,也可选择不加version
    conda install bedtools=1.2
    

    2.安装Snakemake

    1. 保证服务器上已经安装python
      2)利用pip安装到用户自己的目录下。注意你所在的服务器IP必须是联网的.
    # target: 指定安装目录
    /pathon_install_path/python3.6/bin/pip install --target /your_path/Software/snakemake snakemake
    
    # 安装完后需要将安装路径加入到PYTHONPATH
    # 注意export时必须是 export VAR=***:$VAR 的形式,否则会将之前的VAR变量值清除
    export PYTHONPATH=/pathon_install_path/python3.6/lib/python3.6/site-packages:/your_path/snakemake:$PYTHONPATH
    export PATH=/your_path/Software/snakemake/bin:$PATH
    

    3.安装Bedtools

    安装说明:https://bedtools.readthedocs.io/en/latest/content/installation.html

    安装Smatie-sv

    1.软件下载地址

    https://github.com/zeeev/smartie-sv

    2.安装前的注意事项

    1) src目录下的 blasr和htslib 目录 均是链接,链接到github中的软件目录。所以如果采用download clone的方式,会发现src目录下的blasr和htslib 目录是空的,这样会导致在make时出错。
    2)因此小Q建议使用Clone the repo的方式下载smartie-sv。
    注意你所在的服务器IP必须是联网的.

    git clone --recursive https://github.com/zeeev/smartie-sv.git
    
    # 下载成功后如下:
    Cloning into 'smartie-sv'...
    remote: Enumerating objects: 180, done.
    remote: Total 180 (delta 0), reused 0 (delta 0), pack-reused 180
    Receiving objects: 100% (180/180), 1.57 MiB | 206.00 KiB/s, done.
    Resolving deltas: 100% (92/92), done.
    Checking out files: 100% (16/16), done.
    Submodule 'src/blasr' (https://github.com/mchaisso/blasr.git) registered for path 'src/blasr'
    Submodule 'src/htslib' (https://github.com/samtools/htslib.git) registered for path 'src/htslib'
    Cloning into 'src/blasr'...
    remote: Enumerating objects: 24, done.
    remote: Counting objects: 100% (24/24), done.
    remote: Compressing objects: 100% (20/20), done.
    remote: Total 1739 (delta 6), reused 10 (delta 4), pack-reused 1715
    Receiving objects: 100% (1739/1739), 1.92 MiB | 288.00 KiB/s, done.
    Resolving deltas: 100% (981/981), done.
    Submodule path 'src/blasr': checked out '7cc3379a99824f4c3a9a4122f04deadaee50e2f5'
    Cloning into 'src/htslib'...
    remote: Enumerating objects: 23, done.
    remote: Counting objects: 100% (23/23), done.
    remote: Compressing objects: 100% (19/19), done.
    remote: Total 11655 (delta 6), reused 11 (delta 4), pack-reused 11632
    Receiving objects: 100% (11655/11655), 8.57 MiB | 847.00 KiB/s, done.
    Resolving deltas: 100% (8241/8241), done.
    Submodule path 'src/htslib': checked out '36c5c47e83078014ec62c844e0de5dae95e4a0d6'
    

    3.如果已经安装了blasr和htslib,则跳过这一步,进入第4步

    1)安装blasr

    安装网址:
    https://github.com/mchaisso/blasr/tree/7cc3379a99824f4c3a9a4122f04deadaee50e2f5

    注意
    在bin中将blasr程序链接到该目录下

    2)安装htslib

    注意你需要先安装以下library
    libz (required)
    libbz2 (required, unless configured with --disable-bz2)
    liblzma (required, unless configured with --disable-lzma)
    libcurl (optional, but strongly recommended)
    libcrypto (optional for Amazon S3 support; not needed on MacOS)

    安装网址:
    https://github.com/samtools/htslib/tree/36c5c47e83078014ec62c844e0de5dae95e4a0d6

    ./configure     # Optional, needed for choosing optional functionality
    make
    make install
    
    3)删除src中的blasr和htslib,然后安装目录链接到src里,链接名为blasr和htslib

    4.安装print_gaps

    首先请确保你安装了blasr和htslib,并知道安装目录。

    # export所需library
    export LD_LIBRARY_PATH=/your_path/zlib-1.2.7:/your_path/bzip2-1.0.6:/your_path/lzmalib-0.0.1:/your_path/curl-7.28.1/lib:/your_path/openssl-1.0.1:$LD_LIBRARY_PATH
    
    # 修改src/print_gaps文件夹下的Makefile中的信息,添加-l,把htslib需要的包都指定好
    
    # 旧的命令是:
    g++ main.cpp split.cpp ../htslib/libhts.a -I ../htslib/ -I ../htslib/htslib -lz -lpthread -o ../../bin/printgaps
    
    # 新的命令是:
    g++ main.cpp split.cpp ../htslib/libhts.a -I ../htslib/ -I ../htslib/htslib -llzma -lbz2 -lz -lm -lcurl -lcrypto -lpthread -o ../../bin/printgaps
    
    # run完在bin中就会出现printgaps
    

    5.设置环境变量

    注意
    在使用smartie-sv之前一定要设置好环境变量

    export HDF5INCLUDEDIR=/your_path/hdf5/include
    export HDF5LIBDIR=/your_path/hdf5/lib
    export LD_LIBRARY_PATH=/your_path/hdf5/lib:$LD_LIBRARY_PATH
    export LD_LIBRARY_PATH=/your_path/zlib-1.2.7:/your_path/bzip2-1.0.6:/software/biosoft/software/lzmalib-0.0.1:/your_path/curl-7.28.1/lib:/your_path/openssl-1.0.1:$LD_LIBRARY_PATH
    
    
    export PATH=/your_path/snakemake/bin:$PATH
    export PYTHONPATH=/your_path/python3.6/lib/python3.6/site-packages:/your_path/Software/snakemake
    
    

    撰文 & 编辑:VickieQ
    校对:花毛 & HCLO4

    相关文章

      网友评论

        本文标题:【SV分析】03如何安装smartie-sv

        本文链接:https://www.haomeiwen.com/subject/qmxeectx.html