Snakemake:R脚本(几乎)立即失败

时间:2018-01-25 10:17:28

标签: r snakemake

我再一次在我的snakemake工作流程中遇到一个对我没有任何意义的错误。

这是我得到的错误:

[Thu Jan 25 10:47:00 2018] Building DAG of jobs...
[Thu Jan 25 10:47:01 2018] Provided cores: 24
[Thu Jan 25 10:47:01 2018] Rules claiming more threads will be scaled down.
[Thu Jan 25 10:47:01 2018] Job counts:
[Thu Jan 25 10:47:01 2018]  count   jobs
[Thu Jan 25 10:47:01 2018]  1   merging_seurat
[Thu Jan 25 10:47:01 2018]  1

[Thu Jan 25 10:47:01 2018] Job 0: --- Merging samples using seurat.

Error in setClass("Snakemake", slots = c(input = "list", output = "list",  : 
  unused argument(s) (slots = c(input = "list", output = "list", params = "list", wildcards = "list", threads = "numeric", log = "list", resources = "list", config = "list", rule = "character"))
Execution halted
[Thu Jan 25 10:47:02 2018] Error in rule merging_seurat:
[Thu Jan 25 10:47:02 2018]     jobid: 0
[Thu Jan 25 10:47:02 2018]     output: merging_seurat/12_top10_heatmap_all_wilcox.pdf, merging_seurat/13_top10_heatmap_all_roc.pdf, merging_seurat/merging_seurat.RData

[Thu Jan 25 10:47:02 2018] RuleException:
[Thu Jan 25 10:47:02 2018] CalledProcessError in line 372 of .../snakemake_pipeline/Snakefile:
[Thu Jan 25 10:47:02 2018] Command ' set -euo pipefail;  Rscript .../snakemake_pipeline/scripts/.snakemake.jv8ijpiw.merging_seurat.R ' returned non-zero exit status 1
[Thu Jan 25 10:47:02 2018]   File ".../snakemake_pipeline/Snakefile", line 372, in __rule_merging_seurat
[Thu Jan 25 10:47:02 2018]   File ".../tools/anaconda3/envs/Seurat/lib/python3.5/concurrent/futures/thread.py", line 55, in run
[Thu Jan 25 10:47:02 2018] Will exit after finishing currently running jobs.
[Thu Jan 25 10:47:02 2018] Exiting because a job execution failed. Look above for error message
[Thu Jan 25 10:47:02 2018] Complete log: .../snakemake_6/.snakemake/log/2018-01-25T104700.498155.snakemake.log

这是有问题的规则:

rule merging_seurat:
  input:   expand("{sample}/molecule_count/counts_wide.tsv", sample=config["samples"]),
  output:  "merging_seurat/12_top10_heatmap_all_wilcox.pdf",
           "merging_seurat/13_top10_heatmap_all_roc.pdf",
           "merging_seurat/merging_seurat.RData"
  message: "--- Merging samples using seurat."
  script:   "scripts/merging_seurat.R"

这里我们有一个仍然执行的R脚本的顶部:

sink('merging_seurat/output.txt')
print(installed.packages())
print(sessionInfo())
sink()

以下是R脚本中不再执行的行:

library('Seurat')
library('dplyr')
library('org.Hs.eg.db')

因为我记录了可用的软件包,所以我知道应该加载的三个软件包也已安装,因此不应该因此而失败。实际上,对这些行进行注释不会改变任何内容,脚本仍会中断,加载包后应该立即发送的日志消息不会写入日志文件。

最后,这是我用来运行snakemake的命令:

snakemake --use-conda \
--latency-wait 90 \
--rerun-incomplete \
--keep-going \
--timestamp \
--cluster-config SGE.json \
--cluster "qsub -cwd -N {cluster.name} -l h_vmem={cluster.h_vmem},h_stack=256M -o {cluster.stdout}{cluster.name}.o -e {cluster.stderr}{cluster.name}.e -m {cluster.mailtype} -M {cluster.mailuser}" \
-j 8 \
--directory .../snakemake_6

有人知道错误信息的含义吗? snakemake R对象的unused argument很奇怪,因为我稍后会在脚本中调用多个参数。

更奇怪的是,我有另一个R脚本可以使用不同的包,但是第一行非常相似。我记得在开始时我遇到了与该脚本相同的问题(相同的错误信息),但不记得我是如何解决它的。

非常感谢任何帮助。

0 个答案:

没有答案