Hi all,
I tried network visualization tools like cytoscape, IPA giagen, metascape, igraph but they don't look nice as cnetplot. However, cnetplot doesn't have tutorial how to make plot with pathways from MSigDb. I think it is possible because I can make cnetplot with pathways from MSigDb but I got error when try to visualize only pathways of interest. Without showCategory
or showCategory = 5
or others number or other pathways, there is no error. Some pathways cause no error but it doesn't show. Only some pathways will show and I still don't know why. results
is output from limma. Would you please have a suggestion? Thank you so much!
gene_list <- results$logFC
names(gene_list) <- rownames(results)
gene <- names(gene_list)[abs(gene_list) > 0.1]
gene <- bitr(gene, fromType = "SYMBOL", toType = "ENTREZID", OrgDb = org.Hs.eg.db)$ENTREZID
m_t2g <- msigdbr(species = "Homo sapiens", category = "C2") %>%
dplyr::select(gs_name, entrez_gene)
x <- enricher(gene, TERM2GENE = m_t2g)
cnetplot(x, showCategory = c("COULOUARN_TEMPORAL_TGFB1_SIGNATURE_UP", "BIOCARTA_IL12_PATHWAY")) +
+ theme_minimal() +
+ theme(axis.text.x = element_text(angle = 45, hjust = 1))
Error in graph.data.frame(x, directed = FALSE) :
the data frame should contain at least two columns
Update. I figured it out. Thank you.
Are
c("COULOUARN_TEMPORAL_TGFB1_SIGNATURE_UP", "BIOCARTA_IL12_PATHWAY")
in yourx
object?Yes, they are. Thank you for your help.