我的蛇饼吃错了
$snakemake -s bsmooth_Snakefile.smk -np --forcerun
SyntaxError in file /scripts/bsmooth_snakemake/bsmooth_Snakefile.smk, line 9:
Unexpected keyword filePath in rule definition (bsmooth_Snakefile.smk, line 9)
下面是实际snakefile的样子
$ cat bsmooth_Snakefile.smk
configfile: "config/config.yaml"
configfile: "config/samples.yaml"
rule all:
input:
expand("results/bsmooth_fit/{sample}/{sample}.fitted.rda", sample=config["samples"])
rule bsmooth_fit:
input:
filePath=lambda wildcards: config["samples"][wildcards.samples]
output:
bsfit="results/{rule}/{sample}/{sample}.fitted.rda"
params:
rscript=config["BSmooth_fit"]
log:
"logs/{rule}/{sample}.log"
shell:
"Rscript {params.rscript} --sample {wildcards.samples} --file {input.filePath} --outfile {output.bsfit} 2> {log}"
请参见附件sample.yaml
$cat sample.yaml
samples:
Sample1Tumor: methylation_coverage/Sample1Tumor.bismark.cov.gz
Sample1Norm: methylation_coverage/Sample1Norm.bismark.cov.gz
我还附加了包含脚本的config.yaml
$cat config.yaml
BSmooth_fit: scripts/bsmooth_snakemake.r
任何帮助都将不胜感激
1条答案
按热度按时间ulydmbyx1#
检查并确保没有混合使用TAB和SPACES进行缩进。您可能在
filePath
前面有一个TAB字符。用空格替换所有TAB,然后重试。