In the last decade, several methods have tackled the challenge of reconstructing gene regulatory networks from gene expression data. Several papers have compared and evaluated the different network inference methods relying on simulated data.

This is a new comparison that assesses different methods in a high-heterogeneity data scenario which could reveal the specialization of methods for the different network types and data.

This package allows repeating the comparison between different network inference algorithms with only one line of code.

This package allows replication this comparison between the different networks inference algorithms with only one line of code.

Toy example for main benchmark:

## Loading required package: grndata
    top20.aupr <- netbenchmark(methods="all",datasources.names = "Toy",
                               datasets.num = 2,experiments = 40,
## Warning in netbenchmark(methods = "all", datasources.names = "Toy", local.noise = 20, : The specified number of experiments and 
##                     datasets is bigger than the orginal number of experiments 
##                     in the datasource: toy, 
##                     sampling with replacement will be used
## Estimate (local) false discovery rates (partial correlations):
## Estimate (local) false discovery rates (partial correlations):

The first element of the returned list is the \(AUPR_{20}\):

##   Origin experiments aracne.wrap c3net.wrap  clr.wrap GeneNet.wrap
## 1    toy          48  0.14858187 0.13085487 0.1714301   0.01809598
## 2    toy          35  0.09280824 0.09350897 0.1172456   0.03491626
##   Genie3.wrap mrnet.wrap mutrank.wrap mrnetb.wrap pcit.wrap zscore.wrap
## 1   0.1747745  0.1701856   0.11900207   0.1760170 0.1696715  0.03307668
## 2   0.1400868  0.1197440   0.07485347   0.1216965 0.1418993  0.01477506
##         rand
## 1 0.02203073
## 2 0.02326192

The package provides an easy way to compare new techniques with
state-of-the-art ones and to make new different benchmarks in the future.

First, define the wrapper functions:

    Spearmancor <- function(data){

    Pearsoncor <- function(data){

Note that the wrapper function returns a matrix which is the weighted adjacency matrix of the network inferred by the algorithm and that the columns and rows are named.

Evaluate five times these two simple inference methods with syntren300 datasource:

    res <- netbenchmark(datasources.names="syntren300",
    aupr <- res[[1]][,-(1:2)]

Make a boxplot of the \(AUPR_{20}\) results:

    boxplot(aupr, main="Syntren300",ylab=expression('AUPR'[20]))

Plot the mean Precision-Recall curves:

    PR <- res[[5]][[1]]
    col <- rainbow(3)
    legend("topright", inset=.05,title="Method",colnames(PR$rec),fill=col)

We can also compare these two simple inference methods with the fast network inference algorithms using syntren300 datasource:

    comp <- netbenchmark(datasources.names="syntren300",
## Estimate (local) false discovery rates (partial correlations):
## Estimate (local) false discovery rates (partial correlations):
## Estimate (local) false discovery rates (partial correlations):
## Estimate (local) false discovery rates (partial correlations):
## Estimate (local) false discovery rates (partial correlations):
    aupr <- comp[[1]][,-(1:2)]

Make a boxplot the \(AUPR_{20}\) results:

    #make the name look prety
    colnames(aupr) <- sapply(colnames(aupr),file_path_sans_ext)
    boxplot(aupr, main="Syntren300", ylab=expression('AUPR'[20]))