Mercurial > repos > prog > lcmsmatching
comparison MsDb.R @ 6:b8f70d8216b3 draft
planemo upload for repository https://github.com/workflow4metabolomics/lcmsmatching.git commit b3a4e34cf9356447ae3507cc6fe2ff6a1f24afbc-dirty
| author | prog |
|---|---|
| date | Mon, 27 Mar 2017 06:27:29 -0400 |
| parents | 1ba222315fd5 |
| children |
comparison
equal
deleted
inserted
replaced
| 5:18254e8d1b72 | 6:b8f70d8216b3 |
|---|---|
| 147 | 147 |
| 148 if ( ! unit %in% MSDB.RTUNIT.VALS) | 148 if ( ! unit %in% MSDB.RTUNIT.VALS) |
| 149 stop(paste0("RT unit must be one of: ", paste(MSDB.RTUNIT.VALS, collapse = ', '), ".")) | 149 stop(paste0("RT unit must be one of: ", paste(MSDB.RTUNIT.VALS, collapse = ', '), ".")) |
| 150 | 150 |
| 151 .rt.unit <<- unit | 151 .rt.unit <<- unit |
| 152 }) | |
| 153 | |
| 154 ############### | |
| 155 # GET RT UNIT # | |
| 156 ############### | |
| 157 | |
| 158 MsDb$methods( getRtUnit = function(unit) { | |
| 159 return(.self$.rt.unit) | |
| 152 }) | 160 }) |
| 153 | 161 |
| 154 #################### | 162 #################### |
| 155 # HANDLE COMPOUNDS # | 163 # HANDLE COMPOUNDS # |
| 156 #################### | 164 #################### |
| 309 # | 317 # |
| 310 # # Put back unfound peaks | 318 # # Put back unfound peaks |
| 311 # peaks <- rbind(peaks, peaks.na) | 319 # peaks <- rbind(peaks, peaks.na) |
| 312 # | 320 # |
| 313 # # Sort | 321 # # Sort |
| 314 # print(colnames(peaks)) | |
| 315 # print(x.colnames) | |
| 316 # peaks <- peaks[order(peaks[[x.colnames$mz]], peaks[[x.colnames$rt]], peaks[[MSDB.TAG.MOLID]], peaks[[MSDB.TAG.COL]]), ] | 322 # peaks <- peaks[order(peaks[[x.colnames$mz]], peaks[[x.colnames$rt]], peaks[[MSDB.TAG.MOLID]], peaks[[MSDB.TAG.COL]]), ] |
| 317 # | 323 # |
| 318 # # Remove rownames | 324 # # Remove rownames |
| 319 # rownames(peaks) <- NULL | 325 # rownames(peaks) <- NULL |
| 320 # | 326 # |
