merging a large number of files
Hi all, could you recommend me packages in Python (or in R) for merging a large number of FCS files? The ones I have found are very old
# using R and flowCore
library(flowCore)
# from the help of read.flowSet
fcs.loc <- system.file("extdata",package="flowCore")
file.location <- paste(fcs.loc, dir(fcs.loc), sep="/")
fs <- read.flowSet(file.location[1:3])
# a flowSet is a list of flowFrames having all the same channels; here is the first one
fs[[1]]
flowFrame object '0877408774.B08'
with 10000 cells and 8 observables:
name desc range minRange maxRange
$P1 FSC-H FSC-H 1024 0.00000 1023
$P2 SSC-H SSC-H 1024 0.00000 1023
$P3 FL1-H NA 1024 1.00904 10000
$P4 FL2-H NA 1024 1.00904 10000
$P5 FL3-H NA 1024 1.00904 10000
$P6 FL1-A NA 1024 0.00000 1023
$P7 FL4-H NA 1024 1.00904 10000
$P8 Time Time (51.20 sec.) 1024 0.00000 1023
166 keywords are stored in the 'description' slot
# the concatenation code
> fm <- as(fs, "flowFrame")
# the result is a single flowFrame with an extra channel called Original containing integers identifying each flowFrame
> fm
flowFrame object 'anonymous'
with 30000 cells and 9 observables:
name desc range minRange maxRange
$P1 FSC-H FSC-H 1024 0.00000 1023
$P2 SSC-H SSC-H 1024 0.00000 1023
$P3 FL1-H NA 1024 1.00904 10000
$P4 FL2-H NA 1024 1.00904 10000
$P5 FL3-H NA 1024 1.00904 10000
$P6 FL1-A NA 1024 0.00000 1023
$P7 FL4-H NA 1024 1.00904 10000
$P8 Time Time (51.20 sec.) 1024 0.00000 1023
Original Original Original Frame NA 1.00000 3
2 keywords are stored in the 'description' slot
# it could be written on disk using write.FCS()
Users browsing this forum: No registered users and 58 guests