【发布时间】:2018-06-15 18:06:53
【问题描述】:
我正在尝试将这两个规则结合在一起
rule fastqc:
input:
fastq = "{sample}.fastq.gz",
output:
zip1 = "{sample}_fastqc.zip",
html = "{sample}_fastqc.html",
threads:8
shell:
"fastqc -t {threads} {input.fastq}"
rule renamefastqc:
input:
zip1 = "{sample}_fastqc.zip",
html = "{sample}_fastqc.html",
output:
zip1 = "{sample}__fastqc.zip",
html = "{sample}__fastqc.html",
shell:
"mv {input.zip} {output.zip} && "
"mv {input.html} {output.html} "
看起来像这样。
rule fastqc:
input:
fastq = "{sample}.fastq.gz"
output:
zip1 = "{sample}__fastqc.zip",
html = "{sample}__fastqc.html"
threads:8
shell:
"fastqc -t {threads} {input.fastq} && "
"mv {outfile.zip} {output.zip1} && "
"mv {outfile.html} {output.html}"
FastQC 无法指定文件输出,并且总是采用以 fastq.gz 结尾的文件并创建两个以 _fastqc.zip 和 _fastqc.html 结尾的文件。通常我只是写一个规则来接受这些输出并产生一个带有两个下划线的规则(renamefastqc 规则)。但这意味着每次我运行管道时,snakemake 都会看到 fastqc 规则的输出消失了,它想要重建它们。因此,我试图将这两个规则合并为一个步骤。
【问题讨论】:
标签: snakemake