Search
Question: Finding nearest neighbors of given hub gene in a co-expression network module
1
gravatar for Alan Smith
20 months ago by
Alan Smith140
United States
Alan Smith140 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.

Alan

ADD COMMENTlink modified 19 months ago by Peter Langfelder1.3k • written 20 months ago by Alan Smith140
1
gravatar for Peter Langfelder
19 months ago by
United States
Peter Langfelder1.3k 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 19 months ago by Peter Langfelder1.3k

That is exactly what I want to do.

Thanks a lot Peter. 

ADD REPLYlink written 19 months ago by Alan Smith140
Please log in to add an answer.

Help
Access

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