snakemake snakefile中的语法错误

时间:2018-06-26 13:41:23

标签: python-3.x snakemake

我试图运行snakemake来测试一项小工作。代码如下:

rule kallisto_quant:
    input:
        idx='/fullpath/snakemake-example/Kallisto_test/Arabidopsis_thaliana.fa.index'
        fwd='/fullpath/snakemake-example/Kallisto_test/Condition1_R1_008.trimmed.fastq.gz'
        rvs='/fullpath/snakemake-example/Kallisto_test/Condition1_R2_008.trimmed.fastq.gz'
    output:
        '/Condition1'
    threads: 10
    shell:
        'kallisto quant -i {input.idx} -o {output} -b 100 {input.fwd} {input.rvs}'

运行此命令时,出现语法错误:

SyntaxError in line 4 of /fullpath/snakemake-example/Snakefile:
invalid syntax

通过参考snakemake手册,我看不到任何语法错误。这是什么问题?

谢谢。

1 个答案:

答案 0 :(得分:1)

input中缺少逗号。另外,我相信snakemake要求output是文件而不是目录,这是您在示例中使用的。

rule kallisto_quant:
    input:
        idx='/fullpath/snakemake-example/Kallisto_test/Arabidopsis_thaliana.fa.index',
        fwd='/fullpath/snakemake-example/Kallisto_test/Condition1_R1_008.trimmed.fastq.gz',
        rvs='/fullpath/snakemake-example/Kallisto_test/Condition1_R2_008.trimmed.fastq.gz'
    output:
        '/Condition1'
    threads: 10
    shell:
        'kallisto quant -i {input.idx} -o {output} -b 100 {input.fwd} {input.rvs}'