目录
- 摘要
- 问题汇总
-
- 1. MissingInputException: Missing input files for rule XXX:
- 2. SyntaxError in line 28 of /path/to/snakefile: invalid syntax
- 3. SyntaxError in line 25 of /path/to/snakefile: Expected name or colon after rule or checkpoint keyword.
- 4. RuleException in line 114 of /path/to/snakefile: NameError: The name 'XXX' is unknown in this context. Did you mean 'wildcards.XXX'?
- 5. Wildcards in input files cannot be determined from output files: 'XXXXXX'
- 6. Not all output, log and benchmark files of rule trim_galore contain the same wildcards. This is crucial though, in order to avoid that two or more jobs write to the same file.
- 7. RuleException in line 113 of /path/to/snakefile: 'InputFiles'/'OutputFiles' object has no attribute 'xxx'
- 8.TypeError in line 140 of /path/to/snakefile: shellcmd() takes 2 positional arguments but 3 were given
- 9.NameError in line 156 of /path/to/snakefile: name 'xxx' is not defined
- 10. IndentationError in line 165 of : unindent does not match any outer indentation level
- 总结
摘要
最近用snakemake搭建了组装流程和WGS流程。有些问题会反复遇到,于是干脆把常见的snakemake问题整理出来,做好记录的同时,希望能帮助大家少走弯路。
问题汇总
1. MissingInputException: Missing input files for rule XXX:
输入文件找不到,请检查config文件里或者脚本引入的样品名称以及rule参与的整个pipe中的文件格式是否有问题(如fastq.gz写成fq.gz,R1/R2没有加R什么的)。报错里面的rule XXX 并不代表该规则有问题,而是这个规则所在的整个pipeline中的某个输入文件名有问题。由于snakemake的结果倒推机制(我自己这么理解并称呼的哈哈),根据rule all里得到的结果去反推整个pipeline,这里报错的应该是该pipe上的第一条rule。
2. SyntaxError in line 28 of /path/to/snakefile: invalid syntax
无效语法,在input或者output中输入两