Generate global null model p-value
globalNullModel.Rd
Randomly select the same number of nodes in the largest connected component of netbox result as a new gene candidate list and repeat multiple times to produce a distribution of node size and edge numbers. This distribution will be used to produce global p-value of netbox result based on the node size or edge numbers of largest component in the final network result.
Usage
globalNullModel(
netboxGraph,
networkGraph,
directed,
iterations = 30,
numOfGenes = NULL,
pValueAdj = "BH",
pValueCutoff = 0.05
)
Arguments
- netboxGraph
igraph network graph object. This igraph object contains NetBox algorithm identified network from
geneConnector
function- networkGraph
igraph network graph object. This igraph object contains curated network information
- directed
boolean value indicating whether the input network is directed or undirected (default = FALSE)
- iterations
numeric value for number of iterations
- numOfGenes
numeric value for number of genes mapped in the initial network
- pValueAdj
string for p-value correction method c("BH", "Bonferroni") as described in the details section (default = "BH")
- pValueCutoff
numeric value of p-value cutoff for linker nodes (default = 0.05)
Value
a list of returned results
globalNull: data frame of global randomization results
globalNodesResult: data frame of global null tested results based on nodes
globalEdgesResult: data frame of global null tested results based on edges
Details
P-value correction methods include the Bonferroni correction ("bonferroni") or Benjamini & Hochberg ("BH").
Author
Eric Minwei Liu, emliu.research@gmail.com
Examples
data(netbox2010)
sifNetwork<-netbox2010$network
graphReduced <- networkSimplify(sifNetwork,directed = FALSE)
#> Loading network of 9264 nodes and 157780 interactions
#> Treated as undirected network
#> Removing multiple interactions and loops
#> Returning network of 9264 nodes and 68111 interactions
geneList<-as.character(netbox2010$geneList)
results<-geneConnector(geneList=geneList,networkGraph=graphReduced,
pValueAdj='BH',pValueCutoff=0.05,
communityMethod='lec',keepIsolatedNodes=FALSE)
#> 274 / 517 candidate nodes match the name in the network of 9264
#> nodes
#> Only test neighbor nodes with local degree equals or exceeds 2
#> Multiple hypothesis corrections for 892 neighbor nodes in the network
#> For p-value 0.05 cut-off, 6 nodes were included as linker nodes
#> Connecting 274 candidate nodes and 6 linker nodes
#> Remove 208 isolated candidate nodes from the input
#> Final network contains 72 nodes and 152 interactions
#> Detecting modules using "leading eigenvector" method
names(results)
#> [1] "netboxGraph" "netboxCommunity" "netboxOutput" "nodeType"
#> [5] "moduleMembership" "neighborData"
# Suggested 100 iterations.
# Use 5 interations in the exampel to save running time.
# globalTest <- globalNullModel(netboxGraph=results$netboxGraph,
# networkGraph=graphReduced,
# iterations=5, numOfGenes = 274)