-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMSigDF.R
27 lines (23 loc) · 844 Bytes
/
MSigDF.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
devtools::install_github("toledoem/msigdf")
setwd("TCGA-BRCA/")
library(msigdf)
library(dplyr)
library("ggnewscale")
library(clusterProfiler)
library(enrichplot)
library(ggplot2)
xxt<-read.table("selectmrna43id_fc")
head(xxt)
genelist<-as.numeric(t(xxt[,2]))
names(genelist) = as.character(t(xxt[,1]))
de <- names(genelist)
c <- msigdf.human %>% dplyr::select(geneset, symbol) %>% as.data.frame
x <- enricher(de, TERM2GENE = c, pvalueCutoff=0.05)
cnetplot(x, showCategory = 5, foldChange=geneList)
a<-as.data.frame(genelist)
genelist<-as.numeric(a[1,])
names(genelist) = as.character(colnames(a))
genelist = sort(genelist, decreasing = TRUE)
y <- GSEA(genelist, TERM2GENE = c)
grep -Fwf selectmrna43 rowData_brca_data.txt > selectmrna43id
join <(sort selectmrna43id) <(sort selectmrna43_fc) | sed 's/\ /\t/g' | cut -f3,7> selectmrna43id_fc