neighbor_voting {EGAD} | R Documentation

## Evaluating Gene Function Prediction

### Description

The function performs gene function prediction based on 'guilt by association' using cross validation ([1]). Performance and significance are evaluated by calculating the AUROC or AUPRC of each functional group.

### Usage

    neighbor_voting(
      genes.labels,
      network,
      nFold = 3,
      output = "AUROC",
      FLAG_DRAW = FALSE
    )

### Arguments

`genes.labels` | numeric array
`network` | numeric array symmetric, gene-by-gene matrix
`nFold` | numeric value, default is 3
`output` | string, default is AUROC
`FLAG_DRAW` | binary flag to draw roc plot

### Value

scores numeric matrix with a row for each gene label and columns auc: the average area under the ROC or PR curve for the neighbor voting predictor across cross validation replicates avg_node_degree: the average node degree degree_null_auc: the area the ROC or PR curve for the node degree predictor

### Examples

    genes.labels <- matrix( sample( c(0,1), 1000, replace=TRUE), nrow=100)
    rownames(genes.labels) = paste('gene', 1:100, sep='')
    colnames(genes.labels) = paste('function', 1:10, sep='')
    net <- cor( matrix( rnorm(10000), ncol=100), method='spearman')
    rownames(net) <- paste('gene', 1:100, sep='')
    colnames(net) <- paste('gene', 1:100, sep='')

    aurocs <- neighbor_voting(genes.labels, net, output = 'AUROC')

    avgprcs <- neighbor_voting(genes.labels, net, output = 'PR')

[Package EGAD version 1.18.0 Index]