Learn R Programming

NEArender (version 1.0)

roc: ROC for NEA benchmarks

Description

Plot ROC curve(s) for benchmarked network(s)

Usage

roc(tpvsfp, coff.z = 1.965, coff.fdr = 0.1, cex.leg = 0.75, main = NA)

Arguments

tpvsfp
a list contaning data for the ROC curve(s) from benchmark: cutoffs, fp, tp, and the point cross.z that matches coff.fdr.
coff.z
since this is meaningless to consider statistically insignificant results as "successful", the ROC curve should rather terminate at a certain minimally justifiable level of confidence. This is set by the Z-score cutoff which follows normal distribution parameters, e.g. z=1.96 ~ p-value=0.05 or z=2.57 ~ p-value=0.01 in one-sided tests.
coff.fdr
to make significance levels comparable between different curves, the point where FDR=coff.fdr will be labeled with a circle (think of TP/FP ratio at this level).
cex.leg
font size in plot
main
title name for the plot

References

http://www.biomedcentral.com/1471-2105/15/308

See Also

benchmark

Examples

Run this code
# Benchmark and plot one networks on the whole set of test GSs, using no mask:
data(can.sig.go);
fpath <- can.sig.go
gs.list <- import.gs(fpath, Lowercase = 1, col.gene = 2, col.set = 3);
data(net.kegg)
netpath <- net.kegg
net <- import.net(netpath)

b0 <- benchmark (NET = net, 
 GS = gs.list[c("kegg_04270_vascular_smooth_muscle_contraction")],
 echo=1, graph=TRUE, na.replace = 0, mask = ".", minN = 0, 
 coff.z = 1.965, coff.fdr = 0.1, Parallelize=2);
 roc(b0, coff.z = 1.64, coff.fdr = 0.05);

## Not run: 
# ## Benchmark and plot a number of networks on GO terms and KEGG pathways separately, using masks
# b1 <- NULL;
# for (mask in c("kegg_", "go_")) {
# b1[[mask]] <- NULL;
# for (file.net in c("netpath")) { 
# # a series of networks can be put here: c("netpath1", "netpath2", "netpath3")
# net <- import.net(netpath, col.1 = 1, col.2 = 2, Lowercase = 1, echo = 1)
# b1[[mask]][[file.net]] <- benchmark (NET = net, GS = gs.list, 
# gs.gene.col = 2, gs.group.col = 3, net.gene1.col = 1, net.gene2.col = 2, 
# echo=1, graph=FALSE, na.replace = 0, mask = mask, minN = 0, Parallelize=2);
# }}
# par(mfrow=c(2,1));
# roc(b1[["kegg_"]], coff.z = 2.57, coff.fdr = 0.01);
# roc(b1[["go_"]], coff.z = 2.57, coff.fdr = 0.01);
# ## End(Not run)

Run the code above in your browser using DataLab