Skip to content

Commit

Permalink
Committing any local changes from willia51 before sync with remote se…
Browse files Browse the repository at this point in the history
…rver.
  • Loading branch information
alexgraehl committed Jul 17, 2018
1 parent 06dd62a commit fb11a27
Showing 1 changed file with 2 additions and 20 deletions.
22 changes: 2 additions & 20 deletions Lab_Code/R/template.R
Expand Up @@ -3,9 +3,8 @@
# First, attempt to load Alex's common utility code off the filesystem. Hopefully this already exists somewhere!
# Note that we NORMALLY attempt to load this based on where the "R_BINF_CORE" variable is, but we also a few hard-coded locations in case that environment variable isn't there.
for (tryFile in c(file.path(Sys.getenv("R_BINF_CORE"), "Utility", "agwUtil.R")
, "/work/Common/Code/R_Binf_Core/Utility/agwUtil.R"
, "~/TimeForScience/Lab_Code/R/AGW/agwUtil.R"
, "./agwUtil.R")) {
, "/work/Common/Code/R_Binf_Core/Utility/agwUtil.R"
, "~/TimeForScience/Lab_Code/R/AGW/agwUtil.R", "./agwUtil.R")) {
if (file.exists(tryFile)) { source(tryFile); break; }
}
if (!exists("print.agw")) {
Expand All @@ -27,20 +26,3 @@ errlog <- function(...) { msg=paste0(...);print0(msg);warning(msg); GLOBAL_ERROR
# ======================================================================================











# qsubize <- function(cmd, name_prefix="X") { # Returns a qsub wrapper for the command 'cmd'
# QSUB_EXE <- system2("which", args=c("qsub"), stdout=T); stopifnot(file.exists(QSUB_EXE))
# username <- Sys.info()[["user"]]
# persistent_n <- ifelse(is.null(attr(qsubize, "sum")), yes=0, no=(attr(qsubize, "sum")+1)) # <-- 'n' will be a "static" variable that persists between function calls
# attr(qsubize, "sum") <<- persistent_n # note the "<<-" to save this to the global scope!!!
# cmd <- paste0("echo \"", cmd, "\" | ", QSUB_EXE, " -V -N \"B2B_", name_prefix, "_", persistent_n, "_", username, "\"", "\n")
# return(cmd)
# }

0 comments on commit fb11a27

Please sign in to comment.