[英]Snakemake not recognizing multiple files as input
我在运行 snakemake 时遇到了一些问题。 我想使用 FastQC 对一些 RNA-Seq 批量样本进行质量控制。 我编写代码的方式是,所有遵循模式{sample}_{replicate}.fastq.gz
的文件都应该用作输入,其中{sample}
是样本 id(即 SRR6974023), {replicate}
是 1或 2. 我的小脚本如下:
configfile: "config.yaml"
rule all:
input:
expand("raw_qc/{sample}_{replicate}_fastqc.{extension}", sample=config["samples"], replicate=[1, 2], extension=["zip", "html"])
rule fastqc:
input:
rawread=expand("raw_data/{sample}_{replicate}.fastq.gz", sample=config["samples"], replicate=[1, 2])
output:
compress=expand("raw_qc/{sample}_{replicate}_fastqc.zip", sample=config["samples"], replicate=[1, 2]),
net=expand("raw_qc/{sample}_{replicate}_fastqc.html", sample=config["samples"], replicate=[1, 2])
threads:
8
params:
path="raw_qc/"
shell:
"fastqc -t {threads} {input.rawread} -o {params.path}"
就是这样, config.yaml
是:
samples:
SRR6974023
SRR6974024
我的文件的raw_data
目录如下所示:
SRR6974023_1.fastq.gz SRR6974023_2.fastq.gz SRR6974024_1.fastq.gz SRR6974024_2.fastq.gz
最后,当我运行脚本时,我总是看到同样的错误:
Building DAG of jobs...
MissingInputException in line 8 of /home/user/path/Snakefile:
Missing input files for rule fastqc:
raw_data/SRR6974023 SRR6974024_2.fastq.gz
raw_data/SRR6974023 SRR6974024_1.fastq.gz
它只正确看到最后一个文件,在这种情况下SRR6974024_1.fastq.gz
和SRR6974024_2.fastq.gz
。 无论如何,另一个它只被视为SRR6974023
。 我该如何解决这个问题? 我很感激一些帮助。 谢谢你们!
yaml
配置不正确。 它应该-
将每一行变成一个列表:
samples:
- SRR6974023
- SRR6974024
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.