Extracting genes form Components : NMF analysis
0
0
Entering edit mode
4 months ago
David_emir ▴ 430

Hi All,

I am working on a single-cell RNAseq dataset and running an analysis to find a cell score using NMF (RcppML)R. My question is after you get your cell scores, how can we extract the genes from the components? I have used the following code.

t1.cpm<- LogNormalize(data = as.matrix(t1@assays$RNA@counts)) # Log converting the data form seurat obj t1.model <- RcppML::nmf(as.matrix(t1.cpm), 30, verbose = F, seed = 1234) t1.w <- t1.model$w
t1.d <- t1.model$d t1.h <- t1.model$h

dim(t1.w)
rownames(t1.w)<- rownames(t1.cpm)
colnames(t1.w)<- paste0("component", 1:30)
rownames(t1.h)<- paste0("component", 1:30)


My output is as follows:

        T_1_TACCTATCAGATGGCA T_1_CCTATTATCAGGCAAG
component1             0.000000000            0.0000000000
component2             0.000000000            0.0023590277
component3             0.001512931            0.0000000000
component4             0.000000000            0.0021574559
component5             0.001175799            0.0020222144
component6             0.000000000            0.0004463346


It would be great if you can help me with how to get genes instead of the components. Thanks a lot and have a great week.

Regards, Dave

NMF components rcppml scRNA • 542 views
0
Entering edit mode
0
Entering edit mode

Thanks, ATpoint, please let me know if that's against the community rules to post in other forums. i am hoping to get some answers.

0
Entering edit mode

It's more of an etiquette thing. Since people answering in these forums are volunteers, if you post the same question in multiple places at the same time it causes multiple volunteers to have to spend time on the same question. Generally what's better to do is post in one place at first, and if you don't get an answer in a day or two to then go ahead and post somewhere else (and edit your post to include a cross-posted link).

0
Entering edit mode

thank you, I will keep that in mind. Edit: I took some time to think if I did anything wrong by posting on two different sites, and I don't think I did anything wrong. I was told about 'etiquette', I want to bring it to your kind notice that I posted it in different forums to get a maximum audience and expected a solution. It's nothing but online bullying, and I was 'bullied'. If I am an expert volunteer I would have tried my best to give a solution to it and would have moved on. A problem may be solved in many ways, so many volunteers would definitely contribute to a better solution.

Dave.