es <- as.matrix(Seurat@assays$RNA@counts)
meta <- [email protected]
sc <- construct(exprmatrix=as.data.frame(es),
cellidentity=factor(meta$SCT_snn_res.0.3, levels=c('1','2','3','4','5','6',
'7','8','9','10','11')),projname='Seurat')
data(mm_kappasim)
sc <- getEntropy(sc, km=km, # use the pre-computed kappa similarity matrix of mouse genes
calculation="bootstrap", # choose the bootstrap calculation
B.num=100, # 100 iterations
exp.cutoff=1, # the threshold for expressed genes
B.size=1000, # the size of bootstrap sample
clustering.k=floor(sqrt(1000/2)), # the number of functional clusters
random.seed=201602) # set the random seed to reproduce the results in the paper
plotEntropies(sc)
# perform PCA using the expression of predicted signature genes and with a high variance (greater than 8 variance in log2 FPKM)
# The predicted signature genes are stored in FB.sig in FB.rda in the data folder
Seurat <- SCTransform(Seurat,variable.features.n = 3000)
gene <- VariableFeatures(Seurat)
sc <- getRDS(sc, genes.use = gene,
method="pca",
num_dim=2, log.base=2,
do.center=TRUE, do.scale=FALSE,
use.cor=TRUE,
min.var=8, min.cells=0)
Performing dimension reduction
Error in reduceExpressionSpace(object@data[which(object@genenames %in% :
Insufficent genes for dimension reduction.
I try FB.sig or 1000 VariableFeatures, it gets the same error.
Thanks.