Description Usage Arguments Details Value Examples
View source: R/compareShortestPath.R
compare intra-cluster shortest distance to overall shortest distance of the network
1 | compareShortestPath(net, pheno, plotDist = FALSE, verbose = TRUE)
|
net |
(data.frame) network on which to compute shortest path. SOURCE, TARGET, WEIGHTS. Column names are ignored but expects a header row. Distances will be computed based on the third column |
pheno |
(data.frame) Node information. ID (node name) and GROUP (cluster name) |
plotDist |
(logical) if TRUE, creates a violin plot showing the shortest path distributions for each group. |
verbose |
(logical) print messages |
Uses Dijkstra's algorithm for weighted edges. Pairwise nodes with infinite distances are excluded before computing average shortest path for a network. This function requires the igraph package to be installed.
(list) Two lists, 'avg' and 'all'. keys are cluster names. values for 'avg' are mean shortest path ; for 'all', are all pairwise shortest paths for subnetworks that contain only the edges where source and target both belong to the corresponding cluster. In addition, there is an 'overall' entry for the mean shortest distance for the entire network.
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.