Hi, I want to use the plotExprHeatmap function to draw heat maps according to groups，as shown in the figure,
but I can't achieve it.
plotExprHeatmap(sce, features = "type", by = "cluster_id", k = "meta30", row_clust = F, bars = TRUE, perc = TRUE)
This method can only draw heat maps of all groups.
I try to extract sce with subset, but it will reduce the number of antibodies, which is obviously unscientific
sce1 <- subset(sce,levels(sce@colData$group)=="WT")
In addition, I have tried the following methods：
colData1 <- sce@colData[which(sce@colData$group=="WT"),] colData<- sce@colData sce1 <- sce sce1@colData <- colData1 sce1@assays@data$counts <-sce1@assays@data$counts[,164769] sce1@assays@data$exprs <-sce1@assays@data$exprs[,164769]
But an error occurred：
> plotExprHeatmap(sce1, features = "type", + by = "cluster_id", k = "meta30", + row_clust = F, + bars = TRUE, perc = TRUE) Error in validObject(result) : invalid class “SingleCellExperiment” object: 'x@assays' is not parallel to 'x'
Is there any way to achieve my goal? Thank you!