Skip to content

Commit

Permalink
添加更多检查和提示 #10
Browse files Browse the repository at this point in the history
  • Loading branch information
ShixiangWang committed Jun 27, 2020
1 parent cfea905 commit 2b49298
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions R/DoAbsolute.R
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ DoAbsolute <- function(Seg, Maf = NULL,
dir.create(results.dir, recursive = TRUE, showWarnings = TRUE)
}

if (file.exists(file.path(results.dir, "error.log"))) {
unlink(file.path(results.dir, "error.log"))
cat("-> Removed previous error log file.\n")
}

if (!suppressMessages(requireNamespace("ABSOLUTE"))) {
stop("Find no package called 'ABSOLUTE', please install it...")
}
Expand Down Expand Up @@ -473,6 +478,10 @@ DoAbsolute <- function(Seg, Maf = NULL,
unlink(temp.dir, recursive = TRUE, force = TRUE)
}

if (file.exists(file.path(results.dir, "error.log"))) {
cat("-> Error log info detected, see error.log under result directory for details.\n")
}

cat("-> Done.\n")
}

Expand Down

0 comments on commit 2b49298

Please sign in to comment.