Skip to content
Snippets Groups Projects
Commit 4764d817 authored by Todor Kondić's avatar Todor Kondić
Browse files

envopts: seal_envopts: Update.

parent 9b08d6ea
No related branches found
No related tags found
No related merge requests found
...@@ -89,7 +89,7 @@ seal_envopts <- function(o) { ...@@ -89,7 +89,7 @@ seal_envopts <- function(o) {
if (is.null(o$metfrag$java_bin)) o$metfrag$java_bin=Sys.which("java") if (is.null(o$metfrag$java_bin)) o$metfrag$java_bin=Sys.which("java")
if (is.null(o$metfrag$jar)) o$metfrag$jar = "" if (is.null(o$metfrag$jar)) o$metfrag$jar = ""
if (is.null(o$metfrag$max_proc)) o$metfrag$max_proc = parallel::detectCores() if (is.null(o$metfrag$max_proc)) o$metfrag$max_proc = parallel::detectCores()
if (is.null(o$no_structure_plots)) o$no_structure_plots = F
check_dir_absent(o$projects,what="projects-dir") check_dir_absent(o$projects,what="projects-dir")
o$projects = norm_path(o$projects) o$projects = norm_path(o$projects)
......
...@@ -81,7 +81,7 @@ envopts_from_dirs <- function(dirs) { ...@@ -81,7 +81,7 @@ envopts_from_dirs <- function(dirs) {
trim_tmp_paths_envopts <- function(x) { trim_tmp_paths_envopts <- function(x) {
y=list() y=list()
for (n in setdiff(names(x),"metfrag")) { for (n in setdiff(names(x),c("metfrag","no_structure_plots"))) {
y[[n]] = basename(x[[n]]) y[[n]] = basename(x[[n]])
} }
...@@ -90,6 +90,7 @@ trim_tmp_paths_envopts <- function(x) { ...@@ -90,6 +90,7 @@ trim_tmp_paths_envopts <- function(x) {
y$metfrag[[n]]=basename(x$metfrag[[n]]) y$metfrag[[n]]=basename(x$metfrag[[n]])
} }
y$metfrag$max_proc = x$metfrag$max_proc y$metfrag$max_proc = x$metfrag$max_proc
y$no_structure_plots = y$no_structure_plots
y y
} }
......
...@@ -9,9 +9,10 @@ test_that("Test basic initialisation.",{ ...@@ -9,9 +9,10 @@ test_that("Test basic initialisation.",{
metfrag_jar = file.path(dirs$mfjardir,"metfrag.jar"), metfrag_jar = file.path(dirs$mfjardir,"metfrag.jar"),
java_bin = file.path(dirs$mfjardir,"java"), java_bin = file.path(dirs$mfjardir,"java"),
metfrag_max_proc=3L, metfrag_max_proc=3L,
no_structure_plots=F,
merge=F, merge=F,
save=F) save=F)
## Function `gen_test_dirs' creates shinyscreen root structure in ## Function `gen_test_dirs' creates shinyscreen root structure in
## a temp dir. We need to strip the random part for comparison. ## a temp dir. We need to strip the random part for comparison.
y = trim_tmp_paths_envopts(x) y = trim_tmp_paths_envopts(x)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment