snakemake - snakemake 5.5.4 中的不正确输出异常
问题描述
我是snakemake的新手,最近我遇到了一个新错误,我只能从最新版本的snakemake中得到。这是我的蛇制造规则
rule fastqc_raw:
input:
expand(directory("{fastqc_dir}/{samples}_fastqc/"),fastqc_dir = FASTQC_DIR, samples = SAMPLES_wo_extension)
rule do_fastqc_raw:
input:
expand("{fastq_dir}/{{samples}}.fastq.gz", fastq_dir = inputDir)
output:
expand(directory("{fastqc_dir}/{{samples}}_fastqc/"),fastqc_dir = FASTQC_DIR)
log:
expand("{fastqc_dir}/{{samples}}.log", fastqc_dir = FASTQC_DIR)
threads:
10
message:
"performing fastQC of the sample : {wildcards.samples}"
shell:
"""mkdir -p {output} && fastqc -q -t {threads} --outdir {output} --contaminants /home/Contaminants/idot.txt {input} 2> {log}"""
当我使用低于 5.2.0 的 snakemake 版本时,我收到以下错误
/home/FASTQC.snakefile 第 10 行中的 ImproperOutputException:输出类型不正确(期望文件时的目录,反之亦然)。输出目录必须用 directory() 标记。对于规则 do_fastqc_raw:
解决方案
我认为您directory
在规则中处于错误的位置do_fastqc_raw
。
这个:
output:
expand(directory("{fastqc_dir}/{{samples}}_fastqc/"),fastqc_dir = FASTQC_DIR)
应该:
output:
directory(expand("{fastqc_dir}/{{samples}}_fastqc/", fastqc_dir = FASTQC_DIR))
推荐阅读
- python - 以阴影突出显示时间序列数据中的类别列
- php - (Laravel 5.8 with Socialite for Google Login)注册或登录系统成功后,网站不会变为登录状态
- .net-core - HTTP 请求未经授权,在 Dot Net 核心 3.1 升级中使用 NAV SOAP 客户端的客户端身份验证方案“基本”
- reactjs - 如何从动态反应材料 UI 文本字段循环中删除逗号
- java - Vert.x 框架中的 ContainerRequestContext getProperty 等效项
- java - 如何根据 java map 中的最低键值获取值
- javascript - 什么是 !!运算符在 JavaScript 中是什么意思?
- ios - HealthKit HKObserverQuery 没有持续触发
- video - 使用 gstreamer 对 H.265 进行逐行扫描
- c - 子进程死亡后父进程不从 FIFO 中读取