R中的执行暂停错误

k97glaaz  于 2023-02-06  发布在  其他
关注(0)|答案(1)|浏览(197)

我运行hippipe工具,它在执行过程中返回此错误。它的错误是:

Rsge temp files: tmp/Rsge.test_cluster.binned.*
Error in if (trace) cat("Running locally \n") :
argument is of length zero
Calls: compute.total.counts -> model.predict.split -> sge.parRapply
Execution halted
Error: error in total_expected_counts_wrapper.r
Execution halted
make[1]: *** [/home/dashti/hicpipe/output/test_cluster/test_cluster.nm] 
Error 1
make[1]: Leaving directory `/home/dashti/hicpipe'
make: *** [all] Error 1

运行了以下Rscript代码:

Rscript  R/total_expected_counts_wrapper.r /home/dashti/hicpipe/output/test_cluster/test_cluster /home/dashti/hicpipe/models/map_len_gc.mdl trans 1e+06 0 200

总期望计数 Package 器.r的代码为:

options(warn=1)

# get script name
all.args = commandArgs(F)
fn.arg = "--file="
script.name = sub(fn.arg, "", all.args[grep(fn.arg, all.args)])

args = commandArgs(T)
if (length(args) == 1) {
  cat(sprintf("usage: %s <input prefix> <model file> <filter>     <cis.threshold> <use cluster> <max jobs on cluster>\n",
              script.name))
  q(status=1) 
}

ifn.prefix = args[1]
model.ifn = args[2]
filter = args[3]
cis.threshold = as.numeric(args[4])
cluster = (args[5] == "1")
max.njobs = as.numeric(args[6])

mtable = read.delim(model.ifn)
mfields = mtable$field
maxvals = mtable$size

if (cluster) {
  cat("Using Sun Grid Engine cluster\n")
} else {
  cat("Not using Sun Grid Engine cluster, running sequentially on local     machine\n")
}

source("R/model_predict.r")
compute.total.counts(prefix=ifn.prefix, cluster=cluster,     max.njobs=max.njobs, ofields=mfields, max.vals=maxvals, filter=filter,     cis.threshold=cis.threshold)

q(status=0)

我该怎么办?我看到其他.R文件,但在其中找不到任何跟踪变量。我向作者发送电子邮件,但没有收到任何回复。

jpfvwuh4

jpfvwuh41#

source("R/model_predict.r")
在model_predict.r中,加载Rsge库

173   library(Rsge)
174   sge.options(sge.save.global=F)
175   sge.prefix = paste("tmp/Rsge.", get.short.fn(fends.fn), ".", sep="")
176   cat(sprintf("Rsge temp files: %s*\n", sge.prefix))
177   sge.options(sge.file.prefix=sge.prefix)
178 
179   result = sge.parRapply(ranges, model.predict, lib.dir=lib.dir,
180                          njobs=njobs, join.method=c, cluster=cluster,
181                          fends.fn=fends.fn, log.dir=log.dir,
182                          prior=prior, mfields=mfields, mfields.maxvals=mfields.maxvals, mfields.fns=mfields.fns,
183                          filter=filter, cis.threshold=cis.threshold, ofields.x=ofields.x, ofields.y=ofields.y,
184                          function.savelist=c("get.short.fn", "get.ofield.args"))
185   if (class(result) == "list" && class(result[[1]]) == "try-error")
186     return (-1)

而且Rsge似乎不能正常工作。
我通过编辑Rsge/sge.parApply.R代码解决了这个问题
(set变量值等于Rsge/sge.optionR)
并重新安装Rsge。

相关问题