R/ks.docker.update_progress.R

Defines functions ks.docker.update_progress

Documented in ks.docker.update_progress

#' ks.docker.update_progress
#'
#' Helper for docker. Updates progress of analysis by 1 step.
#'
#' @export
#'
ks.docker.update_progress = function(verbose = F) {
    if (file.exists("var_progress.txt")) {
       old = readLines("var_progress.txt")
        new = as.numeric(old) + 1
        writeLines(as.character(new), "var_progress.txt", sep = "")
    } else {
        writeLines("1", "var_progress.txt")
    }
    if(verbose) { cat(paste0("Current progress: ", readLines("var_progress.txt") )) }
}
kstawiski/miRNAselector documentation built on Oct. 10, 2020, 9:03 a.m.