FindAllMarkers not working (Error (data layers are not joined. Please run JoinLayersWarning: When testing 1 versus all)
0
0
Entering edit mode
4 weeks 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
FindAllMarkers seurat re-clustering • 595 views
ADD COMMENT
0
Entering edit mode

You should run JoinLayers() before FindAllMarkers()!!

ADD REPLY
0
Entering edit mode

I tried that too. It did not work.

ADD REPLY
0
Entering edit mode

I did run the JoinLayers() even then it is not working, here is the output before and after

DefaultAssay(combined1) <- 'RNA'

combined1

#####
An object of class Seurat 
50788 features across 48215 samples within 3 assays 
Active assay: RNA (24468 features, 2000 variable features)
 25 layers present: data.1, data.2, data.3, data.4, data.5, data.6, data.7, data.8, counts.1, scale.data.1, counts.2, scale.data.2, counts.3, scale.data.3, counts.4, scale.data.4, counts.5, scale.data.5, counts.6, scale.data.6, counts.7, scale.data.7, counts.8, scale.data.8, scale.data
 2 other assays present: SCT, integrated
 2 dimensional reductions calculated: pca, umap
#####

JoinLayers(alldata)

#######
An object of class Seurat 
50788 features across 48215 samples within 3 assays 
Active assay: RNA (24468 features, 2000 variable features)
 11 layers present: data, counts, scale.data.1, scale.data.2, scale.data.3, scale.data.4, scale.data.5, scale.data.6, scale.data.7, scale.data.8, scale.data
 2 other assays present: SCT, integrated
 2 dimensional reductions calculated: pca, umap
#######
ADD REPLY

Login before adding your answer.

Traffic: 1777 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6