SingleR-inc / SingleR

Clone of the Bioconductor repository for the SingleR package.
https://bioconductor.org/packages/devel/bioc/html/SingleR.html
GNU General Public License v3.0
173 stars 19 forks source link

Error: subscript contains invalid names #179

Closed smk5g5 closed 3 years ago

smk5g5 commented 3 years ago

I am trying to run multiple references with SingleR and I am getting the following error

shared <- Reduce(intersect, list(rownames(novershtern2),rownames(neftel_sce10x2),rownames(neftel_sce2_ss2))) combined <- cbind(novershtern2[shared,], neftel_sce10x2[shared,],neftel_sce2_ss2[shared,])

Error: subscript contains invalid names In addition: Warning message: In methods:::.selectDotsMethod(classes, .MTable, .AllMTable) : Any idea what may be going wrong colData has only one variable in the above code CellAssignment

`novershtern2@colData <- novershtern2@colData[c('CellAssignment')]

novershtern2$CellAssignment <- paste0('Noversh.',novershtern2$CellAssignment)

neftel_sce10x2 <- neftel_sce10x

neftel_sce10x2@colData <- neftel_sce10x2@colData[c('CellAssignment')]

neftel_sce10x2$CellAssignment <- paste0('Neftel_10x',neftel_sce10x2$CellAssignment)`

Still I am getting this error. Any pointers will be appreciated. Thanks!

LTLA commented 3 years ago

Is there actually a SingleR problem here? I don't see any reference to SingleR functions.

smk5g5 commented 3 years ago

These are all single cell experiment objects. I am trying to follow examples in the book https://bioconductor.org/books/3.12/SingleRBook/using-multiple-references.html but I am getting error at the combined <- cbind(novershtern2[shared,], neftel_sce10x2[shared,],neftel_sce2_ss2[shared,]) step.

LTLA commented 3 years ago

This is not a SingleR problem. Your error is not occurring at any SingleR functions. You should instead figure out why your cbind isn't working, given that's really where the problem is.

Consider making a minimum reproducible example so that I don't have to try to guess what the issue is. And post your session information.

j-andrews7 commented 3 years ago

Closing due to no info/response. Feel free to re-open with more info.