Mercurial > repos > tomnl > create_sqlite_db
annotate anticipated_purity_lcms.R @ 14:69d5cb5a8e90 draft
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit e6935a8c6a3da23f47a753ab5a8159fa9d165535-dirty
author | tomnl |
---|---|
date | Sun, 13 May 2018 09:39:56 -0400 |
parents | ff61a6fb23bf |
children |
rev | line source |
---|---|
0
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
1 library(msPurity) |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
2 library(optparse) |
1
1a88758357ed
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
0
diff
changeset
|
3 print(sessionInfo()) |
0
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
4 |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
5 option_list <- list( |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
6 make_option(c("--xset_path"), type="character"), |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
7 make_option(c("-o", "--out_dir"), type="character"), |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
8 make_option(c("--mzML_path"), type="character"), |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
9 make_option("--minOffset", default=0.5), |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
10 make_option("--maxOffset", default=0.5), |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
11 make_option("--ilim", default=0.05), |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
12 make_option("--iwNorm", default="none", type="character"), |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
13 make_option("--exclude_isotopes", action="store_true"), |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
14 make_option("--isotope_matrix", type="character"), |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
15 make_option("--purityType", default="purityFWHMmedian"), |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
16 make_option("--singleFile", default=0), |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
17 make_option("--cores", default=4), |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
18 make_option("--xgroups", type="character"), |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
19 make_option("--rdata_name", default='xset'), |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
20 make_option("--camera_xcms", default='xset'), |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
21 make_option("--files", type="character"), |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
22 make_option("--galaxy_files", type="character"), |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
23 make_option("--choose_class", type="character"), |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
24 make_option("--ignore_files", type="character"), |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
25 make_option("--rtraw_columns", action="store_true") |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
26 ) |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
27 |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
28 # store options |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
29 opt<- parse_args(OptionParser(option_list=option_list)) |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
30 |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
31 print(sessionInfo()) |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
32 print(opt) |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
33 |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
34 if (!is.null(opt$xgroups)){ |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
35 xgroups = as.numeric(strsplit(opt$xgroups, ',')[[1]]) |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
36 }else{ |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
37 xgroups = NULL |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
38 } |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
39 |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
40 |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
41 |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
42 print(xgroups) |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
43 |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
44 if (!is.null(opt$remove_nas)){ |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
45 df <- df[!is.na(df$mz),] |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
46 } |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
47 |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
48 if (is.null(opt$isotope_matrix)){ |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
49 im <- NULL |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
50 }else{ |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
51 im <- read.table(opt$isotope_matrix, |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
52 header = TRUE, sep='\t', stringsAsFactors = FALSE) |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
53 } |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
54 |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
55 if (is.null(opt$exclude_isotopes)){ |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
56 isotopes <- FALSE |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
57 }else{ |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
58 isotopes <- TRUE |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
59 } |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
60 |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
61 if (is.null(opt$rtraw_columns)){ |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
62 rtraw_columns <- FALSE |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
63 }else{ |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
64 rtraw_columns <- TRUE |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
65 } |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
66 |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
67 loadRData <- function(rdata_path, xset_name){ |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
68 #loads an RData file, and returns the named xset object if it is there |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
69 load(rdata_path) |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
70 print(ls()) |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
71 return(get(ls()[ls() == xset_name])) |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
72 } |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
73 |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
74 target_obj <- loadRData(opt$xset_path, opt$rdata_name) |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
75 |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
76 if (opt$camera_xcms=='camera'){ |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
77 xset <- target_obj@xcmsSet |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
78 }else{ |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
79 xset <- target_obj |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
80 } |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
81 |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
82 print(xset) |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
83 |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
84 minOffset = as.numeric(opt$minOffset) |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
85 maxOffset = as.numeric(opt$maxOffset) |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
86 |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
87 |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
88 if (opt$iwNorm=='none'){ |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
89 iwNorm = FALSE |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
90 iwNormFun = NULL |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
91 }else if (opt$iwNorm=='gauss'){ |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
92 iwNorm = TRUE |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
93 iwNormFun = msPurity::iwNormGauss(minOff=-minOffset, maxOff=maxOffset) |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
94 }else if (opt$iwNorm=='rcosine'){ |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
95 iwNorm = TRUE |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
96 iwNormFun = msPurity::iwNormRcosine(minOff=-minOffset, maxOff=maxOffset) |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
97 }else if (opt$iwNorm=='QE5'){ |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
98 iwNorm = TRUE |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
99 iwNormFun = msPurity::iwNormQE.5() |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
100 } |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
101 |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
102 print(xset@filepaths) |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
103 |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
104 |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
105 |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
106 if (!is.null(opt$files)){ |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
107 updated_filepaths <- trimws(strsplit(opt$files, ',')[[1]]) |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
108 updated_filepaths <- updated_filepaths[updated_filepaths != ""] |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
109 print(updated_filepaths) |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
110 updated_filenames = basename(updated_filepaths) |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
111 original_filenames = basename(xset@filepaths) |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
112 update_idx = match(updated_filenames, original_filenames) |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
113 |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
114 if (!is.null(opt$galaxy_files)){ |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
115 galaxy_files <- trimws(strsplit(opt$galaxy_files, ',')[[1]]) |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
116 galaxy_files <- galaxy_files[galaxy_files != ""] |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
117 xset@filepaths <- galaxy_files[update_idx] |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
118 }else{ |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
119 xset@filepaths <- updated_filepaths[update_idx] |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
120 } |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
121 } |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
122 |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
123 if (!is.null(opt$choose_class)){ |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
124 classes <- trimws(strsplit(opt$choose_class, ',')[[1]]) |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
125 |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
126 |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
127 ignore_files_class <- which(!as.character(xset@phenoData$class) %in% classes) |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
128 |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
129 print('choose class') |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
130 print(ignore_files_class) |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
131 }else{ |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
132 ignore_files_class <- NA |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
133 } |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
134 |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
135 if (!is.null(opt$ignore_files)){ |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
136 ignore_files_string <- trimws(strsplit(opt$ignore_files, ',')[[1]]) |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
137 filenames <- rownames(xset@phenoData) |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
138 ignore_files <- which(filenames %in% ignore_files_string) |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
139 |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
140 ignore_files <- unique(c(ignore_files, ignore_files_class)) |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
141 ignore_files <- ignore_files[ignore_files != ""] |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
142 }else{ |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
143 if (anyNA(ignore_files_class)){ |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
144 ignore_files <- NULL |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
145 }else{ |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
146 ignore_files <- ignore_files_class |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
147 } |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
148 |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
149 } |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
150 |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
151 print('ignore_files') |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
152 print(ignore_files) |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
153 |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
154 |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
155 ppLCMS <- msPurity::purityX(xset=xset, |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
156 offsets=c(minOffset, maxOffset), |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
157 cores=opt$cores, |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
158 xgroups=xgroups, |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
159 purityType=opt$purityType, |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
160 ilim = opt$ilim, |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
161 isotopes = isotopes, |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
162 im = im, |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
163 iwNorm = iwNorm, |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
164 iwNormFun = iwNormFun, |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
165 singleFile = opt$singleFile, |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
166 fileignore = ignore_files, |
4
ff61a6fb23bf
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 9ea2ca0892fa55c21491c93afba790e8d9427e01-dirty
tomnl
parents:
1
diff
changeset
|
167 rtrawColumns=rtraw_columns) |
0
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
168 |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
169 |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
170 dfp <- ppLCMS@predictions |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
171 |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
172 # to make compatable with deconrank |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
173 colnames(dfp)[colnames(dfp)=='grpid'] = 'peakID' |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
174 colnames(dfp)[colnames(dfp)=='median'] = 'medianPurity' |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
175 colnames(dfp)[colnames(dfp)=='mean'] = 'meanPurity' |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
176 colnames(dfp)[colnames(dfp)=='sd'] = 'sdPurity' |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
177 colnames(dfp)[colnames(dfp)=='stde'] = 'sdePurity' |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
178 colnames(dfp)[colnames(dfp)=='RSD'] = 'cvPurity' |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
179 colnames(dfp)[colnames(dfp)=='pknm'] = 'pknmPurity' |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
180 if(sum(is.na(dfp$medianPurity))>0){ |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
181 dfp[is.na(dfp$medianPurity),]$medianPurity = 0 |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
182 } |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
183 |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
184 print('saving tsv') |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
185 print(head(dfp)) |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
186 write.table(dfp, file.path(opt$out_dir, 'anticipated_purity_lcms.tsv'), row.names=FALSE, sep='\t') |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
187 print('saving RData') |
fe7d7cc95ca5
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
tomnl
parents:
diff
changeset
|
188 save.image(file.path(opt$out_dir, 'anticipated_purity_lcms.RData')) |