Dear Gitlab users, due to maintenance reasons, Gitlab will not be available on Thursday 30.09.2021 from 5:00 pm to approximately 5:30 pm.

Commit 3d6a038c authored by daniel.eilertz's avatar daniel.eilertz
Browse files

Removed git logging | Removed post analysis code | logfile is created in wrapper script on server

parent d7349fe4
......@@ -34,7 +34,7 @@ process_batch <- function(nowfolder = "", parameters = list(), return_msd=FALSE)
}
# Remove existing log file and create new one
system(paste0("rm ", file.path(nowfolder, "R_messages.log")))
#system(paste0("rm ", file.path(nowfolder, "R_messages.log")))
# Initialize prm (global settings)
prm <- initialize_prm()
......@@ -77,33 +77,6 @@ process_batch <- function(nowfolder = "", parameters = list(), return_msd=FALSE)
sink(prm$log_con, append=TRUE) # output errors and messages to log file
}
# Log git info ------------------------------
# tryCatch({
# cat(paste(timestamp(), '\n Now running process_batch.R',
# '\n\n Current user: ', Sys.info()[["user"]], '\n \n'), file=prm$log_con)
# scriptgithash <- automrmgithash <- helperfilesgithash <- ''
#
# if (dir.exists('~/data/helperfiles')) {
# helperfilesgithash <- system(paste0("git --git-dir=", prm$pathprefix, "data/helperfiles/.git describe --always"), intern=TRUE)
# cat(paste('\n\n Gitlab repository for helperfiles: https://gitlab.gwdg.de/joerg.buescher/helperfiles
# Commit hash: ', helperfilesgithash), file=prm$log_con)
# }
# if (dir.exists('~/data/automRm')) {
# automrmgithash <- system(paste0("git --git-dir=", prm$pathprefix, "data/automRm/.git describe --always"), intern=TRUE)
# cat(paste('\n\n Gitlab repository for automRm: https://gitlab.gwdg.de/joerg.buescher/automrm
# Commit hash: ', automrmgithash,
# ), file=prm$log_con)
# }
# if (dir.exists('~/code/R_analysis')) {
# scriptgithash <- system(paste0("git --git-dir=", prm$pathprefix, "code/R_analysis/.git describe --always"), intern=TRUE)
# cat(paste('\n\n Gitlab repository for processing script: https://gitlab.gwdg.de/daniel.eilertz/ms-web
# Commit hash: ', scriptgithash), file=prm$log_con)
# }
# rm('helperfilesgithash', 'scriptgithash', 'automrmgithash')
# }, error = function(err) {
# # not in docker container used for development, do nothing
# })
# load random forest models and add to parameter list
if (prm$ml_type %in% c('mlprod', 'mltrain_pcand') ) { #(!(prm$ml_train && (prm$ml_type == 'initial'))) {
load(file = prm$model_rf_path) # 1. model to detect best peak in MRM
......@@ -126,7 +99,7 @@ process_batch <- function(nowfolder = "", parameters = list(), return_msd=FALSE)
# Read mzML-files for unirt, chromdata and samplenames (from files or Rdata-file, if present)-----------
# if (!file.exists("mzML.rds")) {
smpl <- read_mzmlfiles( list.files(path = prm$batchdir, pattern='.mzML'), prm)
smpl <- read_mzmlfiles( list.files(path = prm$batchdir, pattern='.mzML'), prm)
# saveRDS(smpl, "mzML.rds") # ! NEEDED for testing, because data structure has been changed!
# }else{
# smpl <- readRDS("mzML.rds")
......@@ -208,28 +181,6 @@ process_batch <- function(nowfolder = "", parameters = list(), return_msd=FALSE)
}
# tryCatch({
# # Call sample postprocessing if in pipeline mode
# if (!(as.character(Sys.info()[["user"]]) == 'rstudio') && !prm$runninglocal ){
# rm(list = ls()) # empty workspace to avoid out of memory options
# gc()
# # system("chmod 777 overviewheatmap.pdf", intern=FALSE, wait=FALSE)
# system("python3 /code/msweb/metabolomics/help/sample_postprocessing.py", intern=FALSE, wait=FALSE)
# }
# # cat('\nSettings overview: \n')
# # cat(as.character(prm),file=prm$log_con)
# print ('qqq_auto_integrate complete.')
#
# # tidy up
# # setwd(originalwd)
# par(pardefault)
#
# }, error = function(err) {
# # if tidying up doesn't work, well too bad.
# })
#
# msd
} # endfunction
......
Markdown is supported
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