Commit e2bd3abb authored by mmassaviol's avatar mmassaviol
Browse files

Remove predefined tools

parent 28f0dfea
......@@ -3,30 +3,30 @@ library(yaml)
path_yml <- "/home/mbb/Documents/waw/workflows/RNAseq/sag.yaml"
path_tools <- "/home/mbb/Documents/waw/tools"
#path_tools <- "/home/mbb/Documents/waw/tools"
APP <<- yaml.load_file(path_yml)$App
files_tools <- paste0(path_tools,'/', list.files(path_tools,pattern = "sag.yml",recursive = TRUE))
#files_tools <- paste0(path_tools,'/', list.files(path_tools,pattern = "sag.yml",recursive = TRUE))
#============================================================
get_predefined_tool <- function(path) {
all <- list()
# get_predefined_tool <- function(path) {
# all <- list()
index <- 1
for(f in files_tools) {
yml <- yaml.load_file(f)
if(length(yml) == 0) {
all <- list(yaml.load_file(f))
} else {
all[[index]] <- yaml.load_file(f)
}
index <- index + 1
}
# index <- 1
# for(f in files_tools) {
# yml <- yaml.load_file(f)
# if(length(yml) == 0) {
# all <- list(yaml.load_file(f))
# } else {
# all[[index]] <- yaml.load_file(f)
# }
# index <- index + 1
# }
return(all)
}
# return(all)
# }
#============================================================
......@@ -236,24 +236,24 @@ generate_page_input <- function(res, cnt) {
#============================================================
get_predefined_box <- function(box, page_name) {
new_box <- NULL
for(t in YML_TOOLS) {
if(t$name == box$name) {
new_box <- t
# get_predefined_box <- function(box, page_name) {
# new_box <- NULL
# for(t in YML_TOOLS) {
# if(t$name == box$name) {
# new_box <- t
if(box$concat_name_param == TRUE) {
for(z in 1:length(new_box$content)) {
new_box$content[[z]]$name <- page_name + "_" + new_box$content[[z]]$name
}
}
# if(box$concat_name_param == TRUE) {
# for(z in 1:length(new_box$content)) {
# new_box$content[[z]]$name <- page_name + "_" + new_box$content[[z]]$name
# }
# }
break
}
}
# break
# }
# }
return(new_box)
}
# return(new_box)
# }
#============================================================
......@@ -739,7 +739,7 @@ generate <- function() {
print("Generate Start")
YML_TOOLS <<- get_predefined_tool(files_tools)
#YML_TOOLS <<- get_predefined_tool(files_tools)
if(dir.exists(APP$project)) {
#unlink(APP$project, recursive=TRUE)
......
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