seurat-object
seurat-object copied to clipboard
Weird issue with doing operations when ncells = nfeatures
Doing operations on layers with same number of features and cells results in missing feature overlap issue (seuratv5 branch):
set.seed(seed = 1)
dummyexpMat <- matrix(
data = sample(x = c(1:50), size = 1e4, replace = TRUE),
ncol = 100, nrow = 100
)
colnames(x = dummyexpMat) <- paste0("cell", seq(ncol(x = dummyexpMat)))
row.names(x = dummyexpMat) <- paste0("gene", seq(nrow(x = dummyexpMat)))
# Create Seurat object for testing
obj <- CreateSeuratObject(counts = as.sparse(dummyexpMat))
obj <- NormalizeData(object = obj, verbose = FALSE)
obj <- ScaleData(object = obj, verbose = FALSE)
Warning: No layers found matching search pattern provided
Error: No feature overlap between existing object and new layer data