-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.Rhistory
127 lines (127 loc) · 4.45 KB
/
.Rhistory
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
library(piano)
if(!require(piano))
{
source("https://bioconductor.org/biocLite.R")
biocLite("piano")
}
library(piano)
install.packages(gdata)
install.packages("gdata)
install.packages("gdata")
library(piano)
setwd("C:/Users/Fupan/Desktop/Ontoscope")
read.table("./annotation/Pathway Commons 7.KEGG Pathway.GSEA.hgnc.gmt", sep = "\t")
pathway <- read.table("./annotation/Pathway Commons 7.KEGG Pathway.GSEA.hgnc.gmt", sep = "\t")
pathway <- read.table("~/annotation/Pathway Commons 7.KEGG Pathway.GSEA.hgnc.gmt", sep = "\t")
pathway <- read.table("./annotation/Pathway.GSEA.hgnc.gmt", sep = "\t")
pathway <- read.table("./annotate/Pathway.GSEA.hgnc.gmt", sep = "\t")
pathway <- readLines("./annotate/Pathway.GSEA.hgnc.gmt", sep = "\t")
head(pathway)
pathway <- readLines("./annotate/Pathway.GSEA.hgnc.gmt")
head(pathway)
pathway <- strsplit(pathway, "\")
pathway <- strsplit(pathway, "\")
pathway <- strsplit(pathway, "\\")
pathway <- strsplit(pathway)
pathway <- strsplit(pathway, split = '\')
pathway <- strsplit(pathway, split = '\\\')
pathway <- strsplit(pathway, split = '\\')
pathway <- gsub("\\", ".", pathway)
pathway <- gsub("\\", ".", pathway,fixed = TRUE)
head(pathway)
pathway <- read.delim("./annotate/Pathway.GSEA.hgnc.gmt")
pathway <- read.table("./annotate/Pathway.GSEA.hgnc.gmt", sep = "\t", col.names = NULL)
pathway <- read.table("./annotate/Pathway.GSEA.hgnc.gmt", sep = "\t", col.names = NA)
pathway <- read.table("./annotate/Pathway.GSEA.hgnc.gmt", sep = "\t", as.is = TRUE)
pathway <- read.table("./annotate/Pathway.GSEA.hgnc.gmt", sep = "\t", fill = TRUE)
head(pathway)
pathway <- pathway[, -2]
source("./enrichr/enrichr.R")
source("./enrichr/enrichr.R")
install.pa\
install.packages("httr")
install.packages("httr")
load("./constrast/sample1_contrast.RData")
load("./contrast/sample1_contrast.RData")
head(fantomCounts_10Kg_6s)
head(gsx_fantomCounts_500g_5s)
pathway
head(pathway)
head(melt(pathway))
library(reshape2)
head(melt(pathway))
typeof(pathway)
melt(pathway)
head(pathway)
melt(head(pathway))
melt(head(pathway), measure.vars = "V1")
melt(head(pathway), measure.vars = head(pathway)$V1)
melt(head(pathway))
pathway <- gsub("", NA, pathway)
head(pathway)
pathway
pathway <- read.table("./annotate/Pathway.GSEA.hgnc.gmt", sep = "\t", fill = TRUE)
pathway <- pathway[, -2] #remove unnessesary ID data
melt(head(pathway), id.vars = 1, measure.vars = 1)
melt(head(pathway), id.vars = 1)
pathway <- melt(pathway, id.vars = 1)
head(pathway)
pathway <- pathway[value != "", ]
pathway <- pathway[pathway$value != "", ]
pathway
pathway <- read.table("./annotate/Pathway.GSEA.hgnc.gmt", sep = "\t", fill = TRUE)
pathway <- pathway[, -2] #remove unnessesary ID data
pathway <- melt(pathway, id.vars = 1)
pathway
pathway <- read.table("./annotate/Pathway.GSEA.hgnc.gmt", sep = "\t", fill = TRUE)
pathway <- pathway[, -2] #remove unnessesary ID data
pathway[,a]
pathway[,1]
pathway <- read.table("./annotate/Pathway.GSEA.hgnc.gmt", sep = "\t", fill = TRUE)
pathway[,1]
max(count.fields("./annotate/Pathway.GSEA.hgnc.gmt", sep = "\t"))
pathway <- read.table("./annotate/Pathway.GSEA.hgnc.gmt", sep = "\t", fill = TRUE, col.names = 1:603)
head(pathway)
pathway[,1]
pathway[, 2]
pathway <- read.table("./annotate/Pathway.GSEA.hgnc.gmt", sep = "\t", fill = TRUE, col.names = 1:603)
head(pathway <- pathway[, -2] #remove unnessesary ID data
pathway <- melt(pathway, id.vars = 1)
pathway <- pathway[pathway$value != "", ]
pathway <- read.table("./annotate/Pathway.GSEA.hgnc.gmt", sep = "\t", fill = TRUE, col.names = 1:603)
pathway <- pathway[, -2] #remove unnessesary ID data
pathway <- melt(pathway, id.vars = 1)
pathway <- pathway[pathway$value != "", ]
head(pathway)
pathway <- pathway[, -2]
head(pathway)
allpathways <- loadGSC(pathway)
library(piano)
allpathways <- loadGSC(pathway)
allpathways
pathway <- pathway[, c(2,1)]
allpathways <- loadGSC(pathway)
allpathways
gsx <- gsx_fantomCounts_10Kg_6s
head(gsx)
gsx <- gsx_fantomCounts_10Kg_6s$gsx
names(gsx) <- gsx_fantomCounts_10Kg_6s$gene
gsaoutput <- runGSA(gsx, gsc = allpathways)
head(gsx)
NA %in% gsx_fantomCounts_10Kg_6s$gene
NA %in% gsx_fantomCounts_10Kg_6s$gsx
gsx <- gsx_temp$gsx
gsxtemp <- gsx_fantomCounts_10Kg_6s
gsxtemp <- na.rm(gsxtemp)
gsx <- gsx_temp$gsx
names(gsx) <- gsx_temp$gene
gsxtemp <- gsx_fantomCounts_10Kg_6s
gsxtemp <- na.omit(gsxtemp)
gsx <- gsx_temp$gsx
names(gsx) <- gsx_temp$gene
gsx <- gsxtemp$gsx
names(gsx) <- gsxtemp$gene
gsaoutput <- runGSA(gsx, gsc = allpathways)
GSAsummaryTable(gsaoutput)
head(GSAsummaryTable(gsa))
head(GSAsummaryTable(gsaoutput))