WGCNA ranking of HUB genes
1
0
Entering edit mode
arom2 • 0
@arom2-8204
Last seen 7.7 years ago
United States

Hi,

I am trying to analyze a set of particular genes that are all within a module in addition to the HUB genes of that module. I am finding that when I extract the list of genes with the highest module membership at varying lengths, the genes that populate that list slightly change in their ranking. 

For example - when I extract the top 10 HUB genes:

      yellow
 [1,] "LOC106529418"
 [2,] "LOC106513277"
 [3,] "LOC106523395"
 [4,] "LOC106522037"
 [5,] "LOC106524105"
 [6,] "LOC106516167"
 [7,] "LOC106525246"
 [8,] "LOC106516366"
 [9,] "LOC106531344"
[10,] "LOC106522808"

And when I extract the top 20, I don't only see new genes populate the bottom of the list, but rather, I see some new genes making up the top 10 positions, too.

      yellow        
 [1,] "LOC106529418"
 [2,] "LOC106516441"
 [3,] "LOC106528572"
 [4,] "LOC106513277"
 [5,] "LOC106523804"
 [6,] "LOC106523395"
 [7,] "LOC106522037"
 [8,] "LOC106524105"
 [9,] "LOC106516167"
[10,] "LOC106525555"
[11,] "LOC106525246"
[12,] "LOC106523471"
[13,] "LOC106516366"
[14,] "LOC106515286"
[15,] "LOC106517146"
[16,] "LOC106531344"
[17,] "LOC106522808"
[18,] "LOC106534245"
[19,] "LOC106527578"
[20,] "LOC106520168"

Can anyone explain why the ranking of gene module memberships is being adjusted with with each of my attempts?

Here is the code chunk I am following from the tutorial with the value '10' in the 6th line down as what I change between the results I see above:

topGenesKME = NULL
for (c in 1:length(colors20)){
 kMErank1    = rank(-geneModuleMembership1[,c])
 kMErank2    = rank(-geneModuleMembership2[,c])
 maxKMErank  = rank(apply(cbind(kMErank1,kMErank2+.00001),1,max))
 topGenesKME = cbind(topGenesKME,Gene[maxKMErank<=10])
}; colnames(topGenesKME) = colors20
topGenesKME

 

Thank you in advance for any insight on this!

 

WGCNA HUB • 2.9k views
ADD COMMENT
0
Entering edit mode
@lluis-revilla-sancho
Last seen 4 days ago
European Union

The code you show doesn't order Gene by rank (only subsets based on maxKMErank). You could easily do it with order, however, which order should it follow: KMErank1, KMErank2, both, just maxKMErank? What happens when there are two maxKMErank which are the same? I would do something like Gene[order(kMErank1, kMErank2, decreasing = TRUE)][1:10] where 1:10 is the number of Genes you want to subset.

ADD COMMENT
0
Entering edit mode

Great, thank you!!

I am not sure I completely understand the difference, but as long as this outputs representative HUB genes of the modules, then I am satisfied.

 

ADD REPLY
0
Entering edit mode

Hi Lluis R., I actually still have a bit of confusion about this.

I was hoping to get a list of the genes that have the highest module membership (HUB genes) within each module. From the code that you helped me with earlier, I found some genes were repeated in the lists from multiple modules. I found this to happen more often in the modules that share similar profiles (MEs). Nonetheless, how would a gene have high module membership in multiple modules. Let me know if I am not making myself clear or need to read the paper more clearly, but I anticipated that there would be unique module HUB genes from the code you helped me with earlier. I can explore merging modules, but I would like to understand them independently, first.

Thank you for your time.

ADD REPLY
0
Entering edit mode

Module Membership can be calculated for several modules. If several modules are similar for a single gene the module membership may be high for several modules. 

That's why I suggested ordering by the position of several module memberships. But if you want the HUB genes of each module just subset the genes based on the module membership of its module.

ADD REPLY

Login before adding your answer.

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