Finding nearest neighbors of given hub gene in a co-expression network module
Entering edit mode
Alan Smith ▴ 150
Last seen 5.4 years ago
United States

Dear Bioconductor Community,

I performed signed co-expression network analysis using WGCNA and identified key modules and hub genes within. I want to tease apart nearest neighbors of a given hub gene and perform GO and pathway analyses on those. I tried using RBGL package to convert igraph to graph object and used kCliques; edge betweeness and community related functions from RBGL and igraph packages but all I get is one cluster including all genes within a module.

Is there a package in Bioconductor (or CRAN) that does that (in lines of k-spanning tree or SNN). 

Thanks in advance for your help.


wgcna rbgl graph coexpression hub genes • 1.8k views
Entering edit mode
Last seen 8 months ago
United States

It's not clear how you want to define the nearest neighbors. If you mean nearest neighbors in the weighted network that WGCNA constructed, simply calculate the adjacency between your "key" genes and other genes (either within the module, or you can take all genes), then find the genes with the highest adjacencies. Something along the lines

(populate the variable keyGenes with indices of the key genes)

adj = adjacency(datExpr, selectCols = keyGenes, ...)  

Replace ... above with appropriate adjacency arguments to reproduce your network

Each column in adj now contains adjacencies of one "key" gene with all other genes. These can be now ordered, for example as

adjOrder = apply(adj, 2, order, decreasing  = TRUE)

and you can select a certain number (or a cutoff) of the strongest neighbors for each gene, to run enrichments or any other analysis you like.

Entering edit mode

That is exactly what I want to do.

Thanks a lot Peter. 


Login before adding your answer.

Traffic: 365 users visited in the last hour
Help About
Access RSS

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

Powered by the version 2.3.6