Hello - I am using flowType 2.6.0 to analyze some flow cytometry data I have calculated the threshold for +/-, and when I input the flowType command, it return thresholds different than what I input. I spoke with the author and she told me that the default threshold was kmeans. I added the line Methods='thresholds', and the thresholds were -Inf. I sent the code to the author, and she ran it using flowType 2.4.0, and it worked as expected. I do not know if I am making a mistake, or if I need to find the older version of flowType. As I am sure you can tell, I am a total novice. The following is the code, along with sessionInfo() and traceback(). Thank you so much to anyone who can help. Pat Simms
> ftall<-flowType(Frame=CD3CD4CD34,PropMarkers=c(4,5,6,7,8,9,12),Thresholds=c(1.709,2.257,3.4,2.049,2.065,2.609,1.8232),MarkerNames=colnames(CD3CD4CD34))
> ftall@Thresholds
[[1]]
[1] 1.477519
[[2]]
[1] 1.930886
[[3]]
[1] 2.484436
[[4]]
[1] 1.209307
[[5]]
[1] 1.756949
[[6]]
[1] 1.850917
[[7]]
[1] 0.9469724
> ftall<-flowType(Frame=CD3CD4CD34,PropMarkers=c(4,5,6,7,8,9,12),Methods='thresholds',Thresholds=c(1.709,2.257,3.4,2.049,2.065,2.609,1.8232),MarkerNames=colnames(CD3CD4CD34))
Warning messages:
1: In max(ThisExpr[which(ThisPart == PartLabels[x]), ThisChan]) :
no non-missing arguments to max; returning -Inf
2: In max(ThisExpr[which(ThisPart == PartLabels[x]), ThisChan]) :
no non-missing arguments to max; returning -Inf
3: In max(ThisExpr[which(ThisPart == PartLabels[x]), ThisChan]) :
no non-missing arguments to max; returning -Inf
4: In max(ThisExpr[which(ThisPart == PartLabels[x]), ThisChan]) :
no non-missing arguments to max; returning -Inf
5: In max(ThisExpr[which(ThisPart == PartLabels[x]), ThisChan]) :
no non-missing arguments to max; returning -Inf
6: In max(ThisExpr[which(ThisPart == PartLabels[x]), ThisChan]) :
no non-missing arguments to max; returning -Inf
7: In max(ThisExpr[which(ThisPart == PartLabels[x]), ThisChan]) :
no non-missing arguments to max; returning -Inf
> sessionInfo()
R version 3.2.0 (2015-04-16)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C LC_TIME=English_United States.1252
attached base packages:
[1] tools parallel stats graphics grDevices utils datasets methods base
other attached packages:
[1] flowQ_1.28.0 latticeExtra_0.6-26 RColorBrewer_1.1-2 parody_1.26.0 bioDist_1.40.0 KernSmooth_2.23-14
[7] Biobase_2.28.0 mvoutlier_2.0.6 sgeostat_1.0-25 outliers_0.14 BiocGenerics_0.14.0 flowViz_1.32.0
[13] lattice_0.20-31 GEOmap_2.3-5 sfsmisc_1.0-27 ROCR_1.0-7 gplots_2.17.0 RchyOptimyx_2.8.0
[19] flowType_2.6.0 BH_1.55.0-3 Rcpp_0.11.6 flowDensity_1.2.0 flowCore_1.34.1 BiocInstaller_1.18.2
loaded via a namespace (and not attached):
Error in x[["Version"]] : subscript out of bounds
In addition: Warning message:
In FUN(X[[i]], ...) :
DESCRIPTION file of package 'rrcov' is missing or broken
> traceback()
8: FUN(X[[i]], ...)
7: lapply(X = X, FUN = FUN, ...)
6: sapply(L[[n]], function(x) x[["Version"]])
5: mkLabel(x, "loadedOnly")
4: print(mkLabel(x, "loadedOnly"), quote = FALSE, ...)
3: print.sessionInfo(x)
2: print(x)
1: print(x)
>
all of the code
> source("http://bioconductor.org/biocLite.R")
> biocLite()
> biocLite("flowCore")
> biocLite("flowType")
> biocLite("RchyOptimyx")
> biocLite("flowQ")
> install.packages("ROCR")
> install.packages("GEOmap")
> install.packages("car")
> install.packages("RFOC")
> install.packages("flowQ")
> biocLite("flowDensity")
> library(flowCore)
> library(flowDensity)
> library(flowType)
> library(RchyOptimyx)
> library(ROCR)
> library(sfsmisc)
> library(GEOmap)
> library(flowViz)
> library(flowQ)
> biocLite('flowMerge')
> setwd("C://Tim Data")
> F<-read.FCS("data for analysis/1406MUT MIC 18 HR_HEPG2 NS3.fcs")
> M<-F@description$'SPILL'
> F.comp<-compensate(F,M)
> margin.cells<-which(exprs(F.comp) [,"FSC-A"]>250000)
> A<-exprs(F.comp)[,c("FSC-A","SSC-A")]
> F.clear.margin<-F.comp[-margin.cells]
> lgcl<-logicleTransform()
> lgcl<-estimateLogicle(F.clear.margin, colnames(F)[3:13])
> f.trans<-transform(F.clear.margin,lgcl)
> fsc.indices<-intersect(which(exprs(f.trans)[,"FSC-A"]<200000),which(exprs(f.trans)[,"FSC-A"]>50000))
> ssc.indices<-intersect(which(exprs(f.trans)[,"SSC-A"]<150000),which(exprs(f.trans)[,"SSC-A"]>25000))
> non.debris.indices<-intersect(fsc.indices,ssc.indices)
> f.clean<-f.trans[non.debris.indices]
> cd3posindices<-which(exprs(f.clean)[,11]>2.3)
> cd34posindices<-which(exprs(f.clean)[,10]>2)
> combined<-intersect(cd3posindices, cd34posindices)
> CD3CD34<-f.clean[combined]
> cd4.gate<-deGate(CD3CD34, 13)
> plotDens(CD3CD34,c(11,13))
> abline(h=cd4.gate, lwd=2, col="blue")
> deGate(CD3CD34, 13, graphs=TRUE)
[1] 2.534694
> cd4posindices<-which(exprs(CD3CD34)[,13]>2.522)
> CD3CD4CD34<-CD3CD34[cd4posindices]
> colnames(CD3CD4CD34)<-c("FSC-A","SSC-A","CD8","IL2","IFNg","CD107a","TNFa", "IL17A", "IL4","CD34","CD3", "IL22","CD4","Time")
> IL2.gate<-deGate(CD3CD34, 4)
> plotDens(CD3CD34,c(11,4))
Warning message:
In (function () : Only one RStudio graphics device is permitted
> abline(h=IL2.gate, lwd=2, col="blue")
> deGate(CD3CD34, 4, graphs=TRUE)
95%
1.665421
> #Determine IFNg gates
> IFNg.gate<-deGate(CD3CD34,5 )
> plotDens(CD3CD34, c(11,5))
Warning message:
In (function () : Only one RStudio graphics device is permitted
> abline(h=IFNg.gate, lwd=2, col="blue")
> deGate(CD3CD34, 5, graphs=TRUE)
95%
2.334084
> CD107a.gate<-deGate(CD3CD34,6)
> plotDens(CD3CD34, c(11,6))
Warning message:
In (function () : Only one RStudio graphics device is permitted
> abline(h=CD107a.gate, lwd=2, col="blue")
> deGate(CD3CD34, 6, graphs=TRUE)
95%
3.371237
> IL22.gate<-deGate(CD3CD34,12)
> plotDens(CD3CD34,c(11,12))
Warning message:
In (function () : Only one RStudio graphics device is permitted
> abline(h=IL22.gate, lwd=2, col="blue")
> deGate(CD3CD34, 12, graphs=TRUE)
95%
1.833483
> IL4.gate<-deGate(CD3CD34,9)
> plotDens(CD3CD34, c(11,9))
Warning message:
In (function () : Only one RStudio graphics device is permitted
> abline(h=IL4.gate, lwd=2,col="blue")
> deGate(CD3CD34, 9, graphs=TRUE)
95%
2.28484
> IL17A.gate<-deGate(CD3CD34,8)
> plotDens(CD3CD34,c(11,8))
Warning message:
In (function () : Only one RStudio graphics device is permitted
> abline(h=IL17A.gate, lwd=2,col="blue")
> deGate(CD3CD34, 8, graphs=TRUE)
[1] 2.136645
> TNFa.gate<-deGate(CD3CD34,7)
> plotDens(CD3CD34,c(11,7))
Warning message:
In (function () : Only one RStudio graphics device is permitted
> abline(h=TNFa.gate, lwd=2,col="blue")
> deGate(CD3CD34, 7, graphs=TRUE)
95%
1.455083
ftall<-flowType(Frame=CD3CD4CD34,PropMarkers=c(4,5,6,7,8,9,12),Thresholds=c(1.709,2.257,3.4,2.049,2.065,2.609,1.8232),MarkerNames=colnames(CD3CD4CD34))
> ftall@Thresholds
[[1]]
[1] 1.477519
[[2]]
[1] 1.930886
[[3]]
[1] 2.484436
[[4]]
[1] 1.209307
[[5]]
[1] 1.756949
[[6]]
[1] 1.850917
[[7]]
[1] 0.9469724
> ftall<-flowType(Frame=CD3CD4CD34,PropMarkers=c(4,5,6,7,8,9,12),Methods='thresholds',Thresholds=c(1.709,2.257,3.4,2.049,2.065,2.609,1.8232),MarkerNames=colnames(CD3CD4CD34))
Warning messages:
1: In max(ThisExpr[which(ThisPart == PartLabels[x]), ThisChan]) :
no non-missing arguments to max; returning -Inf
2: In max(ThisExpr[which(ThisPart == PartLabels[x]), ThisChan]) :
no non-missing arguments to max; returning -Inf
3: In max(ThisExpr[which(ThisPart == PartLabels[x]), ThisChan]) :
no non-missing arguments to max; returning -Inf
4: In max(ThisExpr[which(ThisPart == PartLabels[x]), ThisChan]) :
no non-missing arguments to max; returning -Inf
5: In max(ThisExpr[which(ThisPart == PartLabels[x]), ThisChan]) :
no non-missing arguments to max; returning -Inf
6: In max(ThisExpr[which(ThisPart == PartLabels[x]), ThisChan]) :
no non-missing arguments to max; returning -Inf
7: In max(ThisExpr[which(ThisPart == PartLabels[x]), ThisChan]) :
no non-missing arguments to max; returning -Inf
> sessionInfo()
R version 3.2.0 (2015-04-16)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C LC_TIME=English_United States.1252
attached base packages:
[1] tools parallel stats graphics grDevices utils datasets methods base
other attached packages:
[1] flowQ_1.28.0 latticeExtra_0.6-26 RColorBrewer_1.1-2 parody_1.26.0 bioDist_1.40.0 KernSmooth_2.23-14
[7] Biobase_2.28.0 mvoutlier_2.0.6 sgeostat_1.0-25 outliers_0.14 BiocGenerics_0.14.0 flowViz_1.32.0
[13] lattice_0.20-31 GEOmap_2.3-5 sfsmisc_1.0-27 ROCR_1.0-7 gplots_2.17.0 RchyOptimyx_2.8.0
[19] flowType_2.6.0 BH_1.55.0-3 Rcpp_0.11.6 flowDensity_1.2.0 flowCore_1.34.1 BiocInstaller_1.18.2
loaded via a namespace (and not attached):
Error in x[["Version"]] : subscript out of bounds
In addition: Warning message:
In FUN(X[[i]], ...) :
DESCRIPTION file of package 'rrcov' is missing or broken
> traceback()
8: FUN(X[[i]], ...)
7: lapply(X = X, FUN = FUN, ...)
6: sapply(L[[n]], function(x) x[["Version"]])
5: mkLabel(x, "loadedOnly")
4: print(mkLabel(x, "loadedOnly"), quote = FALSE, ...)
3: print.sessionInfo(x)
2: print(x)
1: print(x)
>