PCA plot did not work in single cell RNA-seq I run plotPCA for single cell RNA-seq data, while I get error message (I use R 4.0). I attached the code and error message here. Did anyone know the reason and how to deal with it. Thanks!

library(pcaMethods)
library(SC3)
library(scater)
library(SingleCellExperiment)
library(pheatmap)
library(mclust)
set.seed(1234567)
deng &lt;- readRDS("deng-reads.rds")
plotPCA(deng, colour_by = "cell_type2")


Error in value[[3L]](cond) : invalid subscript 'type' in 'reducedDimNames(&lt;SingleCellExperiment&gt;)'
'PCA' not in 'reducedDimNames(&lt;SingleCellExperiment&gt;)'


I also get error message when I run the code as below: 

colData(deng)$tSNE_kmeans &lt;- as.character(kmeans(deng@reducedDims$TSNE, centers = 8)$clust)


# Error in array(x, c(length(x), 1L), if (!is.null(names(x))) list(names(x), : 'data' must be of a vector type, was 'NULL'
The error is pretty obvious. There is no PCA data in the respective slot of the SingleCellExperiment that plotPCA could use, at least it is not called PCA which by default is expected. Use runPCA first, please read the manuals of scater and scran first, they have step-by-step code.