rflowcyt - read.series.FCS function
2
0
Entering edit mode
Jabez Wilson ▴ 150
@jabez-wilson-1839
Last seen 9.6 years ago
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20060822/ f621c047/attachment.pl
• 721 views
ADD COMMENT
0
Entering edit mode
@nolwenn-lemeur-1609
Last seen 9.6 years ago
Hi Jab, Thanks you for using rflowcyt. I have created the plotdensity.FCS function to perform some data quality assessment on 'raw' data but I believe you can use it on gated data. Depending on your gating approach, I think you can still read all your files at once with the read.series.FCS function, which only build a list of FCS.object. Below are 2 dummy examples that, I think, do what you want: library(rflowcyt) if (require(rfcdmin)) { ##Obtain the location of the fcs files pathFiles<-system.file("bccrc", package="rfcdmin") drugFiles<-dir(pathFiles) ## Read a serie of FCS files drugData<-read.series.FCS(drugFiles,path=pathFiles,MY.DEBUG=FALSE) } ##---- First method ------ ##Gate your first sample gate1.range.x <- c(200, 600) gate1.range.y <- c(200, 600) gateSample1 <- createGate(drugData[[1]], varpos = c(1, 2), gatingrange = c(gate1.range.x, gate1.range.y), type = "bidcut", comment = "first gate") ##Gate your second gate2.range.x <- c(300, 600) gate2.range.y <- c(300, 600) gateSample2 <- createGate(drugData[[2]], varpos = c(1, 2), gatingrange = c(gate2.range.x, gate2.range.y), type = "bidcut", comment = "first gate") ##Extract data gateS1 <- extractGatedData(gateSample1,gateNum=1,IndexValue.In=1) gateS2 <- extractGatedData(gateSample2,gateNum=1,IndexValue.In=1) ##Combine in a list foo <- list(gateS1,gateS2) ##Draw a density plot for the Foward SCatter parameter for the ##differents aliquots (of the same cell line) tested with different ##compounds. plotdensity.FCS(foo,varpos=c(1),main="Gated FSC values",ylim=c(0,0.01),ylab="Density of cells") ##----------Second Method--------- ##If the definition of your gate is the same for every sample gate.range.x <- c(200, 600) gate.range.y <- c(200, 600) gatedDrugData <- lapply(drugData,function(x) createGate(x, varpos = c(1, 2), gatingrange = c(gate.range.x, gate.range.y), type = "bidcut", comment = "first gate")) gatedData <- lapply(gatedDrugData,function(x) extractGatedData(x,gateNum=1,IndexValue.In=1)) plotdensity.FCS(gatedData,varpos=c(1),main="Gated FSC values",ylim=c(0,0.01),ylab="Density of cells") Hope it helps, Nolwenn ************************************** Nolwenn Le Meur, PhD Fred Hutchinson Cancer Research Center Computational Biology 1100 Fairview Ave. N., M2-B876 P.O. Box 19024 Seattle, WA 98109-1024 On Tue, 22 Aug 2006, Jabez Wilson wrote: > Hi, I've been going through examples in the excellent "rflowcyt" package, and have a question about the read.series.FCS function. > The RFlowCyt users guide gives a nice example of reading in 8 FCS files into a data series using read.series.FCS, and then printing them out on the same graph e.g. > > plotdensity.FCS(drug.fluors, varpos = c(1), main = "FSC for aliquots \ntreated with different compounds", ylim = c(0, 0.005), ylab = "Density of cells"). > > What I would like to do would be to read in these files separately, perform gating and extract the gated data, and then combine the subsequent gated FCS objects into a data series and plot them on the same graph. Is there an easy way to do this? Is it something to do with the myFCSobj.name="" argument in read.FCS function. > Any help/guidance appreciated > Jab > > > --------------------------------- > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor >
ADD COMMENT
0
Entering edit mode
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20060823/ 696fc017/attachment.ksh
ADD REPLY
0
Entering edit mode
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20060825/ 589c9d17/attachment.pl
ADD REPLY
0
Entering edit mode
Seth Falcon ★ 7.4k
@seth-falcon-992
Last seen 9.6 years ago
Jabez Wilson <jabezwuk at="" yahoo.co.uk=""> writes: > Thanks for the response. I don't seem to be able to get your examples > to run. Everything is OK up to: > > plotdensity.FCS(foo,varpos=c(1),main="Gated FSC > values",ylim=c(0,0.01),ylab="Density of cells") > > I get an error message in both examples: > > Error in sort(x) : 'x' must be atomic In addition: Warning messages: > 1: no finite arguments to min; returning Inf 2: no finite arguments to > max; returning -Inf Error in plot(density.lf(x[[1]][, varpos]), type = > "n", xlab = xlab, ylab = ylab, : unable to find the argument 'x' in > selecting a method for function 'plot' > > I'm using R version 2.2.1, 2005-12-20, i386-pc-mingw32, rflowcyt > version 1.2.0 > > Any thoughts? Perhaps upgrading to R 2.3.1 and the latest rflowcyt release? + seth
ADD COMMENT

Login before adding your answer.

Traffic: 901 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