read.gatingML: Function to parse a Gating-ML XML file into objects in the R...

Description Usage Arguments Details Author(s) References See Also Examples

View source: R/gatingML.R

Description

This function parses a Gating-ML XML file defined in compliance with the Gating-ML recommendation into objects in the R environment, which can then be evaluated using functions provided by the flowCore package.

Usage

1
  read.gatingML(file, flowEnv, ...)

Arguments

file

Gating-ML XML file describing gates, transformations and/or compensations

flowEnv

environment into which the R objects created from the Gating-ML XML file are to be stored

...

additional arguments that are passed to the methods

Details

The Gating-ML specification has been developed as an interchange format for the description of gates relevant to a flow cytometry experiment. Presently, we can read Gating-ML versions 1.5 and 2.0 of the specification. Version 2.0 is the most recent at the time of this writing.

Author(s)

J. Spidlen, N. Gopalakrishnan

References

Spidlen J, ISAC DSTF, Brinkman RR. 2014.
Gating-ML 2.0. International Society for Advancement of Cytometry (ISAC) standard for representing gating descriptions in flow cytometry.
http://flowcyt.sf.net/gating/20141009.pdf
http://flowcyt.sf.net/gating/20141009.full.zip

Spidlen J, Leif RC, Moore W, Roederer M, ISAC DSTF, Brinkman RR. 2008.
Gating-ML: XML-based gating descriptions in flow cytometry.
Cytometry A. 2008 Dec; 73A(12):1151–7. doi: 10.1002/cyto.a.20637.

Spidlen J, ISAC DSTF, Brinkman RR. 2008.
Gating-ML Candidate Recommendation for Gating Description in Flow Cytometry version 1.5.
http://flowcyt.sf.net/gating/Gating-ML.v1.5.081030.pdf
http://flowcyt.sf.net/gating/Gating-ML.v1.5.081030.full.zip
http://flowcyt.sf.net/gating/Gating-ML.v1.5.081030.Compliance-tests.081030.zip

See Also

write.gatingML

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
library("flowCore")

#########################
# Gating-ML 2.0 example #
#########################
flowEnv <- new.env()

fcsFile <- system.file("extdata/Gml2/FCSFiles", 
  "data1.fcs", package="gatingMLData")
fcs <- read.FCS(fcsFile, 
  transformation="linearize-with-PnG-scaling")

gateFile <- system.file("extdata/Gml2/Gating-MLFiles", 
  "gates1.xml", package="gatingMLData")
read.gatingML(gateFile, flowEnv)
ls(flowEnv)

result = filter(fcs, flowEnv$Polygon1)
summary(result)

#########################
# Gating-ML 1.5 example #
#########################
flowEnv <- new.env()

fcsFile <- system.file("extdata/List-modeDataFiles",
  "fcs2_int16_13367ev_8par_GvHD.fcs", package="gatingMLData")
fcs <- read.FCS(fcsFile, transformation=FALSE)

gateFile <- system.file("extdata/Gating-MLFiles",
  "02CtSRectangular.xml", package="gatingMLData")
read.gatingML(gateFile, flowEnv)
ls(flowEnv)
  
result <- filter(fcs, flowEnv$CtSR_03)
summary(result)

jspidlen/flowUtils documentation built on Nov. 4, 2019, 3:25 p.m.