轻量级前端框架助力开发者提升项目效率与性能
910
2022-09-08
snakemake学习笔记004:前后两个rule为啥连不起来呢?
SRR, = glob_wildcards("output.gtf/"+"{srr}.gtf")#SRR = ["ERR188401","ERR204916"]rule all: input: #expand("output.gtf/"+"{srr}.gtf",srr=SRR), "MergedList.txt",rule gtflist: input: gtffiles = expand("output.gtf/"+"{srr}.gtf",srr=SRR) output: output_txt = "MergedList.txt" run: with open(output.output_txt,'w') as f: for gtf in input.gtffiles: print(gtf,file=f)rule stringtieMerge: input: refgtf = "/mnt/shared/scratch/myan/private/practice_data/RNAseq/chrX_data/genes/chrX.gtf", gtflist = "MergedList.txt" output: gtf = "output.merged.gtf/StringtieMerged.gtf" log: "output.merged.gtf/StringtieMerge.logs" threads: 1 params: "-m 200 -c 3" shell: """ stringtie --merge {params} -p {threads} -G {input.refgtf} -o {output.gtf} {input.gtflist} """
第二个rule就是不运行
原来是在rule all 代码里少写了 第二个rule的输出文件
正确写法是
SRR, = glob_wildcards("output.gtf/"+"{srr}.gtf")#SRR = ["ERR188401","ERR204916"]rule all: input: #expand("output.gtf/"+"{srr}.gtf",srr=SRR), "MergedList.txt", "output.merged.gtf/StringtieMerged.gtf"rule gtflist: input: gtffiles = expand("output.gtf/"+"{srr}.gtf",srr=SRR) output: output_txt = "MergedList.txt" run: with open(output.output_txt,'w') as f: for gtf in input.gtffiles: print(gtf,file=f)rule stringtieMerge: input: refgtf = "/mnt/shared/scratch/myan/private/practice_data/RNAseq/chrX_data/genes/chrX.gtf", gtflist = "MergedList.txt" output: gtf = "output.merged.gtf/StringtieMerged.gtf" log: "output.merged.gtf/StringtieMerge.logs" threads: 1 params: "-m 200 -c 3" shell: """ stringtie --merge {params} -p {threads} -G {input.refgtf} -o {output.gtf} {input.gtflist} """
rule all 的作用是啥我还是不懂
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~