Question with manipulating OD gene list when running PCA
2
0
Entering edit mode
16 months ago
K • 0

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!

Pagoda2 PCA RNA-seq Seurat • 671 views
ADD COMMENT
0
Entering edit mode
16 months ago
bk11 ★ 3.0k

You have said that you are using Seurat V5. But, why you did not use integration approach described in V5:-

https://satijalab.org/seurat/articles/seurat5_integration?

ADD COMMENT
0
Entering edit mode
16 months ago
K • 0

Hi! Good point- I was working off some existing code from coworkers and did not know of this approach. I will try it out.

My question is more of if it is possible to transfer the variable features used for Seurat integration to Pagoda's PCA function, as I'd like to use Pagoda for clustering.

ADD COMMENT

Login before adding your answer.

Traffic: 2065 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