Skip to content
Snippets Groups Projects
Unverified Commit c05a3cef authored by Todor Kondic's avatar Todor Kondic
Browse files

Modify write_conf and read_conf

* R/api.R(read_conf): The call of vrfy_conf removed due to some
  conflicts. Reinstate verification somewhere else.

* R/api.R(write_conf): Substitute conf with m argument.

(read_conf): Conflicts with the one in R/aip.R, so removed.
parent 776491db
No related branches found
No related tags found
No related merge requests found
......@@ -107,12 +107,15 @@ mk_comp_tab <- function(m) {
}
##' @export
read_conf <- function(fn_conf) {
assert(file.exists(fn_conf),msg=paste("Unable to read the configuration file:", fn_conf))
conf <- yaml::yaml.load_file(fn_conf)
conf <- vrfy_conf(conf)
conf
read_conf <- function(fn) {
yaml::yaml.load_file(fn)
}
## read_conf <- function(fn_conf) {
## assert(file.exists(fn_conf),msg=paste("Unable to read the configuration file:", fn_conf))
## conf <- yaml::yaml.load_file(fn_conf)
## conf <- vrfy_conf(conf)
## conf
## }
##' @export
vrfy_conf <- function(conf) {
......
......@@ -596,12 +596,16 @@ read_setid <- function(fn,known,unk) {
}
write_conf <- function(conf,fn) {
yaml::write_yaml(x=conf,file=fn)
write_conf <- function(m,fn) {
m$conf$data <- file.path(m$conf$project,FN_DATA_TAB)
yaml::write_yaml(x=m$conf,file=fn)
}
read_conf <- function(fn) {
yaml::yaml.load_file(fn)
write_state <- function(m,fn_conf) {
write_conf(m,fn_conf)
tab2file(tab=m$input$tab$mzml,file=file.path(m$conf$project,FN_DATA_TAB))
}
new_state <- function(conf,GUI) {
......
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