neighbor_voting {EGAD} | R Documentation |
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.
neighbor_voting(genes.labels, network, nFold = 3, output = "AUROC", FLAG_DRAW = FALSE)
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 |
scores numeric matrix
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') auprcs <- neighbor_voting(genes.labels, net, output = 'PR')