Commit ceb905da authored by Sander Bollen's avatar Sander Bollen
Browse files

gracecully exit

parent e0e20fa1
......@@ -26,7 +26,20 @@ windowLength <- opt$wl
bamFile <- args
BAMFiles <- strsplit(c(bamFile), " ")[[1]]
bamDataRanges <- getReadCountsFromBAM(BAMFiles, mode="paired", refSeqName=chromosome, WL=windowLength, parallel=opt$threads)
bamDataRanges <- tryCatch(
{
getReadCountsFromBAM(BAMFiles, mode="paired", refSeqName=chromosome, WL=windowLength, parallel=opt$threads)
},
error = function(e) {
quit("no")
},
warning = function(w) {
quit("no")
},
finally = {
}
)
write.table(as.data.frame( bamDataRanges ), quote = FALSE, opt$rawoutput, row.names=FALSE)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment