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

Update mix.R

* R/mix.R(presc.single): Update.
parent a672cbf3
No related branches found
No related tags found
No related merge requests found
...@@ -318,22 +318,16 @@ v<-function(fn_data,stgs_alist,wd,fn_cmpd_list,mode,readMethod="mzR",archdir="ar ...@@ -318,22 +318,16 @@ v<-function(fn_data,stgs_alist,wd,fn_cmpd_list,mode,readMethod="mzR",archdir="ar
##' @return result of RMB_EIC_Prescreen ##' @return result of RMB_EIC_Prescreen
##' @author Todor Kondić ##' @author Todor Kondić
presc.single <- function(fn_data,stgs_alist,wd,mode,fn_cmpd_l,ppm_lim_fine=10,EIC_limit=0.001,nm_arch="archive") { presc.single <- function(fn_data,stgs_alist,wd,mode,fn_cmpd_l,ppm_lim_fine=10,EIC_limit=0.001,nm_arch="archive") {
## Generate settings file and load. gen_stgs_and_load(fn_data,stgs_alist,wd)
wd <- normalizePath(wd)
fn_data <- normalizePath(fn_data)
stgs_alist<-if (is.character(stgs_alist)) yaml::yaml.load_file(stgs_alist) else stgs_alist
sfn<-file.path(wd,paste(basename(fn_data),".ini",sep=''))
mk_sett_file(stgs_alist,sfn)
RMassBank::loadRmbSettings(sfn)
## Generate and load the compound list. ## Generate and load the compound list.
fn_comp<-file.path(wd,paste(basename(fn_data),".comp.csv",sep='')) x <- gen_cmpdl_and_load(fn_data,wd,fn_cmpd_l)
n_cmpd<-gen_comp_list(fn_cmpd_l,fn_comp) fn_comp <- x$fn_cmpdl
n_cmpd <- x$n
## Generate file table. ## Generate file table.
df_table<-data.frame(Files=rep(fn_data,n_cmpd),ID=1:n_cmpd) gen_file_table(fn_data,n_cmpd,wd)
fn_table<-file.path(wd,paste("fn-table.",basename(fn_data),".csv",sep=''))
write.csv(x=df_table,file=fn_table,row.names=F)
curd <- setwd(wd) curd <- setwd(wd)
res <- ReSOLUTION::RMB_EIC_prescreen(archive_name=nm_arch,RMB_mode=mode, res <- ReSOLUTION::RMB_EIC_prescreen(archive_name=nm_arch,RMB_mode=mode,
FileList=fn_table, FileList=fn_table,
......
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