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

FIX: Create the combined spectra archive dir in mix.R

* R/mix.R(p.sw,v): Fix dir creation.
parent 0e129f98
No related branches found
No related tags found
No related merge requests found
...@@ -203,6 +203,10 @@ mb.single<-function(mb,infodir,fn_stgs) { ...@@ -203,6 +203,10 @@ mb.single<-function(mb,infodir,fn_stgs) {
v<-function(fn_data,stgs_alist,wd,fn_cmpd_list,mode,readMethod="mzR",archdir="archive",lastStep=8,combine=F) { v<-function(fn_data,stgs_alist,wd,fn_cmpd_list,mode,readMethod="mzR",archdir="archive",lastStep=8,combine=F) {
f<-Vectorize(single.sw,vectorize.args=c("wd","fn_data","stgs_alist"),SIMPLIFY=F) f<-Vectorize(single.sw,vectorize.args=c("wd","fn_data","stgs_alist"),SIMPLIFY=F)
if (combine) { if (combine) {
combdir<-"combined"
archdir<-file.path(combdir,archdir)
no_drama_mkdir(combdir)
no_drama_mkdir(archdir)
z<-f(fn_data,stgs_alist,wd,fn_cmpd_list,mode,readMethod=readMethod,archdir=archdir,lastStep=7) z<-f(fn_data,stgs_alist,wd,fn_cmpd_list,mode,readMethod=readMethod,archdir=archdir,lastStep=7)
names(z)<-basename(fn_data) names(z)<-basename(fn_data)
zz<-RMassBank::combineMultiplicities(z) zz<-RMassBank::combineMultiplicities(z)
...@@ -243,6 +247,10 @@ p.sw<-function(fn_data,stgs_alist,wd,fn_cmpd_list,mode,readMethod="mzR",archdir= ...@@ -243,6 +247,10 @@ p.sw<-function(fn_data,stgs_alist,wd,fn_cmpd_list,mode,readMethod="mzR",archdir=
} }
if (combine) { if (combine) {
combdir<-"combined"
archdir<-file.path(combdir,archdir)
no_drama_mkdir(combdir)
no_drama_mkdir(archdir)
z<-parallel::clusterMap(cl,fcomb,fn_data,stgs_alist,wd) z<-parallel::clusterMap(cl,fcomb,fn_data,stgs_alist,wd)
names(z)<-basename(fn_data) names(z)<-basename(fn_data)
zz<-RMassBank::combineMultiplicities(z) zz<-RMassBank::combineMultiplicities(z)
......
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