Help with cnet plot for customize pathway from MSigDb
0
0
Entering edit mode
5 months ago
Chris ▴ 340

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.

cnet • 425 views
ADD COMMENT
0
Entering edit mode

Are c("COULOUARN_TEMPORAL_TGFB1_SIGNATURE_UP", "BIOCARTA_IL12_PATHWAY") in your x object?

ADD REPLY
0
Entering edit mode

Yes, they are. Thank you for your help.

ADD REPLY

Login before adding your answer.

Traffic: 2956 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6