It parses the csv file that specifies the gating scheme for a particular staining pannel.
gatingTemplate(x, ...)## S3 method for class 'character':
gatingTemplate(x, name = "default", strict = TRUE,
...)
character
csv file namedata.table::fread
character
the label of the gating templatelogical
whether to perform validity check(special characters) on the alias column. By default it is(and should be) turned on for the regular template parsing.
But sometime it is useful to turned it off to bypass the check for the dummy nodes(e.g. the csv template generated by 'templateGen' with some existing boolean gates that has '!' or ':' symbol).'alias': a name used label the cell population, the path composed by the alias and its precedent nodes (e.g. /root/A/B/alias) has to be uniquely identifiable. So alias can not contain '/' character, which is reserved as path delimiter.
'pop': population patterns of 'A+/-` or 'A+/-B+/-', which tells the algorithm which side (postive or negative) of 1d gate or which quadrant of 2d gate to be kept. when it is in the form of 'A+/-B+/-', 'A' and 'B' should be the full name (or a substring as long as it is unqiuely matched) of either channel or marker of the flow data.
'parent': the parent population alias, its path has to be uniquely identifiable.
'dims': characters seperated by comma specifying the dimensions(1d or 2d) used for gating. It can be either channel name or stained marker name.
'gating_method': the name of the gating function (e.g. 'flowClust'). It is invoked by a wrapper function that has the identical function name prefixed with a dot.(e.g. '.flowClust')
'gating_args': the named arguments passed to gating function (Note that double quotes are often used as text delimiter by some csv editors. So try to use single quote instead if needed.)
'collapseDataForGating': When TRUE, data is collapsed (within groups if 'groupBy' specified) before gating and the gate is replicated across collapsed samples. When set FALSE (or blank),then 'groupBy' argument is only used by 'preprocessing' and ignored by gating.
'groupBy': If given, samples are split into groups by the unique combinations of study variable (i.e. column names of pData,e.g."PTID:VISITNO"). when split is numeric, then samples are grouped by every N samples
'preprocessing_method': the name of the preprocessing function(e.g. 'prior_flowClust'). It is invoked by a wrapper function that has the identical function name prefixed with a dot.(e.g. '.prior_flowClust') the preprocessing results are then passed to gating wrapper function through 'pps_res' argument.
'preprocessing_args': the named arguments passed to preprocessing function.
gt <- gatingTemplate(system.file("extdata/gating_template/tcell.csv",package = "openCyto"))
plot(gt)
Run the code above in your browser using DataLab