# 使用NMF进行聚类

## 安装包

- conda activate wgcna
- conda install -c conda-forge r-nmf -y

## 确定秩

    1
    2
    3
    4

    library(NMF)
    dat <- readRDS('PRAD.rds')
    res <- nmf(dat,2:7,nrun=10, seed=123)
    pdf(file = 'nmf_sp.pdf', width = 12, height = 12);plot(res);dev.off()

## 绘制共识网络并提取分组

    1
    2
    3
    4
    5

    res.3 <- nmf(dat,3,nrun=10, seed=123)
    pdf(file = 'nmf_consensusmap.pdf', width = 6, height = 6);consensusmap(res.3);dev.off()
    group <- predict(res.3)
    group <- as.data.frame(group)
    saveRDS(group, 'group.rds')

WGCNA
使用NMF进行聚类
https://occdn.limour.top/2201.html
Author
Limour
Posted on
August 9, 2022
Licensed under
ggcorrplot绘制相关性热图 Previous
RRA结果绘图 Next

#### Search

Keyword