View source: R/LCC_Significance.R
LCC_Significance | R Documentation |
Calculates the Largest Connected Component (LCC) from a given graph, and calculates its significance using a degree preserving approach. Menche, J., et al (2015) <doi.org:10.1126/science.1065103>
LCC_Significance( N = N, Targets = Targets, G, bins = 100, hypothesis = "greater", min_per_bin = 20 )
N |
Number of randomizations. |
Targets |
Name of the nodes that the subgraph will focus on - Those are the nodes you want to know whether if forms an LCC. |
G |
The graph of interest (often, in NetMed it is an interactome - PPI). |
bins |
the number os bins for the degree preserving randomization. When bins = 1, assumes a uniform distribution for nodes. |
hypothesis |
are you expecting an LCC greater or smaller than the average? |
min_per_bin |
the minimum size of each bin. |
a list with the LCC - $LCCZ all values from the randomizations - $mean the average LCC of the randomizations - $sd the sd LCC of the randomizations - $Z The score - $LCC the LCC of the given targets - $emp_p the empirical p-value for the LCC - $rLCC the relative LCC
set.seed(666) net = data.frame( Node.1 = sample(LETTERS[1:15], 15, replace = TRUE), Node.2 = sample(LETTERS[1:10], 15, replace = TRUE)) net$value = 1 net = CoDiNA::OrderNames(net) net = unique(net) g <- igraph::graph_from_data_frame(net, directed = FALSE ) plot(g) targets = c("I", "H", "F", "E") LCC_Significance(N = 100, Targets = targets, G = g, bins = 1, min_per_bin = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.