Entering edit mode
9 months ago
Nitin
•
0
Looking for some suggestion
I have an integrated object. I removed 4 clusters and want to re-cluster . Below are the steps I ran, however, I am getting error while trying to run the FindAllMarkers
DefaultAssay(Integrated_object) <- "RNA"
cells_to_remove <- WhichCells(Integrated_object, idents = c("CLUSTER_6", "CLUSTER_9", "CLUSTER_10", "CLUSTER_11"))
##############
Integrated_object_Subset <- subset(Integrated_object, cells = setdiff(Cells(Integrated_object), cells_to_remove))
Integrated_object_Subset_list <- SplitObject(Integrated_object_Subset, split.by = "Sample")
Integrated_object_Subset_list <- lapply(X = Integrated_object_Subset_list, FUN = function(x) {
x <- NormalizeData(x)
x <- FindVariableFeatures(x, selection.method = "vst", nfeatures = 2000)
})
features <- SelectIntegrationFeatures(object.list =Integrated_object_Subset_list)
anchors <- FindIntegrationAnchors(object.list =Integrated_object_Subset_list, anchor.features = features)
#########
combined1 <- IntegrateData(anchorset = anchors)
DefaultAssay(tcell_combined1) <- "integrated"
combined1 <- ScaleData(combined1, verbose = FALSE)
combined1 <- RunPCA(combined1, npcs = 30, verbose = FALSE)
combined1 <- RunUMAP(combined1, reduction = "pca", dims = 1:10)
combined1 <- FindNeighbors(combined1, reduction = "pca", dims = 1:10)
combined1 <- FindClusters(combined1, resolution = c(0.2, 0.3,0.4,0.5, 0.7))
########
sel.clust = "integrated_snn_res.0.3"
combined1 <- SetIdent(combined1 , value = sel.clust)
table(combined1 @active.ident)
###### DE #####
#Compute differentiall expression
markers_genes <- FindAllMarkers(
combined1 ,
log2FC.threshold = 0.2,
test.use = "wilcox",
min.pct = 0.1,
min.diff.pct = 0.2,
only.pos = TRUE,
max.cells.per.ident = 50,
assay = "RNA"
)
OUTPUT
Calculating cluster 0
Calculating cluster 1
Calculating cluster 2
Calculating cluster 3
Calculating cluster 4
Calculating cluster 5
Calculating cluster 6
Calculating cluster 7
Warning: No DE genes identifiedWarning: The following tests were not performed: Warning: When testing 0 versus all:
data layers are not joined. Please run JoinLayersWarning: When testing 1 versus all:
data layers are not joined. Please run JoinLayersWarning: When testing 2 versus all:
data layers are not joined. Please run JoinLayersWarning: When testing 3 versus all:
data layers are not joined. Please run JoinLayersWarning: When testing 4 versus all:
data layers are not joined. Please run JoinLayersWarning: When testing 5 versus all:
data layers are not joined. Please run JoinLayersWarning: When testing 6 versus all:
data layers are not joined. Please run JoinLayersWarning: When testing 7 versus all:
data layers are not joined. Please run JoinLayers
You should run
JoinLayers()
beforeFindAllMarkers()
!!I tried that too. It did not work.
I did run the
JoinLayers()
even then it is not working, here is the output before and after