第四步:PPI蛋白网络制作
2020-05-27 本文已影响0人
碌碌无为的杰少
提取symbol数据
load("step4output.Rdata")
gene_up= deg[deg$change == 'up','symbol']
gene_down=deg[deg$change == 'down','symbol']
write.table(gene_up,
file="upgene.txt",
row.names = F,
col.names = F,
quote = F)
write.table(gene_down,
file="downgene.txt",
row.names = F,
col.names = F,
quote = F)
write.table(deg$symbol[1:200],
file="diffgene.txt",
row.names = F,
col.names = F,
quote = F)
library(dplyr)
if(T){x2 <- deg %>%
filter(change=="up")%>%
arrange(desc(logFC))%>%
head(200) }
gene_up1= x2$symbol
class(gene_up1)
write.table(gene_up1,
file="upgene1.txt",
row.names = F,
col.names = F,
quote = F)
cytoscape文件准备
tsv = read.table("string_interactions.tsv",comment.char = "!",header = T)
tsv2 = tsv[,c(1,2,ncol(tsv))]
head(tsv2)
write.table(tsv2,
file = "cyto.txt",
sep = "\t",
quote = F,
row.names = F)
p = deg[deg$change != "stable",c("symbol","logFC","P.Value")]
head(p)
write.table(p,
file = "deg.txt",
sep = "\t",
quote = F,
row.names = F)
image.png
image.png