Weird outcomes from employing NMF on scRNA-seq data
1
0
Entering edit mode
11 weeks ago
tujuchuanli ▴ 130

Hello, I've attempted to apply NMF clustering to my scRNA-seq data, and I've encountered some unexpected results. Below is my code snippet:

EPCAM.cell = ScaleData(object = EPCAM.cell, do.scale = FALSE, do.center = FALSE)
nmf_data = EPCAM.cell@assays$RNA@scale.data
HVG = EPCAM.cell@assays$RNA@var.features
nmf_data = nmf_data[, HVG]
res_nndsvd = nmf(nmf_data, rank = 2:10,method = "snmf/r", seed = "nndsvd", nrun = 30)
plot(res_nndsvd)

Please note that EPCAM.cell is a Seurat object. Upon plotting, I observed the following:

enter image description here

The cophenetic and dispersion plots remained constant, exhibiting no variation across different rank values. Does this suggest an issue in my code? Thank you for your attention.

NMF scRNA-seq • 584 views
ADD COMMENT
1
Entering edit mode
10 weeks ago
EPCAM.cell = ScaleData(object = EPCAM.cell, do.scale = FALSE, do.center = FALSE)
nmf_data = EPCAM.cell@assays$RNA@scale.data

You set do.scale = FALSE and then pull out the scale.data slot. Have you examined nmf_data[, HVG] to see if it actually contains anything?

Also, check out cNMF it's ran in python but there are clear examples for how to run it and then import the results back into R and even incorporate into a Seurat pipeline. In my experience it's more pleasant to work with than NMF::nmf()

ADD COMMENT
0
Entering edit mode

Thank you for your suggestions.

I wanted to supply the normalized counts to the NMF and set "do.scale = FALSE" to avoid negative value. I checked the nmf_data[, HVG] and it seemed fine.

ADD REPLY
0
Entering edit mode

What do the resulting H W matrices look like from the runs?

ADD REPLY
0
Entering edit mode

I tried cNMF and it looks good~~. Thank you for your suggestions

ADD REPLY

Login before adding your answer.

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