comparison MsDbOutputStream.R @ 0:e66bb061af06 draft

planemo upload for repository https://github.com/workflow4metabolomics/lcmsmatching.git commit 3529b25417f8e1a5836474c9adec4b696d35099d-dirty
author prog
date Tue, 12 Jul 2016 12:02:37 -0400
parents
children fb9c0409d85c
comparison
equal deleted inserted replaced
-1:000000000000 0:e66bb061af06
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", .output.fields = "ANY", .multval.field.sep = "character", .first.val = "logical", .ascii = "logical", .noapostrophe = "logical", .noplusminus = "logical", .nogreek = "logical"))
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, output.fields = msdb.get.dft.output.fields(), multval.field.sep = MSDB.DFT.OUTPUT.MULTIVAL.FIELD.SEP, first.val = FALSE, ascii = FALSE, noapostrophe = FALSE, noplusminus = FALSE, nogreek = FALSE, ...) {
24
25 .keep.unused <<- keep.unused
26 .one.line <<- one.line
27 .match.sep <<- match.sep
28 .output.fields <<- output.fields
29 .multval.field.sep <<- multval.field.sep
30 .first.val <<- first.val
31 .ascii <<- ascii
32 .noapostrophe <<- noapostrophe
33 .noplusminus <<- noplusminus
34 .nogreek <<- nogreek
35
36 callSuper(...)
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