exporting bi-exponetially transformed data as CVS
1
0
Entering edit mode
Aki Hoji ▴ 10
@aki-hoji-6155
Last seen 18 months ago
United States

Hi,

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.

 

 

 

 

flowWorkspace flowcore • 1.2k views
ADD COMMENT
0
Entering edit mode
Jiang, Mike ★ 1.3k
@jiang-mike-4886
Last seen 3.2 years ago
(Private Address)

Is this what you need?

library(flowWorkspace)
# 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 COMMENT

Login before adding your answer.

Traffic: 588 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6