美文网首页收藏
Resfinder一键安装以及问题解决

Resfinder一键安装以及问题解决

作者: 大坏蛋HYB | 来源:发表于2022-07-08 11:21 被阅读0次

    准备工作
    1.安装好conda以及mamba
    2.建立一个环境,命名为resfinder
    conda create -n resfinder
    激活环境
    source activate resfinder
    开始安装
    1.准备安装脚本,复制以下代码至一个txt文件中,保存后修改文件名为"install_resfinder.sh",代码修改自:
    resfinder/install_resfinder.sh at master · cadms/resfinder (github.com)
    赋予权限:
    chmod 777 install_resfinder.sh
    运行:
    sh ./install_resfinder.sh
    途中需要确认conda的软件安装,选择"Y"即可。

    ### Install ResFinder 4.0 ###
    
    # 依赖软件安装:如果有装mamba的话则修改为mamba安装
    conda install blast cgecore tabulate biopython python==3.8.13 -c bioconda 
    #resfinder安装及数据库的部署
    git clone -b 4.0 https://bitbucket.org/genomicepidemiology/resfinder.git
    git clone -b new_naming https://bitbucket.org/genomicepidemiology/pointfinder_db.git resfinder/db_pointfinder
    git clone https://bitbucket.org/genomicepidemiology/resfinder_db.git resfinder/db_resfinder
    git clone https://bitbucket.org/genomicepidemiology/kma.git resfinder/cge/kma
    cd resfinder/cge/kma && make
    cd ../..
    mkdir db_resfinder/kma_indexing
    cge/kma/kma_index -i db_resfinder/fusidicacid.fsa -o db_resfinder/kma_indexing/fusidicacid
    cge/kma/kma_index -i db_resfinder/phenicol.fsa -o db_resfinder/kma_indexing/phenicol
    cge/kma/kma_index -i db_resfinder/glycopeptide.fsa -o db_resfinder/kma_indexing/glycopeptide
    cge/kma/kma_index -i db_resfinder/trimethoprim.fsa -o db_resfinder/kma_indexing/trimethoprim
    cge/kma/kma_index -i db_resfinder/oxazolidinone.fsa -o db_resfinder/kma_indexing/oxazolidinone
    cge/kma/kma_index -i db_resfinder/tetracycline.fsa -o db_resfinder/kma_indexing/tetracycline
    cge/kma/kma_index -i db_resfinder/quinolone.fsa -o db_resfinder/kma_indexing/quinolone
    cge/kma/kma_index -i db_resfinder/nitroimidazole.fsa -o db_resfinder/kma_indexing/nitroimidazole
    cge/kma/kma_index -i db_resfinder/fosfomycin.fsa -o db_resfinder/kma_indexing/fosfomycin
    cge/kma/kma_index -i db_resfinder/aminoglycoside.fsa -o db_resfinder/kma_indexing/aminoglycoside
    cge/kma/kma_index -i db_resfinder/macrolide.fsa -o db_resfinder/kma_indexing/macrolide
    cge/kma/kma_index -i db_resfinder/sulphonamide.fsa -o db_resfinder/kma_indexing/sulphonamide
    cge/kma/kma_index -i db_resfinder/rifampicin.fsa -o db_resfinder/kma_indexing/rifampicin
    cge/kma/kma_index -i db_resfinder/colistin.fsa -o db_resfinder/kma_indexing/colistin
    cge/kma/kma_index -i db_resfinder/beta-lactam.fsa -o db_resfinder/kma_indexing/beta-lactam
    cge/kma/kma_index -i db_pointfinder/campylobacter/*.fsa -o db_pointfinder/campylobacter/campylobacter
    cge/kma/kma_index -i db_pointfinder/escherichia_coli/*.fsa -o db_pointfinder/escherichia_coli/escherichia_coli
    cge/kma/kma_index -i db_pointfinder/enterococcus_faecalis/*.fsa -o db_pointfinder/enterococcus_faecalis/enterococcus_faecalis
    cge/kma/kma_index -i db_pointfinder/enterococcus_faecium/*.fsa -o db_pointfinder/enterococcus_faecium/enterococcus_faecium
    cge/kma/kma_index -i db_pointfinder/neisseria_gonorrhoeae/*.fsa -o db_pointfinder/neisseria_gonorrhoeae/neisseria_gonorrhoeae
    cge/kma/kma_index -i db_pointfinder/salmonella/*.fsa -o db_pointfinder/salmonella/salmonella
    cge/kma/kma_index -i db_pointfinder/mycobacterium_tuberculosis/*.fsa -o db_pointfinder/mycobacterium_tuberculosis/mycobacterium_tuberculosis
    

    问题
    正常来说按照以上的来是没有问题了。一开始我遇到的问题是安装完成后运行resfinder提示
    "AttributeError: module 'collections' has no attribute 'MutableSet'"
    查询后发现应该是python版本的问题,所以降级python从3.10至3.8.13(上面已经指定安装的python版本),之后就可以正常使用resfinder了。

    相关文章

      网友评论

        本文标题:Resfinder一键安装以及问题解决

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