You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have scRNAseq from a tumor cell line +/- drug treatment (sample 1 = no drug, sample 2 = drug treated). I'm trying to answer a number of questions including 1) what are transcriptional hallmarks of cells that can tolerate drug x and 2) are similar cells present prior to drug treatment (i.e. states that exist de novo in the untreated sample that can adapt/persist post drug).
To do the analysis, I'm using the following approach (code listed below):
SCTransform each sample individually
Merge Seurat objects
Run Harmony for integration
a. I've confirmed that clustering cells from said samples without Harmony results in very distant clusters without overlap (confirming the need for integration)
Cluster & identify DE marker genes (two comparisons)
a. Comparison 1: Sample 1 vs. Sample 2 cells
b. Comparison 2: Seurat transcriptional clusters vs. all other clusters
i. Please note: all transcriptional clusters when combining samples 1 & 2 are admixtures of cells from sample 1 and sample 2
However, I'm running into two recurring problems:
When running PrepSCTFindMarkers() on my combined, harmonized Seurat object, I get an error stating: "Minimum UMI unchanged. Skipping re-correction."
When attempting to run FindAllMarkers() on my combined, harmonized Seurat object, I get the following error: "Warning: When testing 0 versus all: Object contains multiple models with unequal library sizes. Run PrepSCTFindMarkers() before running FindMarkers()."
a. This error is displayed for all 15 transcriptional clusters in the combined Seurat object.
When inspecting my combined Seurat object, I see there are two SCTModel.list entries with slightly different dimensions
1. "counts": 26205 x 12 (feature attributes)
2. "counts1": 26046 x 12 (feature attributes)
The SCT counts & data slots do have the same dimensions (as expected following the seurat object merge with merge.data = T).
I assume that both errors stem from the mismatch between the SCTModel.list entries?
What is the best way to remedy this?
As a side note, the only way that FindAllMarkers() runs on my combined Seurat object is if the SCTModel.list is cleared (i.e. assigned an empty list)....
I'm happy to share my Seurat object if it would help with troubleshooting. Thanks in advance!
#Returns error: Warning: When testing 0 versus all:
#Object contains multiple models with unequal library sizes. Run PrepSCTFindMarkers() before running FindMarkers().
#Error propagated for all 15 transcriptional clusters
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have scRNAseq from a tumor cell line +/- drug treatment (sample 1 = no drug, sample 2 = drug treated). I'm trying to answer a number of questions including 1) what are transcriptional hallmarks of cells that can tolerate drug x and 2) are similar cells present prior to drug treatment (i.e. states that exist de novo in the untreated sample that can adapt/persist post drug).
To do the analysis, I'm using the following approach (code listed below):
a. I've confirmed that clustering cells from said samples without Harmony results in very distant clusters without overlap (confirming the need for integration)
a. Comparison 1: Sample 1 vs. Sample 2 cells
b. Comparison 2: Seurat transcriptional clusters vs. all other clusters
i. Please note: all transcriptional clusters when combining samples 1 & 2 are admixtures of cells from sample 1 and sample 2
However, I'm running into two recurring problems:
When running PrepSCTFindMarkers() on my combined, harmonized Seurat object, I get an error stating: "Minimum UMI unchanged. Skipping re-correction."
When attempting to run FindAllMarkers() on my combined, harmonized Seurat object, I get the following error: "Warning: When testing 0 versus all: Object contains multiple models with unequal library sizes. Run
PrepSCTFindMarkers()
before runningFindMarkers()
."a. This error is displayed for all 15 transcriptional clusters in the combined Seurat object.
When inspecting my combined Seurat object, I see there are two SCTModel.list entries with slightly different dimensions
1. "counts": 26205 x 12 (feature attributes)
2. "counts1": 26046 x 12 (feature attributes)
The SCT counts & data slots do have the same dimensions (as expected following the seurat object merge with merge.data = T).
I assume that both errors stem from the mismatch between the SCTModel.list entries?
What is the best way to remedy this?
As a side note, the only way that FindAllMarkers() runs on my combined Seurat object is if the SCTModel.list is cleared (i.e. assigned an empty list)....
I'm happy to share my Seurat object if it would help with troubleshooting. Thanks in advance!
Code
#Run scTransform, regressing out percent mitochondrial reads
sample_1 <- SCTransform(sample_1, vars.to.regress = "percent.mt", verbose = FALSE)
#Run scTransform, regressing out percent mitochondrial reads
sample_2 <- SCTransform(sample_2, vars.to.regress = "percent.mt", verbose = FALSE)
#Merge two Seurat objects
samples_combined <- merge(x = sample_1, y = sample_2, add.cell.ids = c("s1", "s2"), merge.data = TRUE)
samples_combined
#Set SCT transformed/normalized values as VariableFeatures, required for PCA
VariableFeatures(samples_combined[["SCT"]]) <- rownames(samples_combined[["SCT"]]@scale.data)
#Run PCA on combined object
samples_combined <- RunPCA(samples_combined, verbose = FALSE)
#Run Harmony to integrate DMSO and Osi treated conditions
samples_combined <- RunHarmony(samples_combined, "orig.ident")
#Plot harmony plot to check integration
harmony_check_p <- DimPlot(object = samples_combined, reduction = "harmony", pt.size = .1, group.by = "orig.ident")
harmony_check_p
#Run UMAP, Find Neighbors, and Find Clusters using harmonized Seurat object (clusters Sample 1 & 2 cells together)
samples_combined <- samples_combined %>%
RunUMAP(reduction = "harmony", dims = 1:30) %>%
FindNeighbors(reduction = "harmony", dims = 1:30) %>%
FindClusters()
###Find DE marker gene analysis comparing all cells from Sample 1 vs Sample 2
samples_combined <- PrepSCTFindMarkers(samples_combined) #returns error: Minimum UMI unchanged. Skipping re-correction
samples_combined_de <- FindMarkers(samples_combined, assay = "SCT",
recorrect_umi = FALSE,
ident.1 = "s1",
ident.2 = "s2",
verbose = FALSE)
###Identify DE marker genes across Seurat clusters (admixtures of sample 1 and sample 2 cells)
samples_combined <- PrepSCTFindMarkers(samples_combined, assay = "SCT", verbose = TRUE) #again returns error: Minimum UMI unchanged. Skipping re-correction
#Set active identity to seurat transcriptional clusters for comparison
Idents(samples_combined) <- "seurat_clusters"
#Run find markers
cluster_markers <- FindAllMarkers(samples_combined, assay = "SCT")
#Returns error: Warning: When testing 0 versus all:
#Object contains multiple models with unequal library sizes. Run
PrepSCTFindMarkers()
before runningFindMarkers()
.#Error propagated for all 15 transcriptional clusters
Beta Was this translation helpful? Give feedback.
All reactions