Closed micdonato closed 3 years ago
As stated in the integration vignette, you should not run ScaleData after integration when using SCTransform-normalized data. I'm not sure if that is the cause of this issue, but can you try without running ScaleData?
I followed this tutorial but I see that the vignette does not have the scaling step.
I checked scaled data and non scaled data of the integrated
object and they are exactly the same, with the exception that the scaled one is capped at 10 for all objects.
I will retry the integration without scaling and see what happens (it will take a day or so to get it done).
Thanks for your help!
I wanted to give an update on this. It was the scaling on the data, most likely. Once I removed that from the script, the clusters were assigned properly.
We have another issue with the clusters but that is for another thread. This can be closed and labeled as solved.
Hi,
I wanted to reopen this issue since I'm having the same problem but my data is not integrated, so the solution offered here doesn't work for me.
I'm working with the public GSE181919 dataset downloaded from GEO they offer an UMI_count file and a metadata file which I'm loading in the following way:
matrix_obj <- read.table("GSE181919_UMI_counts.txt", header = T, sep = "", dec = ".")
mat <- Matrix(as.matrix(matrix_obj),sparse=TRUE)
seurat_mtx <- CreateSeuratObject(counts = mat)
metadata <- read.table("GSE181919_Barcode_metadata.txt", header = T, sep = "", dec = ".")
seurat_mtx@meta.data <- metadata
Then I'm trying to run the normal processing workflow:
seurat_mtx <- NormalizeData(seurat_mtx, normalization.method = "LogNormalize", scale.factor = 10000)
seurat_mtx <- FindVariableFeatures(seurat_mtx, selection.method = "vst", nfeatures = 2000)
# Run the standard workflow for visualization and clustering
seurat_mtx <- ScaleData(seurat_mtx, verbose = FALSE)
seurat_mtx <- RunPCA(seurat_mtx, features = VariableFeatures(object = seurat_mtx))
# t-SNE and Clustering
seurat_mtx <- RunUMAP(seurat_mtx, reduction = "pca", dims = 1:20)
seurat_mtx <- FindNeighbors(seurat_mtx, reduction = "pca", dims = 1:20)
seurat_mtx <- FindClusters(seurat_mtx, resolution = 0.5)
seurat_mtx@meta.data$RNA_snn_res.0.5 %>% unique
Which works fine but then the output of FindClusters is:
seurat_mtx@meta.data$RNA_snn_res.0.5 %>% unique
[1] <NA>
Levels: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
I can't figure out what is going wrong since each step seems to work so it would be really nice if you could help me!
Hi all,
I am integrating three datasets and after integration I want to find cell clusters. However, after I do that, all my
integrated_snn_res.*
memberships are allThis is the code I am using:
After that, this is what I get:
(same for all the resolutions)
All the
FindClusters
steps finish without an error, and they report the right number of clusters. The only message is that some singletons were found (usually two or three).We do not have this issue with single datasets.
The SessionInfo is the following:
Am I doing something wrong? Everything seems to finish without errors. It takes
some time
but it gets to the end.Small edit: this is the output of
FindClusters
:and the updated output (it found 39 clusters instead of 43):