... | ... |
@@ -340,7 +340,7 @@ gatingset_to_flowjo(gs, outFile) |
340 | 340 |
## Next Steps |
341 | 341 |
|
342 | 342 |
See the [flowWorskspace](http://www.github.com/RGLab/flowWorkspace) and |
343 |
-\[openCyto\](<http://www.github.com/RGLab/openCyto>) packages to learn |
|
343 |
+[openCyto](<http://www.github.com/RGLab/openCyto>) packages to learn |
|
344 | 344 |
more about what can be done with `GatingSet` objects. |
345 | 345 |
|
346 | 346 |
## Code of conduct |
... | ... |
@@ -340,7 +340,7 @@ gatingset_to_flowjo(gs, outFile) |
340 | 340 |
## Next Steps |
341 | 341 |
|
342 | 342 |
See the [flowWorskspace](http://www.github.com/RGLab/flowWorkspace) and |
343 |
-\[openCyto\](<http://www.github.com/RGLab/openCyto>\] packages to learn |
|
343 |
+\[openCyto\](<http://www.github.com/RGLab/openCyto>) packages to learn |
|
344 | 344 |
more about what can be done with `GatingSet` objects. |
345 | 345 |
|
346 | 346 |
## Code of conduct |
... | ... |
@@ -60,8 +60,8 @@ BiocManager::install("openCyto") |
60 | 60 |
install.packages("devtools") |
61 | 61 |
library(devtools) #load it |
62 | 62 |
|
63 |
-install_github("RGLab/flowWorkspace", ref="trunk") |
|
64 |
-install_github("RGLab/openCyto", ref="trunk") |
|
63 |
+install_github("RGLab/flowWorkspace") |
|
64 |
+install_github("RGLab/openCyto") |
|
65 | 65 |
``` |
66 | 66 |
|
67 | 67 |
### Installing from [BioConductor](https://www.bioconductor.org). |
... | ... |
@@ -96,7 +96,7 @@ BiocManager::install("CytoML", version = "devel") |
96 | 96 |
|
97 | 97 |
``` r |
98 | 98 |
install.packges("devtools") |
99 |
-devtools::install_github("RGLab/CytoML", ref = "trunk") |
|
99 |
+devtools::install_github("RGLab/CytoML") |
|
100 | 100 |
``` |
101 | 101 |
|
102 | 102 |
- [Latest GitHub Release](https://github.com/RGLab/CytoML/releases) |
... | ... |
@@ -31,6 +31,17 @@ CytoML allows you to: |
31 | 31 |
- Share computational flow analyses with users on other platforms. |
32 | 32 |
- Perform comparative analyses between computational and manual gating |
33 | 33 |
approaches. |
34 |
+ |
|
35 |
+### Reporting Bugs or Issues |
|
36 |
+- Use the issue template in github when creating a new issue. |
|
37 |
+- Follow the instructions in the template (do your background reading). |
|
38 |
+- Search and verify that the issue hasn't already been addressed. |
|
39 |
+- Check the Bioconductor support site. |
|
40 |
+- Make sure your flow packages are up to date. |
|
41 |
+- THEN if your issue persists, file a bug report. |
|
42 |
+ |
|
43 |
+Otherwise, we may close your issue without responding. |
|
44 |
+ |
|
34 | 45 |
|
35 | 46 |
## INSTALLATION |
36 | 47 |
|
... | ... |
@@ -55,7 +55,7 @@ install_github("RGLab/openCyto", ref="trunk") |
55 | 55 |
### Installing from [BioConductor](https://www.bioconductor.org). |
56 | 56 |
|
57 | 57 |
- [Current BioConductor |
58 |
- Release](https://doi.org/doi:10.18129/B9.bioc.CytoML) |
|
58 |
+ Relase](https://doi.org/doi:10.18129/B9.bioc.CytoML) |
|
59 | 59 |
|
60 | 60 |
<!-- end list --> |
61 | 61 |
|
... | ... |
@@ -83,7 +83,7 @@ BiocManager::install("CytoML", version = "devel") |
83 | 83 |
<!-- end list --> |
84 | 84 |
|
85 | 85 |
``` r |
86 |
-install.packages("devtools") |
|
86 |
+install.packges("devtools") |
|
87 | 87 |
devtools::install_github("RGLab/CytoML", ref = "trunk") |
88 | 88 |
``` |
89 | 89 |
|
... | ... |
@@ -92,7 +92,7 @@ devtools::install_github("RGLab/CytoML", ref = "trunk") |
92 | 92 |
<!-- end list --> |
93 | 93 |
|
94 | 94 |
``` r |
95 |
-install.packages("devtools") |
|
95 |
+install.packges("devtools") |
|
96 | 96 |
devtools::install_github("RGLab/CytoML@*release") |
97 | 97 |
``` |
98 | 98 |
|
... | ... |
@@ -126,18 +126,20 @@ To import data you need the xml workspace and the raw FCS files. |
126 | 126 |
|
127 | 127 |
``` r |
128 | 128 |
library(CytoML) |
129 |
-xmlfile <- system.file("extdata/cytotrol_tcell_cytobank.xml", package = "CytoML") |
|
130 |
-fcsFiles <- list.files(pattern = "CytoTrol", system.file("extdata", package = "flowWorkspaceData"), full.names = T) |
|
131 |
-gs <- cytobank2GatingSet(xmlfile, fcsFiles) |
|
129 |
+acsfile <- system.file("extdata/cytobank_experiment.acs", package = "CytoML") |
|
130 |
+ce <- open_cytobank_experiment(acsfile) |
|
131 |
+xmlfile <- ce$gatingML |
|
132 |
+fcsFiles <- list.files(ce$fcsdir, full.names = TRUE) |
|
133 |
+gs <- cytobank_to_gatingset(xmlfile, fcsFiles) |
|
132 | 134 |
``` |
133 | 135 |
|
134 | 136 |
#### Import a [Diva](http://www.bdbiosciences.com/us/instruments/clinical/software/flow-cytometry-acquisition/bd-facsdiva-software/m/333333/overview) workspace. |
135 | 137 |
|
136 | 138 |
``` r |
137 |
-ws <- openDiva(system.file('extdata/diva/PE_2.xml', package = "flowWorkspaceData")) |
|
139 |
+ws <- open_diva_xml(system.file('extdata/diva/PE_2.xml', package = "flowWorkspaceData")) |
|
138 | 140 |
# The path to the FCS files is stored in ws@path. |
139 | 141 |
# It can also be passed in to parseWorksapce via the `path` argument. |
140 |
-gs <- parseWorkspace(ws, name = 2, subset = 1) |
|
142 |
+gs <- diva_to_gatingset(ws, name = 2, subset = 1, swap_cols = FALSE) |
|
141 | 143 |
``` |
142 | 144 |
|
143 | 145 |
#### Interact with the gated data (`GatingSet`) |
... | ... |
@@ -167,7 +169,7 @@ We can print all the cell populations defined in the gating tree. |
167 | 169 |
|
168 | 170 |
``` r |
169 | 171 |
#show all the cell populations(/nodes) |
170 |
-getNodes(gh) |
|
172 |
+gs_get_pop_paths(gh) |
|
171 | 173 |
``` |
172 | 174 |
|
173 | 175 |
## [1] "root" "/P1" "/P1/P2" "/P1/P2/P3" |
... | ... |
@@ -177,7 +179,7 @@ We can extract the cell population statistics. |
177 | 179 |
|
178 | 180 |
``` r |
179 | 181 |
#show the population statistics |
180 |
-getPopStats(gh) |
|
182 |
+gh_pop_compare_stats(gh) |
|
181 | 183 |
``` |
182 | 184 |
|
183 | 185 |
## openCyto.freq xml.freq openCyto.count xml.count node |
... | ... |
@@ -209,13 +211,13 @@ plotGate(gh) |
209 | 211 |
|
210 | 212 |
Because CytoML and flowWorkspace reproduce the entire analysis in a |
211 | 213 |
workspace in R, we have access to information about which cells are part |
212 |
-of which cell populations. |
|
214 |
+of which cell popualtions. |
|
213 | 215 |
|
214 | 216 |
flowWorkspace has convenience methods to extract the cells from specific |
215 | 217 |
cell populations: |
216 | 218 |
|
217 | 219 |
``` r |
218 |
-getData(gh,"P3") |
|
220 |
+gh_pop_get_data(gh,"P3") |
|
219 | 221 |
``` |
220 | 222 |
|
221 | 223 |
## flowFrame object '9a1897d7-ebc9-4077-aa34-6d9e1367fa67' |
... | ... |
@@ -242,10 +244,11 @@ This returns a `flowFrame` with the cells in gate P3 (70% of the cells |
242 | 244 |
according to the plot). |
243 | 245 |
|
244 | 246 |
The matrix of expression can be extracted from a `flowFrame` using the |
245 |
-`exprs()` method: |
|
247 |
+`exprs()` method from the `flowCore` package: |
|
246 | 248 |
|
247 | 249 |
``` r |
248 |
-e <- exprs(getData(gh,"P3")) |
|
250 |
+library(flowCore) |
|
251 |
+e <- exprs(gh_pop_get_data(gh,"P3")) |
|
249 | 252 |
class(e) |
250 | 253 |
``` |
251 | 254 |
|
... | ... |
@@ -273,9 +276,9 @@ colMeans(e[,8:15]) |
273 | 276 |
``` |
274 | 277 |
|
275 | 278 |
## FITC-A PE-A PerCP-Cy5-5-A PE-Cy7-A |
276 |
- ## 0.8305544 1.3162145 0.7746655 0.8017132 |
|
279 |
+ ## 0.8305630 1.3162132 0.7743459 0.8017827 |
|
277 | 280 |
## APC-A APC-Cy7-A Bd Horizon V450-A Pacific Orange-A |
278 |
- ## 1.0482656 1.1636819 2.2960560 1.3684352 |
|
281 |
+ ## 1.0482663 1.1636818 2.2960554 1.3684453 |
|
279 | 282 |
|
280 | 283 |
### Export gated data to other platforms. |
281 | 284 |
|
... | ... |
@@ -302,29 +305,30 @@ gs <- load_gs(list.files(dataDir, pattern = "gs_manual",full = TRUE)) |
302 | 305 |
``` r |
303 | 306 |
#Cytobank |
304 | 307 |
outFile <- tempfile(fileext = ".xml") |
305 |
-GatingSet2cytobank(gs, outFile) |
|
308 |
+gatingset_to_cytobank(gs, outFile) |
|
306 | 309 |
``` |
307 | 310 |
|
308 |
- ## Warning in GatingSet2cytobank(gs, outFile): With 'cytobank.default.scale' |
|
309 |
- ## set to 'TRUE', data and gates will be re-transformed with cytobank's |
|
310 |
- ## default scaling settings, which may affect how gates look like. |
|
311 |
+ ## Warning in gatingset_to_cytobank(gs, outFile): With |
|
312 |
+ ## 'cytobank.default.scale' set to 'TRUE', data and gates will be re- |
|
313 |
+ ## transformed with cytobank's default scaling settings, which may affect how |
|
314 |
+ ## gates look like. |
|
311 | 315 |
|
312 |
- ## [1] "/var/folders/jh/x0h3v3pd4dd497g3gtzsm8500000gn/T//RtmpS4mDCu/file154f72419eb4f.xml" |
|
316 |
+ ## [1] "/tmp/RtmpV1ZasG/file4b9f7e4e25c1.xml" |
|
313 | 317 |
|
314 | 318 |
##### Export to FlowJo |
315 | 319 |
|
316 | 320 |
``` r |
317 | 321 |
#flowJo |
318 | 322 |
outFile <- tempfile(fileext = ".wsp") |
319 |
-GatingSet2flowJo(gs, outFile) |
|
323 |
+gatingset_to_flowjo(gs, outFile) |
|
320 | 324 |
``` |
321 | 325 |
|
322 |
- ## [1] "/var/folders/jh/x0h3v3pd4dd497g3gtzsm8500000gn/T//RtmpS4mDCu/file154f774d1c840.wsp" |
|
326 |
+ ## [1] "/tmp/RtmpV1ZasG/file4b9f18da0869.wsp" |
|
323 | 327 |
|
324 | 328 |
## Next Steps |
325 | 329 |
|
326 | 330 |
See the [flowWorskspace](http://www.github.com/RGLab/flowWorkspace) and |
327 |
-[openCyto](http://www.github.com/RGLab/openCyto] packages to learn |
|
331 |
+\[openCyto\](<http://www.github.com/RGLab/openCyto>\] packages to learn |
|
328 | 332 |
more about what can be done with `GatingSet` objects. |
329 | 333 |
|
330 | 334 |
## Code of conduct |
... | ... |
@@ -55,7 +55,7 @@ install_github("RGLab/openCyto", ref="trunk") |
55 | 55 |
### Installing from [BioConductor](https://www.bioconductor.org). |
56 | 56 |
|
57 | 57 |
- [Current BioConductor |
58 |
- Relase](https://doi.org/doi:10.18129/B9.bioc.CytoML) |
|
58 |
+ Release](https://doi.org/doi:10.18129/B9.bioc.CytoML) |
|
59 | 59 |
|
60 | 60 |
<!-- end list --> |
61 | 61 |
|
... | ... |
@@ -83,7 +83,7 @@ BiocManager::install("CytoML", version = "devel") |
83 | 83 |
<!-- end list --> |
84 | 84 |
|
85 | 85 |
``` r |
86 |
-install.packges("devtools") |
|
86 |
+install.packages("devtools") |
|
87 | 87 |
devtools::install_github("RGLab/CytoML", ref = "trunk") |
88 | 88 |
``` |
89 | 89 |
|
... | ... |
@@ -92,7 +92,7 @@ devtools::install_github("RGLab/CytoML", ref = "trunk") |
92 | 92 |
<!-- end list --> |
93 | 93 |
|
94 | 94 |
``` r |
95 |
-install.packges("devtools") |
|
95 |
+install.packages("devtools") |
|
96 | 96 |
devtools::install_github("RGLab/CytoML@*release") |
97 | 97 |
``` |
98 | 98 |
|
... | ... |
@@ -209,7 +209,7 @@ plotGate(gh) |
209 | 209 |
|
210 | 210 |
Because CytoML and flowWorkspace reproduce the entire analysis in a |
211 | 211 |
workspace in R, we have access to information about which cells are part |
212 |
-of which cell popualtions. |
|
212 |
+of which cell populations. |
|
213 | 213 |
|
214 | 214 |
flowWorkspace has convenience methods to extract the cells from specific |
215 | 215 |
cell populations: |
... | ... |
@@ -324,7 +324,7 @@ GatingSet2flowJo(gs, outFile) |
324 | 324 |
## Next Steps |
325 | 325 |
|
326 | 326 |
See the [flowWorskspace](http://www.github.com/RGLab/flowWorkspace) and |
327 |
-\[openCyto\](<http://www.github.com/RGLab/openCyto>\] packages to learn |
|
327 |
+[openCyto](http://www.github.com/RGLab/openCyto] packages to learn |
|
328 | 328 |
more about what can be done with `GatingSet` objects. |
329 | 329 |
|
330 | 330 |
## Code of conduct |
... | ... |
@@ -99,13 +99,14 @@ devtools::install_github("RGLab/CytoML@*release") |
99 | 99 |
## Reproducible examples from the CytoML paper |
100 | 100 |
|
101 | 101 |
- A reproducible workflow can be found at the [RGLab |
102 |
- site](http://www.rglab.org/CytoML), and was prepared with the |
|
103 |
- release version of CytoML and its dependencies that can be installed |
|
102 |
+ site](http://www.rglab.org/CytoML), and was prepared with version |
|
103 |
+ 1.7.10 of CytoML, R v3.5.0, and dependencies that can be installed |
|
104 | 104 |
by: |
105 | 105 |
|
106 | 106 |
<!-- end list --> |
107 | 107 |
|
108 | 108 |
``` r |
109 |
+# We recomend using R version 3.5.0 |
|
109 | 110 |
devtools::install_github("RGLab/RProtoBufLib@v1.3.7") |
110 | 111 |
devtools::install_github("RGLab/cytolib@v1.3.2") |
111 | 112 |
devtools::install_github("RGLab/flowCore@v1.47.7") |
... | ... |
@@ -308,7 +309,7 @@ GatingSet2cytobank(gs, outFile) |
308 | 309 |
## set to 'TRUE', data and gates will be re-transformed with cytobank's |
309 | 310 |
## default scaling settings, which may affect how gates look like. |
310 | 311 |
|
311 |
- ## [1] "/var/folders/jh/x0h3v3pd4dd497g3gtzsm8500000gn/T//Rtmposae0G/file54fa5ff95e51.xml" |
|
312 |
+ ## [1] "/var/folders/jh/x0h3v3pd4dd497g3gtzsm8500000gn/T//RtmpS4mDCu/file154f72419eb4f.xml" |
|
312 | 313 |
|
313 | 314 |
##### Export to FlowJo |
314 | 315 |
|
... | ... |
@@ -318,7 +319,7 @@ outFile <- tempfile(fileext = ".wsp") |
318 | 319 |
GatingSet2flowJo(gs, outFile) |
319 | 320 |
``` |
320 | 321 |
|
321 |
- ## [1] "/var/folders/jh/x0h3v3pd4dd497g3gtzsm8500000gn/T//Rtmposae0G/file54fa7a2b1d84.wsp" |
|
322 |
+ ## [1] "/var/folders/jh/x0h3v3pd4dd497g3gtzsm8500000gn/T//RtmpS4mDCu/file154f774d1c840.wsp" |
|
322 | 323 |
|
323 | 324 |
## Next Steps |
324 | 325 |
|
... | ... |
@@ -111,7 +111,7 @@ devtools::install_github("RGLab/cytolib@v1.3.2") |
111 | 111 |
devtools::install_github("RGLab/flowCore@v1.47.7") |
112 | 112 |
devtools::install_github("RGLab/flowWorkspace@v3.29.7") |
113 | 113 |
devtools::install_github("RGLab/openCyto@v1.19.2") |
114 |
-devtools::install_github("RGLab/CytoML@1.7.10") |
|
114 |
+devtools::install_github("RGLab/CytoML@v1.7.10") |
|
115 | 115 |
devtools::install_github("RGLab/ggcyto@v1.9.12") |
116 | 116 |
``` |
117 | 117 |
|
... | ... |
@@ -308,7 +308,7 @@ GatingSet2cytobank(gs, outFile) |
308 | 308 |
## set to 'TRUE', data and gates will be re-transformed with cytobank's |
309 | 309 |
## default scaling settings, which may affect how gates look like. |
310 | 310 |
|
311 |
- ## [1] "/var/folders/jh/x0h3v3pd4dd497g3gtzsm8500000gn/T//RtmpM2PAHX/file161a6407f9e0c.xml" |
|
311 |
+ ## [1] "/var/folders/jh/x0h3v3pd4dd497g3gtzsm8500000gn/T//Rtmposae0G/file54fa5ff95e51.xml" |
|
312 | 312 |
|
313 | 313 |
##### Export to FlowJo |
314 | 314 |
|
... | ... |
@@ -318,7 +318,7 @@ outFile <- tempfile(fileext = ".wsp") |
318 | 318 |
GatingSet2flowJo(gs, outFile) |
319 | 319 |
``` |
320 | 320 |
|
321 |
- ## [1] "/var/folders/jh/x0h3v3pd4dd497g3gtzsm8500000gn/T//RtmpM2PAHX/file161a615ad4c42.wsp" |
|
321 |
+ ## [1] "/var/folders/jh/x0h3v3pd4dd497g3gtzsm8500000gn/T//Rtmposae0G/file54fa7a2b1d84.wsp" |
|
322 | 322 |
|
323 | 323 |
## Next Steps |
324 | 324 |
|
... | ... |
@@ -99,7 +99,21 @@ devtools::install_github("RGLab/CytoML@*release") |
99 | 99 |
## Reproducible examples from the CytoML paper |
100 | 100 |
|
101 | 101 |
- A reproducible workflow can be found at the [RGLab |
102 |
- site](http://www.rglab.org/CytoML). |
|
102 |
+ site](http://www.rglab.org/CytoML), and was prepared with the |
|
103 |
+ release version of CytoML and its dependencies that can be installed |
|
104 |
+ by: |
|
105 |
+ |
|
106 |
+<!-- end list --> |
|
107 |
+ |
|
108 |
+``` r |
|
109 |
+devtools::install_github("RGLab/RProtoBufLib@v1.3.7") |
|
110 |
+devtools::install_github("RGLab/cytolib@v1.3.2") |
|
111 |
+devtools::install_github("RGLab/flowCore@v1.47.7") |
|
112 |
+devtools::install_github("RGLab/flowWorkspace@v3.29.7") |
|
113 |
+devtools::install_github("RGLab/openCyto@v1.19.2") |
|
114 |
+devtools::install_github("RGLab/CytoML@1.7.10") |
|
115 |
+devtools::install_github("RGLab/ggcyto@v1.9.12") |
|
116 |
+``` |
|
103 | 117 |
|
104 | 118 |
## Examples |
105 | 119 |
|
... | ... |
@@ -294,7 +308,7 @@ GatingSet2cytobank(gs, outFile) |
294 | 308 |
## set to 'TRUE', data and gates will be re-transformed with cytobank's |
295 | 309 |
## default scaling settings, which may affect how gates look like. |
296 | 310 |
|
297 |
- ## [1] "/var/folders/jh/x0h3v3pd4dd497g3gtzsm8500000gn/T//RtmprlbWvn/filed187336c542a.xml" |
|
311 |
+ ## [1] "/var/folders/jh/x0h3v3pd4dd497g3gtzsm8500000gn/T//RtmpM2PAHX/file161a6407f9e0c.xml" |
|
298 | 312 |
|
299 | 313 |
##### Export to FlowJo |
300 | 314 |
|
... | ... |
@@ -304,7 +318,7 @@ outFile <- tempfile(fileext = ".wsp") |
304 | 318 |
GatingSet2flowJo(gs, outFile) |
305 | 319 |
``` |
306 | 320 |
|
307 |
- ## [1] "/var/folders/jh/x0h3v3pd4dd497g3gtzsm8500000gn/T//RtmprlbWvn/filed1877040990a.wsp" |
|
321 |
+ ## [1] "/var/folders/jh/x0h3v3pd4dd497g3gtzsm8500000gn/T//RtmpM2PAHX/file161a615ad4c42.wsp" |
|
308 | 322 |
|
309 | 323 |
## Next Steps |
310 | 324 |
|
... | ... |
@@ -1,65 +1,319 @@ |
1 | 1 |
|
2 |
-# CytoML: A tool designed to work with openCyto to exchange gated cytometry data with third-party platforms |
|
2 |
+# CytoML: Cross-Platform Cytometry Data Sharing. |
|
3 | 3 |
|
4 |
-This package is designed to import/export the hierarchical gated flow data to/from the `openCyto` framework using the standard cytometry format: `gatingML2.0` and `FCS3.0`. This package makes use of our `GatingSet` R object and data model such that imported data can easily be manipulated and visualized in R using tools like `OpenCyto` and `ggcyto`. |
|
4 |
+This package is designed to import/export the hierarchical gated |
|
5 |
+cytometry data to and from R (specifically the |
|
6 |
+[openCyto](https://github.com/RGLab/openCyto) framework) using the |
|
7 |
+[`gatingML2.0`](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4874733/) |
|
8 |
+and [`FCS3.0`](http://isac-net.org/Resources/Standards/FCS3-1.aspx) |
|
9 |
+cytometry data standards. This package makes use of the `GatingSet` R |
|
10 |
+object and data model so that imported data can easily be manipulated |
|
11 |
+and visualized in R using tools like |
|
12 |
+[openCyto](https://github.com/RGLab/openCyto) and |
|
13 |
+[ggCyto](https://github.com/RGLab/ggcyto). |
|
5 | 14 |
|
15 |
+## What problems does CytoML solve? |
|
6 | 16 |
|
7 |
-### INSTALLATION |
|
17 |
+CytoML allows you to: |
|
8 | 18 |
|
9 |
-```r |
|
10 |
-# First, install it from bionconductor so that it will pull all the dependent packages automatically |
|
11 |
-library(BiocInstalller) |
|
12 |
-biocLite(openCyto) # may be older |
|
13 |
-# Then, install the latest version from github using devtools package |
|
19 |
+ - Import manually gated data into R from |
|
20 |
+ [Diva](http://www.bdbiosciences.com/us/instruments/clinical/software/flow-cytometry-acquisition/bd-facsdiva-software/m/333333/overview), |
|
21 |
+ [FlowJo](https://www.flowjo.com/) and |
|
22 |
+ [Cytobank](https://cytobank.org/). |
|
23 |
+ - Combine manual gating strategies with automated gating strategies in |
|
24 |
+ R. |
|
25 |
+ - Export data gated manually, auto-gated, or gated using a combination |
|
26 |
+ of manual and automated strategies from R to |
|
27 |
+ [Diva](http://www.bdbiosciences.com/us/instruments/clinical/software/flow-cytometry-acquisition/bd-facsdiva-software/m/333333/overview), |
|
28 |
+ [FlowJo](https://www.flowjo.com/) and |
|
29 |
+ [Cytobank](https://cytobank.org/). |
|
30 |
+ - Share computational flow analyses with users on other platforms. |
|
31 |
+ - Perform comparative analyses between computational and manual gating |
|
32 |
+ approaches. |
|
33 |
+ |
|
34 |
+## INSTALLATION |
|
35 |
+ |
|
36 |
+CytoML can be installed in several ways: |
|
37 |
+ |
|
38 |
+### For all versions: |
|
39 |
+ |
|
40 |
+For all versions, you must have dependencies installed |
|
41 |
+ |
|
42 |
+``` r |
|
43 |
+library(BiocManager) |
|
44 |
+# This should pull all dependencies. |
|
45 |
+BiocManager::install("openCyto") |
|
46 |
+ |
|
47 |
+# Then install latest dependencies from github, using devtools. |
|
14 | 48 |
install.packages("devtools") |
15 | 49 |
library(devtools) #load it |
50 |
+ |
|
16 | 51 |
install_github("RGLab/flowWorkspace", ref="trunk") |
17 | 52 |
install_github("RGLab/openCyto", ref="trunk") |
18 | 53 |
``` |
19 | 54 |
|
20 |
-### Import `XML` and `FCS` data from other platforms into `openCyto` |
|
55 |
+### Installing from [BioConductor](https://www.bioconductor.org). |
|
56 |
+ |
|
57 |
+ - [Current BioConductor |
|
58 |
+ Relase](https://doi.org/doi:10.18129/B9.bioc.CytoML) |
|
59 |
+ |
|
60 |
+<!-- end list --> |
|
61 |
+ |
|
62 |
+``` r |
|
63 |
+library(BiocManager) |
|
64 |
+#this should pull all dependencies. |
|
65 |
+BiocManager::install("CytoML", version = "devel") |
|
66 |
+``` |
|
67 |
+ |
|
68 |
+ - [Current BioConductor Development |
|
69 |
+ Version](http://bioconductor.org/packages/devel/bioc/html/CytoML.html) |
|
70 |
+ |
|
71 |
+<!-- end list --> |
|
72 |
+ |
|
73 |
+``` r |
|
74 |
+library(BiocManager) |
|
75 |
+#this should pull all dependencies. |
|
76 |
+BiocManager::install("CytoML", version = "devel") |
|
77 |
+``` |
|
78 |
+ |
|
79 |
+### Installing from GitHub |
|
80 |
+ |
|
81 |
+ - [Latest GitHub Version](https://github.com/RGLab/CytoML) |
|
82 |
+ |
|
83 |
+<!-- end list --> |
|
84 |
+ |
|
85 |
+``` r |
|
86 |
+install.packges("devtools") |
|
87 |
+devtools::install_github("RGLab/CytoML", ref = "trunk") |
|
88 |
+``` |
|
89 |
+ |
|
90 |
+ - [Latest GitHub Release](https://github.com/RGLab/CytoML/releases) |
|
91 |
+ |
|
92 |
+<!-- end list --> |
|
93 |
+ |
|
94 |
+``` r |
|
95 |
+install.packges("devtools") |
|
96 |
+devtools::install_github("RGLab/CytoML@*release") |
|
97 |
+``` |
|
98 |
+ |
|
99 |
+## Reproducible examples from the CytoML paper |
|
100 |
+ |
|
101 |
+ - A reproducible workflow can be found at the [RGLab |
|
102 |
+ site](http://www.rglab.org/CytoML). |
|
103 |
+ |
|
104 |
+## Examples |
|
105 |
+ |
|
106 |
+### Import data |
|
21 | 107 |
|
22 |
-#### Parse `gatingML` generated from `Cytobank` |
|
23 |
-```r |
|
108 |
+To import data you need the xml workspace and the raw FCS files. |
|
109 |
+ |
|
110 |
+#### Import `gatingML` generated from [Cytobank](https://cytobank.org/). |
|
111 |
+ |
|
112 |
+``` r |
|
24 | 113 |
library(CytoML) |
25 | 114 |
xmlfile <- system.file("extdata/cytotrol_tcell_cytobank.xml", package = "CytoML") |
26 |
-fcsFiles <- list.files(pattern = "CytoTrol", system.file("extdata", package = "flowWorkspaceData"), full = T) |
|
115 |
+fcsFiles <- list.files(pattern = "CytoTrol", system.file("extdata", package = "flowWorkspaceData"), full.names = T) |
|
27 | 116 |
gs <- cytobank2GatingSet(xmlfile, fcsFiles) |
28 | 117 |
``` |
29 | 118 |
|
30 |
-#### Parse `diva` workspace |
|
31 |
-```r |
|
119 |
+#### Import a [Diva](http://www.bdbiosciences.com/us/instruments/clinical/software/flow-cytometry-acquisition/bd-facsdiva-software/m/333333/overview) workspace. |
|
120 |
+ |
|
121 |
+``` r |
|
32 | 122 |
ws <- openDiva(system.file('extdata/diva/PE_2.xml', package = "flowWorkspaceData")) |
123 |
+# The path to the FCS files is stored in ws@path. |
|
124 |
+# It can also be passed in to parseWorksapce via the `path` argument. |
|
33 | 125 |
gs <- parseWorkspace(ws, name = 2, subset = 1) |
34 | 126 |
``` |
35 | 127 |
|
128 |
+#### Interact with the gated data (`GatingSet`) |
|
129 |
+ |
|
130 |
+We need `flowWorkspace` to interact with the imported data. |
|
131 |
+ |
|
132 |
+``` r |
|
133 |
+library(flowWorkspace) |
|
134 |
+``` |
|
36 | 135 |
|
37 |
-### Then you can interact with the gated data (`GatingSet`) |
|
136 |
+We can visualize the gating tree as follows: |
|
38 | 137 |
|
39 |
-```r |
|
138 |
+``` r |
|
40 | 139 |
#get the first sample |
41 | 140 |
gh <- gs[[1]] |
141 |
+ |
|
42 | 142 |
#plot the hierarchy tree |
43 | 143 |
plot(gh) |
144 |
+``` |
|
145 |
+ |
|
146 |
+<!-- --> |
|
147 |
+ |
|
148 |
+For more information see the |
|
149 |
+[flowWorkspace](http://www.github.com/RGLab/flowWorkspace) package. |
|
150 |
+ |
|
151 |
+We can print all the cell populations defined in the gating tree. |
|
152 |
+ |
|
153 |
+``` r |
|
44 | 154 |
#show all the cell populations(/nodes) |
45 | 155 |
getNodes(gh) |
156 |
+``` |
|
157 |
+ |
|
158 |
+ ## [1] "root" "/P1" "/P1/P2" "/P1/P2/P3" |
|
159 |
+ ## [5] "/P1/P2/P3/P4" "/P1/P2/P3/P4/P5" |
|
160 |
+ |
|
161 |
+We can extract the cell population statistics. |
|
162 |
+ |
|
163 |
+``` r |
|
46 | 164 |
#show the population statistics |
47 | 165 |
getPopStats(gh) |
166 |
+``` |
|
167 |
+ |
|
168 |
+ ## openCyto.freq xml.freq openCyto.count xml.count node |
|
169 |
+ ## 1: 1.00000000 1.00000000 19090 19090 root |
|
170 |
+ ## 2: 0.93609219 0.93776847 17870 17902 P1 |
|
171 |
+ ## 3: 0.97991046 0.97994637 17511 17543 P2 |
|
172 |
+ ## 4: 0.70327223 0.70307245 12315 12334 P3 |
|
173 |
+ ## 5: 0.09378806 0.09404897 1155 1160 P4 |
|
174 |
+ ## 6: 0.95151515 0.94827586 1099 1100 P5 |
|
175 |
+ |
|
176 |
+The `openCyto.count` column shows the cell counts computed via the |
|
177 |
+import. The `xml.count` column shows the cell counts computed by FlowJo |
|
178 |
+(note not all platforms report cell counts in the workspace). It is |
|
179 |
+normal for these to differ by a few cells due to numerical differences |
|
180 |
+in the implementation of data transformations. CytoML and openCyto are |
|
181 |
+*reproducing* the data analysis from the raw data based on the |
|
182 |
+information in the workspace. |
|
183 |
+ |
|
184 |
+We can plot all the gates defined in the workspace. |
|
185 |
+ |
|
186 |
+``` r |
|
48 | 187 |
#plot the gates |
49 | 188 |
plotGate(gh) |
50 | 189 |
``` |
51 | 190 |
|
52 |
-### Export the existing `GatingSet` from `openCyto` to `Cytobank` or `flowJo` |
|
191 |
+<!-- --> |
|
192 |
+ |
|
193 |
+#### Access information about cells in a specific population. |
|
194 |
+ |
|
195 |
+Because CytoML and flowWorkspace reproduce the entire analysis in a |
|
196 |
+workspace in R, we have access to information about which cells are part |
|
197 |
+of which cell popualtions. |
|
198 |
+ |
|
199 |
+flowWorkspace has convenience methods to extract the cells from specific |
|
200 |
+cell populations: |
|
201 |
+ |
|
202 |
+``` r |
|
203 |
+getData(gh,"P3") |
|
204 |
+``` |
|
205 |
+ |
|
206 |
+ ## flowFrame object '9a1897d7-ebc9-4077-aa34-6d9e1367fa67' |
|
207 |
+ ## with 12315 cells and 15 observables: |
|
208 |
+ ## name desc range minRange maxRange |
|
209 |
+ ## $P1 Time <NA> 262144 0.0000000 262144.0 |
|
210 |
+ ## $P2 FSC-A <NA> 262144 0.0000000 262144.0 |
|
211 |
+ ## $P3 FSC-H <NA> 262144 0.0000000 262144.0 |
|
212 |
+ ## $P4 FSC-W <NA> 262144 0.0000000 262144.0 |
|
213 |
+ ## $P5 SSC-A <NA> 262144 0.0000000 262144.0 |
|
214 |
+ ## $P6 SSC-H <NA> 262144 0.0000000 262144.0 |
|
215 |
+ ## $P7 SSC-W <NA> 262144 0.0000000 262144.0 |
|
216 |
+ ## $P8 FITC-A <NA> 262144 0.1516347 4.5 |
|
217 |
+ ## $P9 PE-A CD3 262144 0.2953046 4.5 |
|
218 |
+ ## $P10 PerCP-Cy5-5-A <NA> 262144 0.4697134 4.5 |
|
219 |
+ ## $P11 PE-Cy7-A <NA> 262144 0.5638024 4.5 |
|
220 |
+ ## $P12 APC-A bob 262144 0.7838544 4.5 |
|
221 |
+ ## $P13 APC-Cy7-A Viab 262144 0.6886181 4.5 |
|
222 |
+ ## $P14 Bd Horizon V450-A CD44 262144 0.6413334 4.5 |
|
223 |
+ ## $P15 Pacific Orange-A CD8 262144 0.3376040 4.5 |
|
224 |
+ ## 231 keywords are stored in the 'description' slot |
|
225 |
+ |
|
226 |
+This returns a `flowFrame` with the cells in gate P3 (70% of the cells |
|
227 |
+according to the plot). |
|
228 |
+ |
|
229 |
+The matrix of expression can be extracted from a `flowFrame` using the |
|
230 |
+`exprs()` method: |
|
231 |
+ |
|
232 |
+``` r |
|
233 |
+e <- exprs(getData(gh,"P3")) |
|
234 |
+class(e) |
|
235 |
+``` |
|
236 |
+ |
|
237 |
+ ## [1] "matrix" |
|
238 |
+ |
|
239 |
+``` r |
|
240 |
+dim(e) |
|
241 |
+``` |
|
242 |
+ |
|
243 |
+ ## [1] 12315 15 |
|
244 |
+ |
|
245 |
+``` r |
|
246 |
+colnames(e) |
|
247 |
+``` |
|
248 |
+ |
|
249 |
+ ## [1] "Time" "FSC-A" "FSC-H" |
|
250 |
+ ## [4] "FSC-W" "SSC-A" "SSC-H" |
|
251 |
+ ## [7] "SSC-W" "FITC-A" "PE-A" |
|
252 |
+ ## [10] "PerCP-Cy5-5-A" "PE-Cy7-A" "APC-A" |
|
253 |
+ ## [13] "APC-Cy7-A" "Bd Horizon V450-A" "Pacific Orange-A" |
|
53 | 254 |
|
54 |
-```r |
|
255 |
+``` r |
|
256 |
+#compute the MFI of the fluorescence channels. |
|
257 |
+colMeans(e[,8:15]) |
|
258 |
+``` |
|
259 |
+ |
|
260 |
+ ## FITC-A PE-A PerCP-Cy5-5-A PE-Cy7-A |
|
261 |
+ ## 0.8305544 1.3162145 0.7746655 0.8017132 |
|
262 |
+ ## APC-A APC-Cy7-A Bd Horizon V450-A Pacific Orange-A |
|
263 |
+ ## 1.0482656 1.1636819 2.2960560 1.3684352 |
|
264 |
+ |
|
265 |
+### Export gated data to other platforms. |
|
266 |
+ |
|
267 |
+In order to export gated data, it must be in `GatingSet` |
|
268 |
+format. |
|
269 |
+ |
|
270 |
+#### Export a `GatingSet` from R to [Cytobank](https://cytobank.org/) or [FlowJo](https://www.flowjo.com/) |
|
271 |
+ |
|
272 |
+Load something to export. |
|
273 |
+ |
|
274 |
+``` r |
|
55 | 275 |
dataDir <- system.file("extdata",package="flowWorkspaceData") |
56 | 276 |
gs <- load_gs(list.files(dataDir, pattern = "gs_manual",full = TRUE)) |
277 |
+``` |
|
278 |
+ |
|
279 |
+ ## loading R object... |
|
280 |
+ |
|
281 |
+ ## loading tree object... |
|
282 |
+ |
|
283 |
+ ## Done |
|
57 | 284 |
|
285 |
+##### Export to Cytobank |
|
286 |
+ |
|
287 |
+``` r |
|
58 | 288 |
#Cytobank |
59 | 289 |
outFile <- tempfile(fileext = ".xml") |
60 | 290 |
GatingSet2cytobank(gs, outFile) |
291 |
+``` |
|
292 |
+ |
|
293 |
+ ## Warning in GatingSet2cytobank(gs, outFile): With 'cytobank.default.scale' |
|
294 |
+ ## set to 'TRUE', data and gates will be re-transformed with cytobank's |
|
295 |
+ ## default scaling settings, which may affect how gates look like. |
|
296 |
+ |
|
297 |
+ ## [1] "/var/folders/jh/x0h3v3pd4dd497g3gtzsm8500000gn/T//RtmprlbWvn/filed187336c542a.xml" |
|
298 |
+ |
|
299 |
+##### Export to FlowJo |
|
61 | 300 |
|
301 |
+``` r |
|
62 | 302 |
#flowJo |
63 | 303 |
outFile <- tempfile(fileext = ".wsp") |
64 | 304 |
GatingSet2flowJo(gs, outFile) |
65 | 305 |
``` |
306 |
+ |
|
307 |
+ ## [1] "/var/folders/jh/x0h3v3pd4dd497g3gtzsm8500000gn/T//RtmprlbWvn/filed1877040990a.wsp" |
|
308 |
+ |
|
309 |
+## Next Steps |
|
310 |
+ |
|
311 |
+See the [flowWorskspace](http://www.github.com/RGLab/flowWorkspace) and |
|
312 |
+\[openCyto\](<http://www.github.com/RGLab/openCyto>\] packages to learn |
|
313 |
+more about what can be done with `GatingSet` objects. |
|
314 |
+ |
|
315 |
+## Code of conduct |
|
316 |
+ |
|
317 |
+Please note that this project is released with a [Contributor Code of |
|
318 |
+Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree |
|
319 |
+to abide by its terms. |
... | ... |
@@ -17,8 +17,9 @@ install_github("RGLab/flowWorkspace", ref="trunk") |
17 | 17 |
install_github("RGLab/openCyto", ref="trunk") |
18 | 18 |
``` |
19 | 19 |
|
20 |
-### Import `gatingML` and `FCS` data from other platforms into `openCyto` |
|
20 |
+### Import `XML` and `FCS` data from other platforms into `openCyto` |
|
21 | 21 |
|
22 |
+#### Parse `gatingML` generated from `Cytobank` |
|
22 | 23 |
```r |
23 | 24 |
library(CytoML) |
24 | 25 |
xmlfile <- system.file("extdata/cytotrol_tcell_cytobank.xml", package = "CytoML") |
... | ... |
@@ -26,6 +27,13 @@ fcsFiles <- list.files(pattern = "CytoTrol", system.file("extdata", package = "f |
26 | 27 |
gs <- cytobank2GatingSet(xmlfile, fcsFiles) |
27 | 28 |
``` |
28 | 29 |
|
30 |
+#### Parse `diva` workspace |
|
31 |
+```r |
|
32 |
+ws <- openDiva(system.file('extdata/diva/PE_2.xml', package = "flowWorkspaceData")) |
|
33 |
+gs <- parseWorkspace(ws, name = 2, subset = 1) |
|
34 |
+``` |
|
35 |
+ |
|
36 |
+ |
|
29 | 37 |
### Then you can interact with the gated data (`GatingSet`) |
30 | 38 |
|
31 | 39 |
```r |
... | ... |
@@ -9,7 +9,7 @@ This package is designed to import/export the hierarchical gated flow data to/fr |
9 | 9 |
```r |
10 | 10 |
# First, install it from bionconductor so that it will pull all the dependent packages automatically |
11 | 11 |
library(BiocInstalller) |
12 |
-bicLite(openCyto) # may be older |
|
12 |
+biocLite(openCyto) # may be older |
|
13 | 13 |
# Then, install the latest version from github using devtools package |
14 | 14 |
install.packages("devtools") |
15 | 15 |
library(devtools) #load it |
... | ... |
@@ -23,7 +23,7 @@ install_github("RGLab/openCyto", ref="trunk") |
23 | 23 |
library(CytoML) |
24 | 24 |
xmlfile <- system.file("extdata/cytotrol_tcell_cytobank.xml", package = "CytoML") |
25 | 25 |
fcsFiles <- list.files(pattern = "CytoTrol", system.file("extdata", package = "flowWorkspaceData"), full = T) |
26 |
-gs <- parse.gatingML(xmlfile, fcsFiles) |
|
26 |
+gs <- cytobank2GatingSet(xmlfile, fcsFiles) |
|
27 | 27 |
``` |
28 | 28 |
|
29 | 29 |
### Then you can interact with the gated data (`GatingSet`) |
... | ... |
@@ -41,11 +41,17 @@ getPopStats(gh) |
41 | 41 |
plotGate(gh) |
42 | 42 |
``` |
43 | 43 |
|
44 |
-### Export the existing `GatingSet` from `openCyto` to `gatingML` |
|
44 |
+### Export the existing `GatingSet` from `openCyto` to `Cytobank` or `flowJo` |
|
45 | 45 |
|
46 | 46 |
```r |
47 | 47 |
dataDir <- system.file("extdata",package="flowWorkspaceData") |
48 | 48 |
gs <- load_gs(list.files(dataDir, pattern = "gs_manual",full = TRUE)) |
49 |
+ |
|
50 |
+#Cytobank |
|
49 | 51 |
outFile <- tempfile(fileext = ".xml") |
50 |
-GatingSet2GatingML(gs, outFile) |
|
52 |
+GatingSet2cytobank(gs, outFile) |
|
53 |
+ |
|
54 |
+#flowJo |
|
55 |
+outFile <- tempfile(fileext = ".wsp") |
|
56 |
+GatingSet2cytobank(gs, outFile) |
|
51 | 57 |
``` |
... | ... |
@@ -1,7 +1,7 @@ |
1 | 1 |
|
2 |
-# CytoML: A tool for openCyto to exchange the hierarchical gated cytometry data with third-party platform |
|
2 |
+# CytoML: A tool designed to work with openCyto to exchange gated cytometry data with third-party platforms |
|
3 | 3 |
|
4 |
-This package is designed import/export the hierarchical gated flow data to/from `openCyto` framework using the standard cytometry format: `gatingML2.0` and `FCS3.0`. |
|
4 |
+This package is designed to import/export the hierarchical gated flow data to/from the `openCyto` framework using the standard cytometry format: `gatingML2.0` and `FCS3.0`. This package makes use of our `GatingSet` R object and data model such that imported data can easily be manipulated and visualized in R using tools like `OpenCyto` and `ggcyto`. |
|
5 | 5 |
|
6 | 6 |
|
7 | 7 |
### INSTALLATION |
... | ... |
@@ -15,10 +15,9 @@ install.packages("devtools") |
15 | 15 |
library(devtools) #load it |
16 | 16 |
install_github("RGLab/flowWorkspace", ref="trunk") |
17 | 17 |
install_github("RGLab/openCyto", ref="trunk") |
18 |
- |
|
19 | 18 |
``` |
20 | 19 |
|
21 |
-### Import `gatingML` and `FCS` data from other platform into `openCyto` |
|
20 |
+### Import `gatingML` and `FCS` data from other platforms into `openCyto` |
|
22 | 21 |
|
23 | 22 |
```r |
24 | 23 |
library(CytoML) |
... | ... |
@@ -28,6 +27,7 @@ gs <- parse.gatingML(xmlfile, fcsFiles) |
28 | 27 |
``` |
29 | 28 |
|
30 | 29 |
### Then you can interact with the gated data (`GatingSet`) |
30 |
+ |
|
31 | 31 |
```r |
32 | 32 |
#get the first sample |
33 | 33 |
gh <- gs[[1]] |
... | ... |
@@ -39,13 +39,13 @@ getNodes(gh) |
39 | 39 |
getPopStats(gh) |
40 | 40 |
#plot the gates |
41 | 41 |
plotGate(gh) |
42 |
- |
|
43 | 42 |
``` |
44 | 43 |
|
45 | 44 |
### Export the existing `GatingSet` from `openCyto` to `gatingML` |
45 |
+ |
|
46 | 46 |
```r |
47 | 47 |
dataDir <- system.file("extdata",package="flowWorkspaceData") |
48 | 48 |
gs <- load_gs(list.files(dataDir, pattern = "gs_manual",full = TRUE)) |
49 | 49 |
outFile <- tempfile(fileext = ".xml") |
50 | 50 |
GatingSet2GatingML(gs, outFile) |
51 |
-``` |
|
52 | 51 |
\ No newline at end of file |
52 |
+``` |
... | ... |
@@ -1,5 +1,5 @@ |
1 | 1 |
|
2 |
-# CytoML: A tool for openCyto exchange the hierarchical gated cytometry data with third-party platform |
|
2 |
+# CytoML: A tool for openCyto to exchange the hierarchical gated cytometry data with third-party platform |
|
3 | 3 |
|
4 | 4 |
This package is designed import/export the hierarchical gated flow data to/from `openCyto` framework using the standard cytometry format: `gatingML2.0` and `FCS3.0`. |
5 | 5 |
|
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,51 @@ |
1 |
+ |
|
2 |
+# CytoML: A tool for openCyto exchange the hierarchical gated cytometry data with third-party platform |
|
3 |
+ |
|
4 |
+This package is designed import/export the hierarchical gated flow data to/from `openCyto` framework using the standard cytometry format: `gatingML2.0` and `FCS3.0`. |
|
5 |
+ |
|
6 |
+ |
|
7 |
+### INSTALLATION |
|
8 |
+ |
|
9 |
+```r |
|
10 |
+# First, install it from bionconductor so that it will pull all the dependent packages automatically |
|
11 |
+library(BiocInstalller) |
|
12 |
+bicLite(openCyto) # may be older |
|
13 |
+# Then, install the latest version from github using devtools package |
|
14 |
+install.packages("devtools") |
|
15 |
+library(devtools) #load it |
|
16 |
+install_github("RGLab/flowWorkspace", ref="trunk") |
|
17 |
+install_github("RGLab/openCyto", ref="trunk") |
|
18 |
+ |
|
19 |
+``` |
|
20 |
+ |
|
21 |
+### Import `gatingML` and `FCS` data from other platform into `openCyto` |
|
22 |
+ |
|
23 |
+```r |
|
24 |
+library(CytoML) |
|
25 |
+xmlfile <- system.file("extdata/cytotrol_tcell_cytobank.xml", package = "CytoML") |
|
26 |
+fcsFiles <- list.files(pattern = "CytoTrol", system.file("extdata", package = "flowWorkspaceData"), full = T) |
|
27 |
+gs <- parse.gatingML(xmlfile, fcsFiles) |
|
28 |
+``` |
|
29 |
+ |
|
30 |
+### Then you can interact with the gated data (`GatingSet`) |
|
31 |
+```r |
|
32 |
+#get the first sample |
|
33 |
+gh <- gs[[1]] |
|
34 |
+#plot the hierarchy tree |
|
35 |
+plot(gh) |
|
36 |
+#show all the cell populations(/nodes) |
|
37 |
+getNodes(gh) |
|
38 |
+#show the population statistics |
|
39 |
+getPopStats(gh) |
|
40 |
+#plot the gates |
|
41 |
+plotGate(gh) |
|
42 |
+ |
|
43 |
+``` |
|
44 |
+ |
|
45 |
+### Export the existing `GatingSet` from `openCyto` to `gatingML` |
|
46 |
+```r |
|
47 |
+dataDir <- system.file("extdata",package="flowWorkspaceData") |
|
48 |
+gs <- load_gs(list.files(dataDir, pattern = "gs_manual",full = TRUE)) |
|
49 |
+outFile <- tempfile(fileext = ".xml") |
|
50 |
+GatingSet2GatingML(gs, outFile) |
|
51 |
+``` |
|
0 | 52 |
\ No newline at end of file |