2017-10-03 22 views
1

나는 hicpipe 도구를 실행하고 실행 중에이 오류를 반환합니다. 그것의 오류 :실행 중지 오류 R

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 코드를 실행 한 : total_expected_counts_wrapper.r의

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 

코드는 다음과 같습니다

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 파일을 볼 수 있지만 추적 변수를 찾을 수 없습니다. 저자에게 전자 메일을 보내지 만 응답이 없습니다. model_predict.r에서

답변

0

source("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 코드를

(Rsge/sge.optionR 동일 변수의 설정 값)을 편집 및 Rsge를 재설치 workarounded.

1 
    2           # $Id: sge.parRapply.R,v 1.2 2006/12/15 15:21:23 kuhna03 Exp $ 
    3 
    4 sge.apply <- function(X, MARGIN, FUN, ..., 
    5       join.method=cbind, 
    6       njobs, 
    7       batch.size=options('sge.block.size'), 
    8       packages=NULL, 
    9       global.savelist=NULL, 
10       function.savelist=NULL, 
11       cluster=options('sge.use.cluster'), 
12       #trace=options('sge.trace'), 
13       trace=TRUE, 
14       #debug=options('sge.debug'), 
15       debug=FALSE, 
16       file.prefix=options('sge.file.prefix') 
17       ) {