# Load a vertex-wise distance matrix (distance between nodes in a graph)
data("gdist.toy", package = "PathwaySpace")
# Get two gene lists
from <- sample(colnames(gdist.toy), 50)
to <- sample(colnames(gdist.toy), 50)
# Calculate distances between lists, and between random lists
res <- pathDistances(gdist.toy, from, to)
# Plot observed and null distances
plotPathDistances(res)
Run the code above in your browser using DataLab