Hub selection in WGCNA
1
0
Entering edit mode
4.8 years ago

In WGCNA package, there is a function chooseTopHubInEachModule that selects top hub genes from each module of the network. Which filters and cut-off does it use for hub selection?

Thanks

wgcna hubs • 7.0k views
ADD COMMENT
5
Entering edit mode
4.8 years ago

There are different ways to calculate hub scores. WGCNA's implementation is to simply return the gene with the maximum adjacency / 'connectivity' per module. Just type chooseTopHubInEachModule on your command line:

chooseTopHubInEachModule
function (datExpr, colorh, omitColors = "grey", power = 2, type = "signed", 
    ...) 
{
    isIndex = FALSE
    modules = names(table(colorh))
    if (!is.na(omitColors)[1])) 
        modules = modules[!is.element(modules, omitColors)]
    if (is.null(colnames(datExpr))) {
        colnames(datExpr) = 1:dim(datExpr)[2]
        isIndex = TRUE
    }
    hubs = rep(NA, length(modules))
    names(hubs) = modules
    for (m in modules) {
        adj = adjacency(datExpr[, colorh == m], power = power, 
            type = type, ...)
        hub = which.max(rowSums(adj))
        hubs[m] = colnames(adj)[hub]
    }
    if (isIndex) {
        hubs = as.numeric(hubs)
        names(hubs) = modules
    }
    return(hubs)
}

The key lines are within the for loop.

Kevin

ADD COMMENT
0
Entering edit mode

Thanks, very helpful! So as far as I understand, chooseTopHubInEachModule selects only one hub per module? I got confused because of the name of the function, thinking that one hub per module is calculated by chooseOneHubInEachModule.

ADD REPLY
0
Entering edit mode

I do not know what the utility is of the chooseOneHubInEachModule function. However, regarding the WGCNA package, there appears to be redundancy (in terms of code) across its various functions. Important to remember that WGCNA is not a Bioconductor package.

ADD REPLY

Login before adding your answer.

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