当我想运行我的代码时出现NameError Snakemake

时间:2019-05-28 16:19:41

标签: snakemake

我遇到了制蛇问题!我想通过提供SRR认证编号作为示例来下载fastq文件。但是,当我运行我的代码时,它说名称样本未知。但这是定义的!

config.yaml

samples: ["SRR8181579"]
SRAToolKit: sratoolkit.2.9.6-centos_linux64/bin/fastq-dump

snakefile:

configfile: "config.yaml"

rule all:
    input:
        expand("{sample}.fastq", sample = config["samples"])

rule get_fastq:
    output:
        '{sample}.fastq'
    wildcard_constraints:
        sample="SRR\d+"
    message:
      "Downloading the fastq files"
    shell:
        '{config[SRAToolKit]} {sample}'

我得到的错误:

  /data/storix2/student/Thema11/dme/projectThema11/fastq.Pipeline的第7行中的

RuleException:   NameError:在这种情况下,名称“ sample”是未知的。请确保您定义了该变量。还要注意,不用于变量访问的花括号必须通过重复它们来转义,即{{print $ 1}}

0 个答案:

没有答案