带有通配符的 WorkflowError
An WorkflowError with wildcards
我想使用 snakemake 对 fastq 文件进行 QC,但它显示:
工作流错误:
Target rules may not contain wildcards. Please specify concrete files
or a rule without wildcards.
我写的代码是这样的
SAMPLE = ["A","B","C"]
rule trimmomatic:
input:
"/data/samples/{sample}.fastq"
output:
"/data/samples/{sample}.clean.fastq"
shell:
"trimmomatic SE -threads 5 -phred33 -trimlog trim.log {input} {output} LEADING:20 TRAILING:20 MINLEN:16"
我是新手,有知道的请告诉我。非常感谢!
您可以执行以下操作之一,但您很可能想执行后者。
通过命令行明确指定输出文件名:
snakemake data/samples/A.clean.fastq
这将 运行 规则创建文件 data/samples/A.clean.fastq
使用 rule all
指定要在 Snakefile 本身中创建的目标输出文件。 See here 以了解有关通过 rule all
添加目标的更多信息
SAMPLE_NAMES = ["A","B", "C"]
rule all:
input:
expand("data/samples/{sample}.clean.fastq", sample=SAMPLE_NAMES)
rule trimmomatic:
input:
"data/samples/{sample}.fastq"
output:
"data/samples/{sample}.clean.fastq"
shell:
"trimmomatic SE -threads 5 -phred33 -trimlog trim.log {input} {output} LEADING:20 TRAILING:20 MINLEN:16"
我想使用 snakemake 对 fastq 文件进行 QC,但它显示: 工作流错误:
Target rules may not contain wildcards. Please specify concrete files or a rule without wildcards.
我写的代码是这样的
SAMPLE = ["A","B","C"]
rule trimmomatic:
input:
"/data/samples/{sample}.fastq"
output:
"/data/samples/{sample}.clean.fastq"
shell:
"trimmomatic SE -threads 5 -phred33 -trimlog trim.log {input} {output} LEADING:20 TRAILING:20 MINLEN:16"
我是新手,有知道的请告诉我。非常感谢!
您可以执行以下操作之一,但您很可能想执行后者。
通过命令行明确指定输出文件名:
snakemake data/samples/A.clean.fastq
这将 运行 规则创建文件
data/samples/A.clean.fastq
使用
添加目标的更多信息rule all
指定要在 Snakefile 本身中创建的目标输出文件。 See here 以了解有关通过rule all
SAMPLE_NAMES = ["A","B", "C"] rule all: input: expand("data/samples/{sample}.clean.fastq", sample=SAMPLE_NAMES) rule trimmomatic: input: "data/samples/{sample}.fastq" output: "data/samples/{sample}.clean.fastq" shell: "trimmomatic SE -threads 5 -phred33 -trimlog trim.log {input} {output} LEADING:20 TRAILING:20 MINLEN:16"