# 蛋白互作网络PPI分析后进行hub基因提取

## 导出基因

    1
    2
    3
    4

    x <- readRDS('../../fig.1/C_ref_A_fiig.1_A/x.rds')
    x <- unique(c(x$RRA_up,x$RRA_down))
    x <- as.data.frame(x)
    write.table(x = x, file = 'input.txt', row.names = F, quote = F)

## 进行PPI分析

string数据库在线分析，导出互作表格

## 提取hub基因

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20

    dat <- read.table('string_interactions.tsv', header = T)
    names(dat)[c(1,2)] <- c('Sourse', 'Target')
    dat <- dat[c('Sourse', 'Target', 'combined_score')]
    all <- unique(c(dat$Sourse,dat$Target))
    Adj <- matrix(nrow = length(all),ncol = length(all), data = 0)
    rownames(Adj) <- all
    colnames(Adj) <- all
    for(i in 1:nrow(dat)){
        s <- dat[i,'Sourse']
        t <- dat[i,'Target']
        w <- dat[i,'combined_score']
        Adj[s,t] <- w
        Adj[t,s] <- w
    }
    tmp <- rowSums(Adj)
    tmp <- data.frame(tmp)
    tmp$symbol <- rownames(tmp)
    tmp <- tmp[order(tmp$tmp,decreasing = T),]
    hub <- tmp[1:200,'symbol']
    hub_Adj <- Adj[hub,hub]

数据清洗
蛋白互作网络PPI分析后进行hub基因提取
https://occdn.limour.top/2269.html
Author
Limour
Posted on
August 20, 2022
Licensed under
生存数据计算C指数并进行比较 Previous
R语言：数据集分割 Next

#### Search

Keyword