this function retrieves the gates from GatingSet and writes a customed GatingML-2.0 file that can be imported into cytobank.

gatingset_to_cytobank(
  gs,
  outFile,
  showHidden = FALSE,
  cytobank.default.scale = TRUE,
  ...
)

Arguments

gs

a GatingSet object

outFile

a file name

showHidden

whether to include the hidden population nodes in the output

cytobank.default.scale

logical flag indicating whether to use the default Cytobank asinhtGml2 settings. Currently it should be set to TRUE in order for gates to be displayed properly in Cytobank because cytobank currently does not parse the global scale settings from GatingML.

...

rescale.gate default is TRUE. which means the gate is rescaled to the new scale that is understandable by cytobank. It is recommended not to change this behavior unless user wants to export to a gatingML file used for other purpose other than being imported into cytobank.

Value

nothing

Details

The process can be divided into four steps: 1. Read in gate geometry, compensation and transformation from gatingSet 2. Rescale gate boundaries with flowjo_biexp() so gates can be displayed properly in Cytobank 3. Save gates and hierarchy structure to R environment 4. Write environment out to gatingML using write.GatingML()

Examples

library(flowWorkspace)
#> As part of improvements to flowWorkspace, some behavior of #> GatingSet objects has changed. For details, please read the section #> titled "The cytoframe and cytoset classes" in the package vignette: #> #> vignette("flowWorkspace-Introduction", "flowWorkspace")
dataDir <- system.file("extdata",package="flowWorkspaceData") gs <- load_gs(list.files(dataDir, pattern = "gs_manual",full = TRUE)) gs_pop_remove(gs, "CD8") #output to cytobank outFile <- tempfile(fileext = ".xml") gatingset_to_cytobank(gs, outFile) #type by default is 'cytobank'
#> Warning: With 'cytobank.default.scale' set to 'TRUE', data and gates will be re-transformed with cytobank's default scaling settings, which may affect how gates look like.
#> Warning: missing namespace definitions for prefix(es) gating
#> Warning: missing namespace definitions for prefix(es) gating
#> Warning: missing namespace definitions for prefix(es) gatingmissing namespace definitions for prefix(es) gatingmissing namespace definitions for prefix(es) gating
#> Warning: missing namespace definitions for prefix(es) gatingmissing namespace definitions for prefix(es) gatingmissing namespace definitions for prefix(es) gating
#> Warning: missing namespace definitions for prefix(es) gating
#> Warning: missing namespace definitions for prefix(es) gatingmissing namespace definitions for prefix(es) gating
#> Warning: missing namespace definitions for prefix(es) gatingmissing namespace definitions for prefix(es) gating
#> Warning: missing namespace definitions for prefix(es) gating
#> Warning: missing namespace definitions for prefix(es) gatingmissing namespace definitions for prefix(es) gating
#> Warning: missing namespace definitions for prefix(es) gatingmissing namespace definitions for prefix(es) gating
#> Warning: missing namespace definitions for prefix(es) gating
#> Warning: missing namespace definitions for prefix(es) gatingmissing namespace definitions for prefix(es) gating
#> Warning: missing namespace definitions for prefix(es) gatingmissing namespace definitions for prefix(es) gating
#> Warning: missing namespace definitions for prefix(es) gating
#> Warning: missing namespace definitions for prefix(es) gatingmissing namespace definitions for prefix(es) gating
#> Warning: missing namespace definitions for prefix(es) gatingmissing namespace definitions for prefix(es) gating
#> Warning: missing namespace definitions for prefix(es) gating
#> Warning: missing namespace definitions for prefix(es) gatingmissing namespace definitions for prefix(es) gatingmissing namespace definitions for prefix(es) gating
#> Warning: missing namespace definitions for prefix(es) gatingmissing namespace definitions for prefix(es) gatingmissing namespace definitions for prefix(es) gating
#> Warning: missing namespace definitions for prefix(es) gating
#> Warning: missing namespace definitions for prefix(es) gatingmissing namespace definitions for prefix(es) gating
#> Warning: missing namespace definitions for prefix(es) gatingmissing namespace definitions for prefix(es) gating
#> Warning: missing namespace definitions for prefix(es) gating
#> Warning: missing namespace definitions for prefix(es) gatingmissing namespace definitions for prefix(es) gating
#> Warning: missing namespace definitions for prefix(es) gatingmissing namespace definitions for prefix(es) gating
#> Warning: missing namespace definitions for prefix(es) gating
#> Warning: missing namespace definitions for prefix(es) gatingmissing namespace definitions for prefix(es) gating
#> Warning: missing namespace definitions for prefix(es) gatingmissing namespace definitions for prefix(es) gating
#> Warning: missing namespace definitions for prefix(es) gating
#> Warning: missing namespace definitions for prefix(es) gatingmissing namespace definitions for prefix(es) gating
#> Warning: missing namespace definitions for prefix(es) gatingmissing namespace definitions for prefix(es) gating
#> Warning: missing namespace definitions for prefix(es) gating
#> Warning: missing namespace definitions for prefix(es) gating
#> Warning: missing namespace definitions for prefix(es) gating
#> Warning: missing namespace definitions for prefix(es) gating
#> Warning: missing namespace definitions for prefix(es) gating
#> [1] "/tmp/Rtmp6b0p7Y/file2898105f3622.xml"