Open reyesj opened 5 years ago
Hi,
I'm running SingleR on a 10X experiment processed with Seurat 3.0 and I may have identified a bug. I created a counts matrix:
SingleR
Seurat 3.0
counts.table <- GetAssayData(object = bm.sctransform, slot = "counts"))
counts.table <- GetAssayData(object = bm.sctransform, slot = "counts")
and the corresponding annotation:
annot.table <- bm.sctransform@meta.data
I receive the following error when using CreateSinglerObject or 'CreateSinglerSeuratObject`:
CreateSinglerObject
CreateSinglerSeuratObject(counts.table, annot=annot.table project.name='BM_HET-HET', min.genes = 500, technology = "10X", species = "Mouse", citation='',numCores = 4)
Error in names(orig.ident) <- colnames(counts) : 'names' attribute must be the same length as the vector
This issue is solved when I designate annot as a path rather than a matrix:
annot
matrix
CreateSinglerSeuratObject(counts.table, annot='190603_bm_het-het_metaData.txt', project.name='BM_HET-HET', min.genes = 500, technology = "10X", species = "Mouse", citation='',numCores = 4)
I noticed the ReadSingleCellData function in SingleR may be reading names as column names leading to different length vectors.
ReadSingleCellData
As of now, the annot field only takes a vector. Use bm.sctransform@meta.data$orig.ident and it should work...
bm.sctransform@meta.data$orig.ident
Best, Dvir
Hi,
I'm running
SingleR
on a 10X experiment processed withSeurat 3.0
and I may have identified a bug. I created a counts matrix:counts.table <- GetAssayData(object = bm.sctransform, slot = "counts")
)and the corresponding annotation:
annot.table <- bm.sctransform@meta.data
I receive the following error when using
CreateSinglerObject
or 'CreateSinglerSeuratObject`:CreateSinglerSeuratObject(counts.table, annot=annot.table project.name='BM_HET-HET', min.genes = 500, technology = "10X", species = "Mouse", citation='',numCores = 4)
Error in names(orig.ident) <- colnames(counts) : 'names' attribute must be the same length as the vector
This issue is solved when I designate
annot
as a path rather than amatrix
:CreateSinglerSeuratObject(counts.table, annot='190603_bm_het-het_metaData.txt', project.name='BM_HET-HET', min.genes = 500, technology = "10X", species = "Mouse", citation='',numCores = 4)
I noticed the
ReadSingleCellData
function inSingleR
may be reading names as column names leading to different length vectors.