spillover::flowCore Help Needed
2
0
Entering edit mode
Guest User ★ 13k
@guest-user-4897
Last seen 9.7 years ago
Hello there, I am using Bioconductor to look at flow cytometry data. To begin, I would like to generate and apply a compensation matrix to the experimental samples. Below is the work flow, as well as more general information on the flowSet and the R version that I use. Any recommendations would be splendid. I am thinking I might have to figure on how to import FlowJo 10 xml files into bionconductor, a step that I prefer to avoid. Much thanks, Kevin PS I have tried many permutations of the spillover() method including patt=..., useNormFilt=TRUE/FALSE, changing the unstained = index around, etc... And also, I cannot seem to get system.file("compC", package="flowCore") to return a non-empty value, maybe that would make compensation easier. Just a thought. -k ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ##import the flowSet library(flowCore) compData <- read.flowSet(path = ".../compC/", transformation = FALSE) ##trim the time column off (I know there are faster ways, but to be very explicit...) comp.data <- compData[c(1,2,3,4,5,6,7,8,9,10,11,12),c("FSC-A", "SSC-A", "FITC-A", "PerCP-A", "Pacific Blue-A", "AARD-A", "QDot605-A", "APC-A", "Alexa700-A", "APC-Cy7-A", "PE-A", "ECD-A", "PE-Cy7-A")] ##generate compensation matrix spill.mat <- spillover(comp.data,unstained = sampleNames(compData)[12], fsc=compData[,1], ssc=compData[,2]) > traceback() 3: .local(x, ...) : subscript out of bounds 2: spillover(comp.data, unstained <- sampleNames(compData)[12], fsc = compData[,1], ssc = compData[, 2]) 1: spillover(comp.data, unstained <- sampleNames(compData)[12], fsc = compData[,1], ssc = compData[, 2]) > compData[[12]] flowFrame object 'Compensation Controls_Unstained Control.fcs' with 10000 cells and 14 observables: name desc range minRange maxRange $P1 FSC-A NA 262144 0.00 262143 $P2 SSC-A NA 262144 0.00 262143 $P3 FITC-A NA 262144 -106.22 262143 $P4 PerCP-A NA 262144 -111.00 262143 $P5 Pacific Blue-A NA 262144 -111.00 262143 $P6 AARD-A NA 262144 -111.00 262143 $P7 QDot605-A NA 262144 -111.00 262143 $P8 APC-A NA 262144 -29.05 262143 $P9 Alexa700-A NA 262144 -82.17 262143 $P10 APC-Cy7-A NA 262144 -111.00 262143 $P11 PE-A NA 262144 -87.69 262143 $P12 ECD-A NA 262144 -63.27 262143 $P13 PE-Cy7-A NA 262144 -25.53 262143 $P14 Time NA 262144 0.00 262143 182 keywords are stored in the 'description' slot -- output of sessionInfo(): > sessionInfo() R version 2.15.1 (2012-06-22) Platform: x86_64-pc-linux-gnu (64-bit) locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 [7] LC_PAPER=C LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] flowCore_1.24.0 rrcov_1.3-02 pcaPP_1.9-48 mvtnorm_0.9-9993 [5] robustbase_0.9-4 Biobase_2.18.0 BiocGenerics_0.4.0 loaded via a namespace (and not attached): [1] feature_1.2.8 graph_1.36.0 ks_1.8.10 MASS_7.3-22 stats4_2.15.1 [6] tools_2.15.1 -- Sent via the guest posting facility at bioconductor.org.
• 2.8k views
ADD COMMENT
0
Entering edit mode
Jiang, Mike ★ 1.3k
@jiang-mike-4886
Last seen 2.6 years ago
(Private Address)
Hi,Kevin, Your spillover call should go like this: spill.mat <- spillover(comp.data,..., fsc="FSC-A", ssc="SSC-A") Regarding to importing flowJo xml to R,you can try "flowWorkspace" package. Hope this helps. Mike Jiang,PhD System Analyst PS Statistics, Vaccine and Infectious Disease Division Fred Hutchinson Cancer Research Center (206)667-1905 <tel:%28206%29667-1905> On 11/06/2012 03:06 PM, Kevin Schiesser [guest] wrote: > Hello there, > I am using Bioconductor to look at flow cytometry data. To begin, I would like to generate and apply a compensation matrix to the experimental samples. Below is the work flow, as well as more general information on the flowSet and the R version that I use. Any recommendations would be splendid. I am thinking I might have to figure on how to import FlowJo 10 xml files into bionconductor, a step that I prefer to avoid. > > Much thanks, > Kevin > > PS I have tried many permutations of the spillover() method including patt=..., useNormFilt=TRUE/FALSE, changing the unstained = index around, etc... And also, I cannot seem to get system.file("compC", package="flowCore") to return a non-empty value, maybe that would make compensation easier. Just a thought. -k > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > ##import the flowSet > > library(flowCore) > > compData <- read.flowSet(path = ".../compC/", transformation = FALSE) > > ##trim the time column off (I know there are faster ways, but to be very explicit...) > > comp.data <- compData[c(1,2,3,4,5,6,7,8,9,10,11,12),c("FSC-A", "SSC-A", "FITC-A", "PerCP-A", "Pacific Blue-A", "AARD-A", "QDot605-A", "APC-A", "Alexa700-A", "APC-Cy7-A", "PE-A", "ECD-A", "PE-Cy7-A")] > > ##generate compensation matrix > > spill.mat <- spillover(comp.data,unstained = sampleNames(compData)[12], fsc=compData[,1], ssc=compData[,2]) > >> traceback() > 3: .local(x, ...) : subscript out of bounds > 2: spillover(comp.data, unstained <- sampleNames(compData)[12], fsc = compData[,1], ssc = compData[, 2]) > 1: spillover(comp.data, unstained <- sampleNames(compData)[12], fsc = compData[,1], ssc = compData[, 2]) > >> compData[[12]] > flowFrame object 'Compensation Controls_Unstained Control.fcs' > with 10000 cells and 14 observables: > name desc range minRange maxRange > $P1 FSC-A NA 262144 0.00 262143 > $P2 SSC-A NA 262144 0.00 262143 > $P3 FITC-A NA 262144 -106.22 262143 > $P4 PerCP-A NA 262144 -111.00 262143 > $P5 Pacific Blue-A NA 262144 -111.00 262143 > $P6 AARD-A NA 262144 -111.00 262143 > $P7 QDot605-A NA 262144 -111.00 262143 > $P8 APC-A NA 262144 -29.05 262143 > $P9 Alexa700-A NA 262144 -82.17 262143 > $P10 APC-Cy7-A NA 262144 -111.00 262143 > $P11 PE-A NA 262144 -87.69 262143 > $P12 ECD-A NA 262144 -63.27 262143 > $P13 PE-Cy7-A NA 262144 -25.53 262143 > $P14 Time NA 262144 0.00 262143 > 182 keywords are stored in the 'description' slot > > -- output of sessionInfo(): > >> sessionInfo() > R version 2.15.1 (2012-06-22) > Platform: x86_64-pc-linux-gnu (64-bit) > > locale: > [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C > [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 > [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 > [7] LC_PAPER=C LC_NAME=C > [9] LC_ADDRESS=C LC_TELEPHONE=C > [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C > > attached base packages: > [1] stats graphics grDevices utils datasets methods base > > other attached packages: > [1] flowCore_1.24.0 rrcov_1.3-02 pcaPP_1.9-48 mvtnorm_0.9-9993 > [5] robustbase_0.9-4 Biobase_2.18.0 BiocGenerics_0.4.0 > > loaded via a namespace (and not attached): > [1] feature_1.2.8 graph_1.36.0 ks_1.8.10 MASS_7.3-22 stats4_2.15.1 > [6] tools_2.15.1 > > -- > Sent via the guest posting facility at bioconductor.org. [[alternative HTML version deleted]]
ADD COMMENT
0
Entering edit mode
Thanks for the advice Mike. I have tried changing the fsc/ssc calls around as you suggested, and get the same error. On the bright side, I was able to use spillover() successfully with the sample data in flowCore/extdata/compdata/data. I reckon my flowSet needs some cleaning up yet. -k On 11/06/2012 04:06 PM, Mike wrote: > Hi,Kevin, > > Your spillover call should go like this: > spill.mat<- spillover(comp.data,..., fsc="FSC-A", ssc="SSC-A") > > Regarding to importing flowJo xml to R,you can try "flowWorkspace" package. Hope this helps. > > > Mike Jiang,PhD > > System Analyst > > PS Statistics, Vaccine and Infectious Disease Division > > Fred Hutchinson Cancer Research Center > > (206)667-1905 <tel:%28206%29667-1905> > > > On 11/06/2012 03:06 PM, Kevin Schiesser [guest] wrote: >> Hello there, >> I am using Bioconductor to look at flow cytometry data. To begin, I would like to generate and apply a compensation matrix to the experimental samples. Below is the work flow, as well as more general information on the flowSet and the R version that I use. Any recommendations would be splendid. I am thinking I might have to figure on how to import FlowJo 10 xml files into bionconductor, a step that I prefer to avoid. >> >> Much thanks, >> Kevin >> >> PS I have tried many permutations of the spillover() method including patt=..., useNormFilt=TRUE/FALSE, changing the unstained = index around, etc... And also, I cannot seem to get system.file("compC", package="flowCore") to return a non-empty value, maybe that would make compensation easier. Just a thought. -k >> >> ~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> >> ##import the flowSet >> >> library(flowCore) >> >> compData<- read.flowSet(path = ".../compC/", transformation = FALSE) >> >> ##trim the time column off (I know there are faster ways, but to be very explicit...) >> >> comp.data<- compData[c(1,2,3,4,5,6,7,8,9,10,11,12),c("FSC-A", "SSC-A", "FITC-A", "PerCP-A", "Pacific Blue-A", "AARD-A", "QDot605-A", "APC-A", "Alexa700-A", "APC-Cy7-A", "PE-A", "ECD-A", "PE-Cy7-A")] >> >> ##generate compensation matrix >> >> spill.mat<- spillover(comp.data,unstained = sampleNames(compData)[12], fsc=compData[,1], ssc=compData[,2]) >> >>> traceback() >> 3: .local(x, ...) : subscript out of bounds >> 2: spillover(comp.data, unstained<- sampleNames(compData)[12], fsc = compData[,1], ssc = compData[, 2]) >> 1: spillover(comp.data, unstained<- sampleNames(compData)[12], fsc = compData[,1], ssc = compData[, 2]) >> >>> compData[[12]] >> flowFrame object 'Compensation Controls_Unstained Control.fcs' >> with 10000 cells and 14 observables: >> name desc range minRange maxRange >> $P1 FSC-A NA 262144 0.00 262143 >> $P2 SSC-A NA 262144 0.00 262143 >> $P3 FITC-A NA 262144 -106.22 262143 >> $P4 PerCP-A NA 262144 -111.00 262143 >> $P5 Pacific Blue-A NA 262144 -111.00 262143 >> $P6 AARD-A NA 262144 -111.00 262143 >> $P7 QDot605-A NA 262144 -111.00 262143 >> $P8 APC-A NA 262144 -29.05 262143 >> $P9 Alexa700-A NA 262144 -82.17 262143 >> $P10 APC-Cy7-A NA 262144 -111.00 262143 >> $P11 PE-A NA 262144 -87.69 262143 >> $P12 ECD-A NA 262144 -63.27 262143 >> $P13 PE-Cy7-A NA 262144 -25.53 262143 >> $P14 Time NA 262144 0.00 262143 >> 182 keywords are stored in the 'description' slot >> >> -- output of sessionInfo(): >> >>> sessionInfo() >> R version 2.15.1 (2012-06-22) >> Platform: x86_64-pc-linux-gnu (64-bit) >> >> locale: >> [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C >> [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 >> [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 >> [7] LC_PAPER=C LC_NAME=C >> [9] LC_ADDRESS=C LC_TELEPHONE=C >> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C >> >> attached base packages: >> [1] stats graphics grDevices utils datasets methods base >> >> other attached packages: >> [1] flowCore_1.24.0 rrcov_1.3-02 pcaPP_1.9-48 mvtnorm_0.9-9993 >> [5] robustbase_0.9-4 Biobase_2.18.0 BiocGenerics_0.4.0 >> >> loaded via a namespace (and not attached): >> [1] feature_1.2.8 graph_1.36.0 ks_1.8.10 MASS_7.3-22 stats4_2.15.1 >> [6] tools_2.15.1 >> >> -- >> Sent via the guest posting facility at bioconductor.org. > [[alternative HTML version deleted]]
ADD REPLY
0
Entering edit mode
Greg Finak ▴ 240
@greg-finak-4299
Last seen 7.3 years ago
United States
Kevin, could you provide a traceback() after this error occurs? ---------------------------------------------------------- Greg Finak, Ph.D Staff Scientist Vaccine and Infectious Disease Division. Fred Hutchinson Cancer Research Center Seattle, WA (206)667-3116 gfinak@fhcrc.org On 2012-11-08, at 10:17 AM, Kevin Schiesser wrote: > After a couple days of troubleshooting, I am able to generate an incomplete compensation matrix. It's a bit baffling but here goes. If: > > useNormFilt =TRUE and method = "mean" in spillover() > > Then: the spillover() function returns a non-empty value only when the stain+fsc+ssc parameters are limited to 11 or less. For instance: > > > mat.cfs.clean <- spillover(cfs.clean[,(1:11)], 12, fsc="FSC-A", ssc="SSC-A", method="mean", useNormFilt=TRUE) > > mat.cfs.clean > FITC-A PerCP-A Pacific Blue-A AARD-A QDot605-A APC-A Alexa700-A APC-Cy7-A PE-A > FITC-A 1.000000e+00 0.0358395804 0.0008531686 1.993349e-02 6.022913e-03 0.0013364573 0.000000e+00 0.0000000000 5.264458e-03 > PerCP-A 0.000000e+00 1.0000000000 0.0008722239 0.000000e+00 1.286419e-05 0.0242856076 3.460406e-02 0.0059878924 0.000000e+00 > Pacific Blue-A 4.631962e-05 0.0009085721 1.0000000000 1.179575e-01 1.169263e-02 0.0021385373 1.742831e-05 0.0000000000 0.000000e+00 > AARD-A 1.008167e-01 0.2910952827 0.2913268220 1.000000e+00 5.124343e-01 0.0000000000 8.682088e-02 0.0507779717 3.867331e-02 > QDot605-A 6.119886e-04 0.0040399152 0.0005064663 0.000000e+00 1.000000e+00 0.0000000000 0.000000e+00 0.0000000000 9.767048e-03 > APC-A 5.944180e-05 0.0151967641 0.0001962633 0.000000e+00 6.093479e-05 1.0000000000 3.447000e-01 0.0676159928 1.971772e-05 > Alexa700-A 1.465875e-03 0.0150411274 0.0009918405 0.000000e+00 0.000000e+00 0.0058617085 1.000000e+00 0.1992198495 3.531374e-04 > APC-Cy7-A 1.169540e-04 0.0063815758 0.0014514320 6.223971e-05 9.907666e-06 0.2403238884 1.825396e-01 1.0000000000 8.540711e-05 > PE-A 4.780649e-02 0.2291811583 0.0001488972 0.000000e+00 6.747392e-02 0.0001477967 2.612027e-04 0.0002589873 1.000000e+00 > > > mat.cfs.clean <- spillover(cfs.clean[,(1:13)], 12, fsc="FSC-A", ssc="SSC-A", method="mean", useNormFilt=TRUE) > Error in .local(x, ...) : subscript out of bounds > > Alternatively > > > mat.cfs.clean <- spillover(cfs.clean[,-(3:4)], 12, fsc="FSC-A", ssc="SSC-A", method="mean", useNormFilt=TRUE) > completes > > mat.cfs.clean <- spillover(cfs.clean[,-(3)], 12, fsc="FSC-A", ssc="SSC-A", method="mean", useNormFilt=TRUE) > Error in .local(x, ...) : subscript out of bounds > > Any thoughts? I has also occurred to me that I might first gate the stained/unstained beads before calculating the spillover matrix. Has anyone tried this before? -k > > On 11/07/2012 06:14 PM, Kevin Schiesser wrote: >> >> Could the 'script out of bounds' error be arising because the some of the florescent intensity measurements are negative? Do you transform your compensation measurements before generating the compensation matrix? >> >> Thanks much, >> Kevin >> >> On 11/06/2012 04:10 PM, Kevin Schiesser wrote: >>> >>> Thanks for the advice Mike. I have tried changing the fsc/ssc calls around as you suggested, and get the same error. On the bright side, I was able to use spillover() successfully with the sample data in flowCore/extdata/compdata/data. I reckon my flowSet needs some cleaning up yet. -k >>> >>> On 11/06/2012 04:06 PM, Mike wrote: >>>> >>>> Hi,Kevin, >>>> >>>> Your spillover call should go like this: >>>> spill.mat <- spillover(comp.data,..., fsc="FSC-A", ssc="SSC-A") >>>> >>>> Regarding to importing flowJo xml to R,you can try "flowWorkspace" package. Hope this helps. >>>> >>>> >>>> Mike Jiang,PhD >>>> >>>> System Analyst >>>> >>>> PS Statistics, Vaccine and Infectious Disease Division >>>> >>>> Fred Hutchinson Cancer Research Center >>>> >>>> (206)667-1905 >>>> >>>> >>>> On 11/06/2012 03:06 PM, Kevin Schiesser [guest] wrote: >>>>> Hello there, >>>>> I am using Bioconductor to look at flow cytometry data. To begin, I would like to generate and apply a compensation matrix to the experimental samples. Below is the work flow, as well as more general information on the flowSet and the R version that I use. Any recommendations would be splendid. I am thinking I might have to figure on how to import FlowJo 10 xml files into bionconductor, a step that I prefer to avoid. >>>>> >>>>> Much thanks, >>>>> Kevin >>>>> >>>>> PS I have tried many permutations of the spillover() method including patt=..., useNormFilt=TRUE/FALSE, changing the unstained = index around, etc... And also, I cannot seem to get system.file("compC", package="flowCore") to return a non-empty value, maybe that would make compensation easier. Just a thought. -k >>>>> >>>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>>>> >>>>> ##import the flowSet >>>>> >>>>> library(flowCore) >>>>> >>>>> compData <- read.flowSet(path = ".../compC/", transformation = FALSE) >>>>> >>>>> ##trim the time column off (I know there are faster ways, but to be very explicit...) >>>>> >>>>> comp.data <- compData[c(1,2,3,4,5,6,7,8,9,10,11,12),c("FSC-A", "SSC-A", "FITC-A", "PerCP-A", "Pacific Blue-A", "AARD-A", "QDot605-A", "APC-A", "Alexa700-A", "APC-Cy7-A", "PE-A", "ECD-A", "PE-Cy7-A")] >>>>> >>>>> ##generate compensation matrix >>>>> >>>>> spill.mat <- spillover(comp.data,unstained = sampleNames(compData)[12], fsc=compData[,1], ssc=compData[,2]) >>>>> >>>>>> traceback() >>>>> 3: .local(x, ...) : subscript out of bounds >>>>> 2: spillover(comp.data, unstained <- sampleNames(compData)[12], fsc = compData[,1], ssc = compData[, 2]) >>>>> 1: spillover(comp.data, unstained <- sampleNames(compData)[12], fsc = compData[,1], ssc = compData[, 2]) >>>>> >>>>>> compData[[12]] >>>>> flowFrame object 'Compensation Controls_Unstained Control.fcs' >>>>> with 10000 cells and 14 observables: >>>>> name desc range minRange maxRange >>>>> $P1 FSC-A NA 262144 0.00 262143 >>>>> $P2 SSC-A NA 262144 0.00 262143 >>>>> $P3 FITC-A NA 262144 -106.22 262143 >>>>> $P4 PerCP-A NA 262144 -111.00 262143 >>>>> $P5 Pacific Blue-A NA 262144 -111.00 262143 >>>>> $P6 AARD-A NA 262144 -111.00 262143 >>>>> $P7 QDot605-A NA 262144 -111.00 262143 >>>>> $P8 APC-A NA 262144 -29.05 262143 >>>>> $P9 Alexa700-A NA 262144 -82.17 262143 >>>>> $P10 APC-Cy7-A NA 262144 -111.00 262143 >>>>> $P11 PE-A NA 262144 -87.69 262143 >>>>> $P12 ECD-A NA 262144 -63.27 262143 >>>>> $P13 PE-Cy7-A NA 262144 -25.53 262143 >>>>> $P14 Time NA 262144 0.00 262143 >>>>> 182 keywords are stored in the 'description' slot >>>>> >>>>> -- output of sessionInfo(): >>>>> >>>>>> sessionInfo() >>>>> R version 2.15.1 (2012-06-22) >>>>> Platform: x86_64-pc-linux-gnu (64-bit) >>>>> >>>>> locale: >>>>> [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C >>>>> [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 >>>>> [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 >>>>> [7] LC_PAPER=C LC_NAME=C >>>>> [9] LC_ADDRESS=C LC_TELEPHONE=C >>>>> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C >>>>> >>>>> attached base packages: >>>>> [1] stats graphics grDevices utils datasets methods base >>>>> >>>>> other attached packages: >>>>> [1] flowCore_1.24.0 rrcov_1.3-02 pcaPP_1.9-48 mvtnorm_0.9-9993 >>>>> [5] robustbase_0.9-4 Biobase_2.18.0 BiocGenerics_0.4.0 >>>>> >>>>> loaded via a namespace (and not attached): >>>>> [1] feature_1.2.8 graph_1.36.0 ks_1.8.10 MASS_7.3-22 stats4_2.15.1 >>>>> [6] tools_2.15.1 >>>>> >>>>> -- >>>>> Sent via the guest posting facility at bioconductor.org. >>>> >>> >> > [[alternative HTML version deleted]]
ADD COMMENT
0
Entering edit mode
> mat.cfs.clean <- spillover(cfs.clean[,(1:12)], 12, fsc="FSC-A", ssc="SSC-A", useNormFilt=TRUE, method="mean") Error in .local(x, ...) : subscript out of bounds > traceback() 3: .local(x, ...) 2: spillover(cfs.clean[, (1:12)], 12, fsc = "FSC-A", ssc = "SSC-A", useNormFilt = TRUE, method = "mean") 1: spillover(cfs.clean[, (1:12)], 12, fsc = "FSC-A", ssc = "SSC-A", useNormFilt = TRUE, method = "mean") On 11/08/2012 10:28 AM, Greg Finak wrote: > Kevin, could you provide a traceback() after this error occurs? > > ---------------------------------------------------------- > Greg Finak, Ph.D > Staff Scientist > Vaccine and Infectious Disease Division. > Fred Hutchinson Cancer Research Center > Seattle, WA > (206)667-3116 > gfinak@fhcrc.org <mailto:gfinak@fhcrc.org> > > On 2012-11-08, at 10:17 AM, Kevin Schiesser wrote: > >> After a couple days of troubleshooting, I am able to generate an >> /incomplete/ compensation matrix. It's a bit baffling but here goes. If: >> >> useNormFilt =TRUE and method = "mean" in spillover() >> >> Then: the spillover() function returns a non-empty value /only /when >> the stain+fsc+ssc parameters are limited to 11 or less. For instance: >> >> > mat.cfs.clean <- spillover(cfs.clean[,(1:11)], 12, fsc="FSC-A", >> ssc="SSC-A", method="mean", useNormFilt=TRUE) >> > mat.cfs.clean >> FITC-A PerCP-A Pacific Blue-A >> AARD-A QDot605-A APC-A Alexa700-A APC-Cy7-A PE-A >> FITC-A 1.000000e+00 0.0358395804 0.0008531686 1.993349e-02 >> 6.022913e-03 0.0013364573 0.000000e+00 0.0000000000 5.264458e-03 >> PerCP-A 0.000000e+00 1.0000000000 0.0008722239 0.000000e+00 >> 1.286419e-05 0.0242856076 3.460406e-02 0.0059878924 0.000000e+00 >> Pacific Blue-A 4.631962e-05 0.0009085721 1.0000000000 1.179575e-01 >> 1.169263e-02 0.0021385373 1.742831e-05 0.0000000000 0.000000e+00 >> AARD-A 1.008167e-01 0.2910952827 0.2913268220 1.000000e+00 >> 5.124343e-01 0.0000000000 8.682088e-02 0.0507779717 3.867331e-02 >> QDot605-A 6.119886e-04 0.0040399152 0.0005064663 0.000000e+00 >> 1.000000e+00 0.0000000000 0.000000e+00 0.0000000000 9.767048e-03 >> APC-A 5.944180e-05 0.0151967641 0.0001962633 0.000000e+00 >> 6.093479e-05 1.0000000000 3.447000e-01 0.0676159928 1.971772e-05 >> Alexa700-A 1.465875e-03 0.0150411274 0.0009918405 0.000000e+00 >> 0.000000e+00 0.0058617085 1.000000e+00 0.1992198495 3.531374e-04 >> APC-Cy7-A 1.169540e-04 0.0063815758 0.0014514320 6.223971e-05 >> 9.907666e-06 0.2403238884 1.825396e-01 1.0000000000 8.540711e-05 >> PE-A 4.780649e-02 0.2291811583 0.0001488972 0.000000e+00 >> 6.747392e-02 0.0001477967 2.612027e-04 0.0002589873 1.000000e+00 >> >> > mat.cfs.clean <- spillover(cfs.clean[,(1:13)], 12, fsc="FSC-A", >> ssc="SSC-A", method="mean", useNormFilt=TRUE) >> Error in .local(x, ...) : subscript out of bounds >> >> Alternatively >> >> > mat.cfs.clean <- spillover(cfs.clean[,-(3:4)], 12, fsc="FSC-A", >> ssc="SSC-A", method="mean", useNormFilt=TRUE) >> completes >> > mat.cfs.clean <- spillover(cfs.clean[,-(3)], 12, fsc="FSC-A", >> ssc="SSC-A", method="mean", useNormFilt=TRUE) >> Error in .local(x, ...) : subscript out of bounds >> >> Any thoughts? I has also occurred to me that I might first gate the >> stained/unstained beads before calculating the spillover matrix. Has >> anyone tried this before? -k >> >> On 11/07/2012 06:14 PM, Kevin Schiesser wrote: >>> Could the 'script out of bounds' error be arising because the some >>> of the florescent intensity measurements are negative? Do you >>> transform your compensation measurements before generating the >>> compensation matrix? >>> >>> Thanks much, >>> Kevin >>> >>> On 11/06/2012 04:10 PM, Kevin Schiesser wrote: >>>> Thanks for the advice Mike. I have tried changing the fsc/ssc calls >>>> around as you suggested, and get the same error. On the bright >>>> side, I was able to use spillover() successfully with the sample >>>> data in flowCore/extdata/compdata/data. I reckon my flowSet needs >>>> some cleaning up yet. -k >>>> >>>> On 11/06/2012 04:06 PM, Mike wrote: >>>>> Hi,Kevin, >>>>> >>>>> Your spillover call should go like this: >>>>> spill.mat<- spillover(comp.data,..., fsc="FSC-A", ssc="SSC-A") >>>>> >>>>> Regarding to importing flowJo xml to R,you can try "flowWorkspace" package. Hope this helps. >>>>> >>>>> >>>>> Mike Jiang,PhD >>>>> >>>>> System Analyst >>>>> >>>>> PS Statistics, Vaccine and Infectious Disease Division >>>>> >>>>> Fred Hutchinson Cancer Research Center >>>>> >>>>> (206)667-1905 <tel:%28206%29667-1905> >>>>> >>>>> >>>>> On 11/06/2012 03:06 PM, Kevin Schiesser [guest] wrote: >>>>>> Hello there, >>>>>> I am using Bioconductor to look at flow cytometry data. To begin, I would like to generate and apply a compensation matrix to the experimental samples. Below is the work flow, as well as more general information on the flowSet and the R version that I use. Any recommendations would be splendid. I am thinking I might have to figure on how to import FlowJo 10 xml files into bionconductor, a step that I prefer to avoid. >>>>>> >>>>>> Much thanks, >>>>>> Kevin >>>>>> >>>>>> PS I have tried many permutations of the spillover() method including patt=..., useNormFilt=TRUE/FALSE, changing the unstained = index around, etc... And also, I cannot seem to get system.file("compC", package="flowCore") to return a non-empty value, maybe that would make compensation easier. Just a thought. -k >>>>>> >>>>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>>>>> >>>>>> ##import the flowSet >>>>>> >>>>>> library(flowCore) >>>>>> >>>>>> compData<- read.flowSet(path = ".../compC/", transformation = FALSE) >>>>>> >>>>>> ##trim the time column off (I know there are faster ways, but to be very explicit...) >>>>>> >>>>>> comp.data<- compData[c(1,2,3,4,5,6,7,8,9,10,11,12),c("FSC-A", "SSC-A", "FITC-A", "PerCP-A", "Pacific Blue-A", "AARD-A", "QDot605-A", "APC-A", "Alexa700-A", "APC-Cy7-A", "PE-A", "ECD-A", "PE-Cy7-A")] >>>>>> >>>>>> ##generate compensation matrix >>>>>> >>>>>> spill.mat<- spillover(comp.data,unstained = sampleNames(compData)[12], fsc=compData[,1], ssc=compData[,2]) >>>>>> >>>>>>> traceback() >>>>>> 3: .local(x, ...) : subscript out of bounds >>>>>> 2: spillover(comp.data, unstained<- sampleNames(compData)[12], fsc = compData[,1], ssc = compData[, 2]) >>>>>> 1: spillover(comp.data, unstained<- sampleNames(compData)[12], fsc = compData[,1], ssc = compData[, 2]) >>>>>> >>>>>>> compData[[12]] >>>>>> flowFrame object 'Compensation Controls_Unstained Control.fcs' >>>>>> with 10000 cells and 14 observables: >>>>>> name desc range minRange maxRange >>>>>> $P1 FSC-A NA 262144 0.00 262143 >>>>>> $P2 SSC-A NA 262144 0.00 262143 >>>>>> $P3 FITC-A NA 262144 -106.22 262143 >>>>>> $P4 PerCP-A NA 262144 -111.00 262143 >>>>>> $P5 Pacific Blue-A NA 262144 -111.00 262143 >>>>>> $P6 AARD-A NA 262144 -111.00 262143 >>>>>> $P7 QDot605-A NA 262144 -111.00 262143 >>>>>> $P8 APC-A NA 262144 -29.05 262143 >>>>>> $P9 Alexa700-A NA 262144 -82.17 262143 >>>>>> $P10 APC-Cy7-A NA 262144 -111.00 262143 >>>>>> $P11 PE-A NA 262144 -87.69 262143 >>>>>> $P12 ECD-A NA 262144 -63.27 262143 >>>>>> $P13 PE-Cy7-A NA 262144 -25.53 262143 >>>>>> $P14 Time NA 262144 0.00 262143 >>>>>> 182 keywords are stored in the 'description' slot >>>>>> >>>>>> -- output of sessionInfo(): >>>>>> >>>>>>> sessionInfo() >>>>>> R version 2.15.1 (2012-06-22) >>>>>> Platform: x86_64-pc-linux-gnu (64-bit) >>>>>> >>>>>> locale: >>>>>> [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C >>>>>> [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 >>>>>> [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 >>>>>> [7] LC_PAPER=C LC_NAME=C >>>>>> [9] LC_ADDRESS=C LC_TELEPHONE=C >>>>>> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C >>>>>> >>>>>> attached base packages: >>>>>> [1] stats graphics grDevices utils datasets methods base >>>>>> >>>>>> other attached packages: >>>>>> [1] flowCore_1.24.0 rrcov_1.3-02 pcaPP_1.9-48 mvtnorm_0.9-9993 >>>>>> [5] robustbase_0.9-4 Biobase_2.18.0 BiocGenerics_0.4.0 >>>>>> >>>>>> loaded via a namespace (and not attached): >>>>>> [1] feature_1.2.8 graph_1.36.0 ks_1.8.10 MASS_7.3-22 stats4_2.15.1 >>>>>> [6] tools_2.15.1 >>>>>> >>>>>> -- >>>>>> Sent via the guest posting facility atbioconductor.org <http: bioconductor.org="">. >>>>> >>>> >>> >> > [[alternative HTML version deleted]]
ADD REPLY

Login before adding your answer.

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