Mercurial > repos > prog > lcmsmatching
comparison MsDbOutputStream.R @ 6:f86fec07f392 draft default tip
planemo upload commit c397cd8a93953798d733fd62653f7098caac30ce
| author | prog |
|---|---|
| date | Fri, 22 Feb 2019 16:04:22 -0500 |
| parents | fb9c0409d85c |
| children |
comparison
equal
deleted
inserted
replaced
| 5:fb9c0409d85c | 6:f86fec07f392 |
|---|---|
| 1 if ( ! exists('MsDbOutputStream')) { # Do not load again if already loaded | |
| 2 | |
| 3 library('methods') | |
| 4 source('msdb-common.R') | |
| 5 | |
| 6 ##################### | |
| 7 # CLASS DECLARATION # | |
| 8 ##################### | |
| 9 | |
| 10 MsDbOutputStream <- setRefClass("MsDbOutputStream", fields = list(.keep.unused = "logical", .one.line = "logical", .match.sep = "character", .multval.field.sep = "character", .first.val = "logical", .ascii = "logical", .noapostrophe = "logical", .noplusminus = "logical", .nogreek = "logical", .rtunit = 'character')) | |
| 11 | |
| 12 ############### | |
| 13 # CONSTRUCTOR # | |
| 14 ############### | |
| 15 | |
| 16 #' Constructor. | |
| 17 #' | |
| 18 #' @param keep.unused Set to \code{TRUE} if you want to keep in the output, unused columns of the input. | |
| 19 #' @param one.line Set to \code{TRUE} if you want to output only one line for each input line. | |
| 20 #' @return | |
| 21 #' @examples | |
| 22 #' stream <- MsDbOutputDataFrameStream$new(one.line = TRUE) | |
| 23 MsDbOutputStream$methods( initialize = function(keep.unused = FALSE, one.line = FALSE, match.sep = MSDB.DFT.MATCH.SEP, multval.field.sep = MSDB.DFT.OUTPUT.MULTIVAL.FIELD.SEP, first.val = FALSE, ascii = FALSE, noapostrophe = FALSE, noplusminus = FALSE, nogreek = FALSE, rtunit = MSDB.RTUNIT.SEC, ...) { | |
| 24 | |
| 25 callSuper(...) | |
| 26 | |
| 27 .keep.unused <<- keep.unused | |
| 28 .one.line <<- one.line | |
| 29 .match.sep <<- match.sep | |
| 30 .multval.field.sep <<- multval.field.sep | |
| 31 .first.val <<- first.val | |
| 32 .ascii <<- ascii | |
| 33 .noapostrophe <<- noapostrophe | |
| 34 .noplusminus <<- noplusminus | |
| 35 .nogreek <<- nogreek | |
| 36 .rtunit <<- rtunit | |
| 37 }) | |
| 38 | |
| 39 ################# | |
| 40 # MATCHED PEAKS # | |
| 41 ################# | |
| 42 | |
| 43 MsDbOutputStream$methods( matchedPeaks = function(mz, rt = NULL, unused = NULL, peaks = NULL) { | |
| 44 stop("Method matchedPeaks() not implemented in concrete class.") | |
| 45 }) | |
| 46 | |
| 47 } # end of load safe guard |
