I just started working with R and I struggled long on this problem, but I cannot figure out what is wrong, I hope someone can help me here. If I use the ss_exp file form CATALYST package I have no problems doing this, when I want to use my own file of single stained beads I keep getting this problem. So I'm sure it is in my file, but I can't figure it out.
For the CATALYST file I do the following: library(CATALYST) library(flowCore) data("ssexp") summary(ssexp) bcms <- c(141:156, 158:176) re <- assignPrelim(x=ssexp, y=bcms) re <- estCutoffs(x=re) re <- applyCutoffs(x=re) spillMat <- computeSpillmat(x=re) plotSpillmat(bcms, SM=spillMat, plotly=FALSE)
When I use my own compenstation file I encounter an error at: re <- assignPrelim(x=ss_beads, y=bc_ms) ssbeads <- read.FCS("\Comp.beads.FCS", open="rb", column.pattern = "Di") bcms <- c(141:156, 158:176) re <- assignPrelim(x=ssbeads, y=bcms) Error in vapply(bc_ms, function(x) which(ms == x), numeric(1)) : values must be length 1, but FUN(X[]) result is length 2
I noticed that the ssbeads@parameters@data[["name"]] is a character where as for the ssexp@parameters@data[["name"]] it is a factor. I tried to change it to a factor, but this didn't seem to help. ssbeads@parameters@data[["name"]] <- as.factor(ssbeads@parameters@data[["name"]])
Hope anyone can help me here, let me know if you need more info.