Hi!
I have a big pipeline based on Snakemake. Now I am getting the following error
NameError in line 120 of /storage1/GatkBwaTest/SnakemakeDir/snakefile3:
name 'data1' is not defined
File "/storage1/GatkBwaTest/SnakemakeDir/snakefile3", line 120, in <module>
How can I make the date in the param understand that this is the date from the input
rule gatk_GatherBQSRReports:
input:
data1=expand(config["out_BaseRecalibrator"]+"/{sample}/{sample}.BaseRecalibrator.{interval}.txt", interval=INTERVALS.interval, allow_missing=True)
params:
data1= '-I ' + ' -I '.join(data1), gatk_memory=config["gatk_memory"]
log:
gatherBQSRReports=config["out_logs"]+"/{sample}/{sample}.gatherBQSRReports.log"
output:
output1=config["out_BaseRecalibrator"]+"/{sample}/{sample}.GatherBQSRReports.txt"
shell:
"{gatk} --java-options {params.gatk_memory} GatherBQSRReports {params.data1} -O {output.output1} 2> {log.gatherBQSRReports}"
Thank you!!! It really works! But now I have another error. I suspect I'm doing something wrong with allow_missing=True
I show the last two rules and the rule all
I think the problem is with rule
all
where you have:Snakemake doesn't know what
{sample}
should be replaced with. I suspect that the first one can be removed altogether from ruleall
since these are intermediate files. The second should probably be: