Enrichment analysis using Clusterprofiler R/Cytoscape
1
0
Entering edit mode
3.8 years ago

Hi,

I have a gene coexpression network from which I have obtained highly coregulated clusters of genes(modules). I have 13 modules in a data frame and I want to run enrichment analysis at once for all the 13 modules.

The clusterprofiler seems to be a good package to me for this job. In the enricher() function, the first input is a vector of Gene_ID. How can I provide all the modules with their respective probes in to this 'gene' option? Any suggestion will be greatly appreciated.

Also, is there a way to label the modules in the cytoscape network with the most enriched pathway obtained from the enrichment analysis?

Thank you so much. Arif

enricher(
  gene,
  pvalueCutoff = 0.05,
  pAdjustMethod = "BH",
  universe,
  minGSSize = 10,
  maxGSSize = 500,
  qvalueCutoff = 0.2,
  TERM2GENE,
  TERM2NAME = NA
)

module_df <- structure(list(Module = c(1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 
2L, 3L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L, 5L, 5L, 5L, 5L, 5L, 
6L, 6L, 6L, 6L, 6L, 7L, 7L, 7L, 7L, 8L, 8L, 8L, 9L, 9L, 10L, 
10L, 11L, 11L, 12L, 12L, 13L, 13L), Probe_ID = c("1395851_at", 
"1397766_at", "1397999_at", "1396085_at", "1397225_at", "1389045_at", 
"1390638_at", "1390119_at", "1389236_at", "1390107_at", "1371083_at", 
"1384334_at", "1389350_at", "1389270_x_at", "1371762_at", "1387283_at", 
"1392637_at", "1385051_at", "1397304_at", "1387134_at", "1389486_at", 
"1382907_at", "1387796_at", "1388608_x_at", "1387656_at", "1380726_at", 
"1379772_at", "1381504_at", "1379345_at", "1388939_at", "1378866_at", 
"1392627_x_at", "1391481_at", "1375230_at", "1398253_at", "1370299_at", 
"1394844_s_at", "1392525_at", "1395374_at", "1377774_at", "1373053_at", 
"1393669_at", "1385270_s_at", "1387874_at", "1370541_at", "1371113_a_at", 
"1388750_at")), row.names = c(NA, -47L), groups = structure(list(
    Module = 1:13, .rows = structure(list(1:5, 6:10, 11:15, 16:20, 
        21:25, 26:30, 31:34, 35:37, 38:39, 40:41, 42:43, 44:45, 
        46:47), ptype = integer(0), class = c("vctrs_list_of", 
    "vctrs_vctr", "list"))), row.names = c(NA, -13L), class = c("tbl_df", 
"tbl", "data.frame"), .drop = TRUE), class = c("grouped_df", 
"tbl_df", "tbl", "data.frame"))

enter image description here

R CYTOSCAPE CLUSTERPROFILER ENRICHMENT ANALYSIS • 2.3k views
ADD COMMENT
0
Entering edit mode
3.8 years ago
xanderpico ▴ 540

There may be multiple approaches, but here is how I do that sort of analysis:

  1. Translate your identifiers to NCBI Gene (Entrez) IDs using the bitr function (as described in clusterProfiler tutorial).
  2. Use your prefered apply to run enricher on each of your module gene sets. The function does not take more than one list at a time.

Note. If you use enricher then you are expected to provide your own ontology parsed as TERM2GENE and TERM2NAME. This works great for custom sources like WikiPathways for pathways analysis. But if you want to perform GO enrichment, then you want to use enrichGO instead.

After getting your results, you will have an object containing ranked GO (or pathway) annotations for each of your modules. In Cytoscape, you can load this as Node Table data and then use Styles to map this information to color, for example. Or you can add Text and Shape Annotations to Cytoscape to visually label the modules.

You might also want to look at the enrichmentMap app for Cytoscape as a way to represent your enrichment results: https://apps.cytoscape.org/apps/enrichmentmap

ADD COMMENT

Login before adding your answer.

Traffic: 2276 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