[BioC] Help with flowCore Package: Working through the HowTo
M. Jankowski
mjankowski at gmail.com
Mon Jun 18 23:56:21 CEST 2007
Hi all,
Thank you all for your help of about 10 days ago as I worked through
some installation problems with R and Bioconductor. I hope those are
behind me. I tried using the "prada" package for awhile and became
somewhat stumped. After reading through a few posts it sounded like
the "flowCore" package might assist me in analzing my flow cytometry
data.
I try to analyze my data as directed in the "HowTo-flowCore.pdf"
document found on the Bioconductor website. As the following code
demonstrates I can create an individual 'flowFrame' from my *.fcs
data.
> library("flowCore")
Loading required package: Biobase
Loading required package: tools
Welcome to Bioconductor
Vignettes contain introductory material. To view, type
'openVignette()' or start with 'help(Biobase)'. For details
on reading vignettes, see the openVignette help page.
Loading required package: rrcov
Scalable Robust Estimators with High Breakdown Point (version 0.3-05)
KernSmooth 2.22 installed
Copyright M. P. Wand 1997
> x <- readFCS("/home/mdj/Rdata/", transformation = FALSE, alter.names=TRUE);
> summary(x)
FSC.H SSC.H FL1.H FL2.H FL3.H FL1.A FL4.H Time
Min. 0.0 0.0 0.0 0.0 0 0.0 0 0.0
1st Qu. 129.0 117.0 428.0 199.0 304 7.0 123 59.0
Median 225.0 181.0 651.0 307.0 700 96.0 323 122.0
Mean 338.3 271.3 639.4 369.2 650 240.3 308 160.6
3rd Qu. 378.8 273.0 795.0 468.0 902 332.8 396 186.0
Max. 62460.0 63610.0 64570.0 60770.0 64820 64320.0 60800 65340.0
>
As you can see, I have some pretty far outliers in all the data sets.
What procedure would I follow to gate the data to less than 800 for
"FSC.H" and "SSC.H"? Further, how would I plot the result of the gated
data? In the context of the HowTo I would call my question "2.1.4:
Gating and Plotting a flowFrame"
The flowSet discussion in the HowTo does cover filtering and gating.
When I attempt to read my file in as a flowset I get errors.
Section 2.2.1 give the instruction:
> frames <- lapply(dir(system.file("extdata", "compdata", "data",
+ package = "flowCore"), full.names = TRUE), read.FCS)
> as(frames, "flowSet")
I'm not certain how to put my "/home/mdj/Rdata/" directory into the
context of the system.file function. Here is my best attempt:
> frames <= lapply("/home/mdj/data/Rdata/", readFCS)
Error: object "frames" not found
When I attempt "read.flowSet":
> read.flowSet("/home/mdj/Rdata/")
Error in readFCSheader(con) : This does not seem to be a valid FCS2.0
or FCS3.0 file
>
This is odd because 'readFCS' was able to read my file just fine.
Using read.flowSet it is not a vaild FCS2.0 or FCS3.0 file?
These errors have me stumped. I think the organization of this library
is quite keen. I like the flowFrame object in what I think of as a
flowSet vector (with nice header). Would someone show me how to:
1) gate my data for the 'flowFrame' object and then plot the gated data?
2) work my way through creating a flowSet object? I think my main
problem is that I am clumsy with the system.file syntax.
My apologies if these questions are answered elsewhere. If this is the
case please point me in the right direction.
Any and all help is appreciated. Thanks!
Matt
More information about the Bioconductor
mailing list