P_graph {pageRank} | R Documentation |
Build probability-based regulator-target interaction network.
P_graph( expmat, net, sep = 5, method = c("difference", "mi"), null = NULL, threshold = 0.001 )
expmat |
(matrix) Gene expression matrix. |
net |
(data.frame) Network, with "reg" and "target" in column name. |
sep |
(numeric) Number of bins for calculating marginal/joint probability. |
method |
(character) Method for calculating probability-based distance, either PXY-PXPY ("difference") or mutual information ("mi"). |
null |
(ecdf) Null distribution of probability-based distance. Either from random interactions by P_null function, or all interactions in net. |
threshold |
(numeric) P-value threshold for filtering interactions in net. |
(igraph) Network graph with "pvalue" and "direction", and "pagerank" as edge/vertex attributes.
DING, HONGXU (hd2326@columbia.edu)
library(bcellViper) data(bcellViper) dset <- exprs(dset) net <- do.call(rbind, lapply(1:10, function(i, regulon){ data.frame(reg=rep(names(regulon)[i], 10), target=names(regulon[[i]][[1]])[1:10], direction=rep(1, 10), stringsAsFactors = FALSE)}, regulon=regulon)) P_graph(dset, net, method="difference", null=NULL, threshold=0.05)