xbinbzy的个人博客分享 http://blog.sciencenet.cn/u/xbinbzy

博文

DeepARG的short_reads_pipeline使用问题总结

已有 4329 次阅读 2019-12-19 13:18 |个人分类:数据分析|系统分类:科研笔记

    近来想用DeepARG倒腾抗性基因的事,由于数据是测序的PE reads。不过安装的DeepARG版本提示输入文件为fasta格式或比对格式。

    这两天看到其官网主页上提供了PE reads的网页版分析方案,在其代码放置主页上看到流程更新,https://bitbucket.org/gusphdproj/deeparg-ss/src/master/


第一:下载和安装

参考官网提供的介绍

https://bench.cs.vt.edu/deeparg


第二:尝试运行

运行脚本如下,其中数据是软件自带

export PATH="*/Python-2.7.14/bin:$PATH"
export PYTHONPATH="*/Python-2.7.14/lib/python2.7/site-packages/:$PYTHONPATH"
python */deeparg-ss/short_reads_pipeline/short_reads_pipeline.py
--forward_pe_file ./reads/F.fq.gz --reverse_pe_file ./reads/R.fq.gz 
--path_to_executables */short_reads_pipeline/bin/
--path_to_deeparg */deeparg-ss/ --output_file temp

前3步正常运行,第4步出现报错,报错信息如下:

Step 4: Quantification of ARG-like counts
global name 'path_to_deeparg' is not defined

排查代码,在pairedEndPipelineClass.py中发现

1.png

调用了quantificationClass.py中的merge函数

查看其中的代码发现此间调用了deepargClass.py的dsize函数

def dsize():
return {i.split()[0].split("|")[-1].upper(): i.split() 
for i in open(path_to_deeparg+'/database/v2/features.gene.length')}

将其中path_to_deeparg改成服务器安装DeepARG的路径

重新运行,第4步正常运行


第三:再次运行

运行脚本照旧,此时第1、2、3、4步正常运行

第5步出现报错提示dataset的路径出现错误,第5步调用了d16spipelineClass.py,查看源码,发现其中dataset的路径是

class d16sPipe():
    def __init__(self, ggdata="/data/short_reads_pipeline/bin/gg13/dataset"):

于是将ggdata的路径设置为gg13的在服务器上的路径

重新运行,屏幕显示有很多乱码符号,查看报错原因是bam二进制文件打开出现问题,在d16spipelineClass.py查看源码发现

os.system(" ".join([
    "samtools sort",
    fi+".bam",
    " -o", fi+".sorted.bam"
    ]))

由于samtools版本的更新,此处运行不符合新的参数,

按照samtools的参数提示,修改后重新运行,结果顺利输出

2.png



https://wap.sciencenet.cn/blog-306699-1210674.html

上一篇:QIIME2 feature-classifier提示错误[Errno 28] No space left on
下一篇:methylKit安装过程中的XML package报错
收藏 IP: 210.21.228.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-4-19 19:03

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部