Skip to content

Instantly share code, notes, and snippets.

@kozo2
Last active June 5, 2019 08:33
Show Gist options
  • Save kozo2/c95d3ddd2cf501b26a688c1fb9f8a5eb to your computer and use it in GitHub Desktop.
Save kozo2/c95d3ddd2cf501b26a688c1fb9f8a5eb to your computer and use it in GitHub Desktop.
library(clusterProfiler)
library(DT)
library(tibble)
pathway <- character(0)
cids <- list()
for(i in 1:length(mset_SMPDB_format_KEGG)) {
row = mset_SMPDB_format_KEGG[[i]]
pathway <- c(pathway, row[[2]])
cids[[i]] <- row[[3]]
}
tb <- tibble(pathway=pathway, cID=cids)
y <- enricher(kusano, pvalueCutoff=0.5, TERM2GENE=tb, minGSSize=1, qvalueCutoff = 0.5)
DT::datatable(as.data.frame(y))
for (i in 1:length(mset_SMPDB_format_KEGG)){
if (mset_SMPDB_format_KEGG[[i]][[1]] == "SMP00493") {
print(mset_SMPDB_format_KEGG[[i]][[2]])
print(intersect(kusano, mset_SMPDB_format_KEGG[[i]][[3]]))
#print(mset_SMPDB_format_KEGG[[i]][[3]])
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment