comparison flagRemove.R @ 1:0f646a3e0a3f draft

"planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 20d432cdc6326114d05c26fd51889b872513b57d"
author computational-metabolomics
date Thu, 05 Dec 2019 07:36:31 -0500
parents a141be614e76
children 6b9a83e08467
comparison
equal deleted inserted replaced
0:a141be614e76 1:0f646a3e0a3f
136 samplelist_blank <- unique(samplelist$sample_class[samplelist$blank=='yes']) 136 samplelist_blank <- unique(samplelist$sample_class[samplelist$blank=='yes'])
137 137
138 chosen_blank <- samplelist_blank[samplelist_blank %in% xset@phenoData$class] 138 chosen_blank <- samplelist_blank[samplelist_blank %in% xset@phenoData$class]
139 if (length(chosen_blank)>1){ 139 if (length(chosen_blank)>1){
140 print('ERROR: only 1 blank is currently allowed to be used with this tool') 140 print('ERROR: only 1 blank is currently allowed to be used with this tool')
141 exit() 141 quit()
142 } 142 }
143 blank_class <- as.character(chosen_blank) 143 blank_class <- as.character(chosen_blank)
144 print(blank_class) 144 print(blank_class)
145 } 145 }
146 146
169 print('flag remove finished') 169 print('flag remove finished')
170 xset <- ffrm_out[[1]] 170 xset <- ffrm_out[[1]]
171 grp_peaklist <- ffrm_out[[2]] 171 grp_peaklist <- ffrm_out[[2]]
172 removed_peaks <- ffrm_out[[3]] 172 removed_peaks <- ffrm_out[[3]]
173 173
174 save.image(file=file.path(opt$out_dir, 'xset_filtered.RData')) 174 save.image(file=file.path(opt$out_dir, 'xset_filtered.RData'), version=2)
175 175
176 # grpid needed for mspurity ID needed for deconrank... (will clean up at some up) 176 # grpid needed for mspurity ID needed for deconrank... (will clean up at some up)
177 peak_pth <- file.path(opt$out_dir, 'peaklist_filtered.tsv') 177 peak_pth <- file.path(opt$out_dir, 'peaklist_filtered.tsv')
178 print(peak_pth) 178 print(peak_pth)
179 write.table(data.frame('grpid'=rownames(grp_peaklist), 'ID'=rownames(grp_peaklist), grp_peaklist), 179 write.table(data.frame('grpid'=rownames(grp_peaklist), 'ID'=rownames(grp_peaklist), grp_peaklist),