comparison anticipated_purity_dims.R @ 6:3d8bde261c95 draft

planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 0aa10df0ec1ed71601f932cfb11d7d4d4f620d80
author tomnl
date Mon, 23 Apr 2018 10:16:41 -0400
parents 9ab472c5714c
children d7f4696a1f86
comparison
equal deleted inserted replaced
5:9ab472c5714c 6:3d8bde261c95
72 isotopes <- FALSE 72 isotopes <- FALSE
73 }else{ 73 }else{
74 isotopes <- TRUE 74 isotopes <- TRUE
75 } 75 }
76 76
77 print('FIRST ROWS OF PEAK FILE')
78 print(head(df))
79 77
80 if (dir.exists(opt$mzML_file)){ 78 if (dir.exists(opt$mzML_file)){
81 # if directory then we need to add a file name 79 # if directory then we need to add a file name
82 print(filename) 80 print(filename)
83 if (is.na(filename)){ 81 if (is.na(filename)){
114 }else if (opt$iwNorm=='QE5'){ 112 }else if (opt$iwNorm=='QE5'){
115 iwNorm = TRUE 113 iwNorm = TRUE
116 iwNormFun = msPurity::iwNormQE.5() 114 iwNormFun = msPurity::iwNormQE.5()
117 } 115 }
118 116
117 print('FIRST ROWS OF PEAK FILE')
118 print(head(df))
119 119
120 predicted <- msPurity::dimsPredictPuritySingle(df$mz, 120 predicted <- msPurity::dimsPredictPuritySingle(df$mz,
121 filepth=mzml_file, 121 filepth=mzml_file,
122 minOffset=minOffset, 122 minOffset=minOffset,
123 maxOffset=maxOffset, 123 maxOffset=maxOffset,
130 iwNorm = iwNorm, 130 iwNorm = iwNorm,
131 iwNormFun = iwNormFun 131 iwNormFun = iwNormFun
132 ) 132 )
133 predicted <- cbind(df, predicted) 133 predicted <- cbind(df, predicted)
134 134
135 135 print(head(predicted))
136 write.table(predicted, file.path(opt$out_dir, 'anticipated_dims_purity.tsv'), row.names=FALSE, sep='\t') 136 print(file.path(opt$out_dir, 'anticipated_purity_dims.tsv'))
137 write.table(predicted, file.path(opt$out_dir, 'anticipated_purity_dims.tsv'), row.names=FALSE, sep='\t')