【发布时间】:2020-09-09 19:35:17
【问题描述】:
我正在尝试使用带有 Minimap2 的 Porechop 处理 MinION cDNA 扩增子,但出现此错误。
MissingInputException in line 16 of /home/sean/Desktop/reo/antisera project/20200813/MinIONAmplicon.smk:
Missing input files for rule minimap2:
8413_19_strict/BC01.fastq.g
我明白错误告诉我什么,我只是明白为什么它没有尝试在它之前制定规则。 Porechop 用于检查所有可能的条形码,如果在目录中找到多个条形码,它将输出多个fastq 文件。但是,由于我知道我在寻找什么条形码,所以我在 config.yaml 文件中创建了一个 barcodes 部分,以便将它们映射在一起。
我认为该错误正在发生,因为我的 Porechop 目标输出与 minimap2 的输入不匹配,但我不知道如何纠正此问题,因为 porechop 可能有多个输出。
我以为我正在为 minimap2 规则的输入文件构建路径,当 snakemake 发现 porechop 输出不存在时,它会成功,但事实并非如此。
这是我目前的管道,
configfile: "config.yaml"
rule all:
input:
expand("{sample}.bam", sample = config["samples"])
rule porechop_strict:
input:
lambda wildcards: config["samples"][wildcards.sample]
output:
directory("{sample}_strict/")
shell:
"porechop -i {input} -b {output} --barcode_threshold 85 --threads 8 --require_two_barcodes"
rule minimap2:
input:
lambda wildcards: "{sample}_strict/" + config["barcodes"][wildcards.sample]
output:
"{sample}.bam"
shell:
"minimap2 -ax map-ont -t8 ../concensus.fasta {input} | samtools sort -o {output}"
还有yaml文件
samples: {
'8413_19': relabeled_reads/8413_19.raw.fastq.gz,
'8417_19': relabeled_reads/8417_19.raw.fastq.gz,
'8445_19': relabeled_reads/8445_19.raw.fastq.gz,
'8466_19_104': relabeled_reads/8466_19_104.raw.fastq.gz,
'8466_19_105': relabeled_reads/8466_19_105.raw.fastq.gz,
'8467_20': relabeled_reads/8467_20.raw.fastq.gz,
}
barcodes: {
'8413_19': BC01.fastq.gz,
'8417_19': BC02.fastq.gz,
'8445_19': BC03.fastq.gz,
'8466_19_104': BC04.fastq.gz,
'8466_19_105': BC05.fastq.gz,
'8467_20': BC06.fastq.gz,
}
【问题讨论】:
标签: snakemake