美文网首页
8-【samtools】的安装和使用

8-【samtools】的安装和使用

作者: lkj666 | 来源:发表于2021-02-15 19:14 被阅读0次

    安装时间:2021.2.15


    1. 简介

        samtools是一个用于操作sam和bam文件的工具合集。能够实现二进制查看、格式转换、排序及合并等功能。

    2. 安装

    利用conda一键安装

    conda install samtools
    

    问题1:通过conda install samtools下载后不能使用,报错出现samtools: error while loading shared libraries: libcrypto.so.1.0.0: cannot open shared object file: No such file or directory
    解决办法:

    • 方法一:输入:conda install -c bioconda samtools openssl=1.0
    • 方法二:可能是系统中python版本太高,可以用conda建立一个低版本的python独立环境然后下载samtools。

    3. 基本使用

    3.1 截取基因组序列

    第一步:建立索引,生成后缀为.fai的文件

    samtools faidx inputa.fa
    

    第二部:提取序列到新文件中

    samtools faidx inputa.fa scffold2:2568-5968 scffold3:8569-5896 > output.txt
    

    为了知道序列的序列的名称,通常会配合seqkit一起使用

    相关文章

      网友评论

          本文标题:8-【samtools】的安装和使用

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