Question: exporting bi-exponetially transformed data as CVS
gravatar for Aki Hoji
21 months ago by
Aki Hoji10
Aki Hoji10 wrote:


Is is possible to extract bi-exp transformation values embedded in a Flowjo worksheet,  apply to compesanted fcs data and export the data as a CSV file by using flowWorkspace and/or flow core ? Any help will be appreciated.

Thanks in advance.





ADD COMMENTlink modified 21 months ago by Jiang, Mike1.2k • written 21 months ago by Aki Hoji10
gravatar for Jiang, Mike
21 months ago by
Jiang, Mike1.2k
(Private Address)
Jiang, Mike1.2k wrote:

Is this what you need?

# load raw fcs
fcsfiles <- list.files(pattern = "CytoTrol", system.file("extdata", package = "flowWorkspaceData"), full = TRUE)[1]
fs <- read.ncdfFlowSet(fcsfiles)
# read spillover from fcs
comp <- spillover(fs[[1]])[[1]]
# compensate the fcs
fs <- compensate(fs, comp)

# read flowJo workspace
ws <- openWorkspace(system.file("extdata/manual.xml", package = "flowWorkspaceData"))
# parse it into GatingSet 
#if biexp transformation is the only thing you need, then set execute to FALSE will bypass loading the data thus speed up the process
gs <- parseWorkspace(ws, name = 2, execute = F)
#extract transformation 
trans <- getTransformations(gs[[1]])
# construct a transformList
trans <- transformList(from = colnames(comp), trans)
# apply to compensated data
fs <- transform(fs, trans)
#export the data to csv
for(sn in sampleNames(fs))
  filename <- paste0(sn, ".csv")
  write.csv(exprs(fs[[sn]]), file = filename)
ADD COMMENTlink written 21 months ago by Jiang, Mike1.2k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 210 users visited in the last hour