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

Add top-level auto-prescreening function

* R/api.R (prescreen): New function. This exported funciton performs a
  range of checks on the spectra in m$extr$ms and produces the initial
  m$out$tab$ftab file table.
parent 076ca8f4
No related branches found
No related tags found
No related merge requests found
......@@ -9,6 +9,7 @@ export(load_compound_input)
export(load_data_input)
export(load_inputs)
export(mk_comp_tab)
export(prescreen)
export(run)
export(run_in_dir)
import(data.table)
......
......@@ -293,3 +293,14 @@ conf_trans <- function(conf) {
conf$prescreen <- conf_trans_pres(conf$prescreen)
conf
}
##' @export
prescreen <- function(m) {
## Top-level auto prescreening function.
m$qa <- create_qa_table(m$extr$ms,m$conf$prescreen)
mms1 <- assess_ms1(m)
m <- assess_ms2(mms1)
fields <- c("Files","adduct","ID",QA_COLS)
m$out$tab$ftab <- merge(m$out$tab$comp,m$qa$ms[,..fields],by=c("Files","adduct","ID"))
m
}
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