Question: Error after assignPrelim(), CyTOF compenstation
0
gravatar for j.krop
10 months ago by
j.krop0
j.krop0 wrote:

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[[2]]) 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.

Best, Juliette

ADD COMMENTlink written 10 months ago by j.krop0

Hi Juliette, At first glance, the error indicates that there are multiple channels that match the same mass. My guess is that there are 2 channels that contain the same numeric value, e.g. Er168Di and Tm168Di or similar. This causes assignPrelim() to fail as the channel masses cannot be matched uniquely. Could you check your colnames(ssbeads)?

ADD REPLYlink written 10 months ago by crowellh0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 311 users visited in the last hour