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

R/api.R, R/mix.R: Save extracted data

* R/mix.R(new_state): Add new conf field, m$extr$fn, to hold the name
  of the file where the extracted data is saved.

* R/api.R(extr_data): Save extracted data.
parent 650de956
No related branches found
No related tags found
No related merge requests found
......@@ -283,10 +283,13 @@ extr_data <- function(m) {
})
m$extr$ms1 <- data.table::rbindlist(lapply(m$extr$tmp, function (e) e$ms1))
m$extr$ms2 <- data.table::rbindlist(lapply(m$extr$tmp, function (e) e$ms2))
m$extr$ms2 <- data.table::rbindlist(lapply(m$extr$tmp, function (e) e$ms2))
message('Saving extracted date to ', m$extr$fn)
saveRDS(object = m$extr, file = m$extr$fn)
message('Done saving extracted data.')
m$extr$tmp <- NULL
m
}
......@@ -722,6 +722,7 @@ new_state <- function(conf=NULL,fn_conf="",GUI=F) {
m <- list()
m$conf <- if (!is.null(conf)) conf else read_conf(fn_conf)
if (is.null(m$conf$debug)) m$conf$debug <- F
m$extr$fn <- file.path(m$conf$project,"extracted.rds")
m$GUI <- GUI
m$out$tab <- list()
m$input$tab$mzml <- EMPTY_MZML
......
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