Skip to content

jmeskas/CytoML

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

137 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CytoML: A tool designed to work with openCyto to exchange gated cytometry data with third-party platforms

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.

INSTALLATION

# First, install it from bionconductor so that it will pull all the dependent packages automatically
library(BiocInstalller)
biocLite(openCyto) # may be older
# Then, install the latest version from github using devtools package 
install.packages("devtools") 
library(devtools) #load it
install_github("RGLab/flowWorkspace", ref="trunk")
install_github("RGLab/openCyto", ref="trunk")

Import XML and FCS data from other platforms into openCyto

Parse gatingML generated from Cytobank

library(CytoML)
xmlfile <- system.file("extdata/cytotrol_tcell_cytobank.xml", package = "CytoML")
fcsFiles <- list.files(pattern = "CytoTrol", system.file("extdata", package = "flowWorkspaceData"), full = T)
gs <- cytobank2GatingSet(xmlfile, fcsFiles)

Parse diva workspace

ws <- openDiva(system.file('extdata/diva/PE_2.xml', package = "flowWorkspaceData"))
gs <- parseWorkspace(ws, name = 2, subset = 1)

Then you can interact with the gated data (GatingSet)

#get the first sample
gh <- gs[[1]]
#plot the hierarchy tree
plot(gh)
#show all the cell populations(/nodes)
getNodes(gh)
#show the population statistics
getPopStats(gh)
#plot the gates
plotGate(gh) 

Export the existing GatingSet from openCyto to Cytobank or flowJo

dataDir <- system.file("extdata",package="flowWorkspaceData")
gs <- load_gs(list.files(dataDir, pattern = "gs_manual",full = TRUE))

#Cytobank
outFile <- tempfile(fileext = ".xml")
GatingSet2cytobank(gs, outFile)

#flowJo
outFile <- tempfile(fileext = ".wsp")
GatingSet2flowJo(gs, outFile)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • R 100.0%