Hello,
I am using Seurat 4.9.9.905 and Pagoda2 1.0.10 to do sc clustering on an integrated object. I integrated two merged sample sets with var features and normalization applied to each of the two merged objects. I would like to do the clustering in Pagoda. This is my integration script:
object_list <- c(SeuratObj1, SeuratObj2)
features <- SelectIntegrationFeatures(object.list = object_list, nfeatures = 5000)
object.anchors <- FindIntegrationAnchors(object.list = object_list, anchor.features = features)
IntegratedObj <- IntegrateData(anchorset = object.anchors)
DefaultAssay(IntegratedObj) <- "integrated"
'features' is now a list of the top variable features from the combined objects containing 3882 genes.
I then make a Pagoda2 object
countMatrix <- GetAssayData(object = IntegratedObj , slot = "data")
IntegratedObj2 <- Pagoda2$new(x = countMatrix, n.cores = 6, trim=10)
The issue now is that I cannot run a PCA using the features I already deemed variable. Pagoda wants $adjustVariance ran first, which I do with
IntegratedObj2$adjustVariance(plot = T, gam.k = 10)
But it re-finds variable genes and reduces the odgene number to 670, which I do not want.
I tried running a PCA anyways by inserting the features list using
IntegratedObj2$calculatePcaReduction(nPcs = 50, use.odgenes = FALSE, odgenes = features)
and it does start to run, but I receive the following error:
Error in irlba(x, nv = nPcs, nu = 0, center = cm, right_only = FALSE, : BLAS/LAPACK routine 'DLASCL' gave error code -4
It is worth noting the the matrix in the Pagoda object is the integrated 3882 gene matrix.
I am finding online that this error can refer to NA values in the matrix, but I am unsure on how to proceed. Is there a better way to go about this? Or a way to solve the error?
Thanks!