Question: Finding nearest neighbors of given hub gene in a co-expression network module
gravatar for Alan Smith
2.6 years ago by
Alan Smith150
United States
Alan Smith150 wrote:

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.


ADD COMMENTlink modified 2.6 years ago by Peter Langfelder1.6k • written 2.6 years ago by Alan Smith150
gravatar for Peter Langfelder
2.6 years ago by
United States
Peter Langfelder1.6k wrote:

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.

ADD COMMENTlink written 2.6 years ago by Peter Langfelder1.6k

That is exactly what I want to do.

Thanks a lot Peter. 

ADD REPLYlink written 2.6 years ago by Alan Smith150
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 399 users visited in the last hour