Function to return shortest path from 1 regulator to 1 target in a static network

static_shortest_path(
  network_table,
  regulator,
  target,
  weight_column = "weight",
  compare_to_average = FALSE
)

Arguments

network_table

The weight data table of network.

regulator

The starting gene.

target

The end gene.

weight_column

column name in network_table with edge weights that will be converted to distances

compare_to_average

if TRUE will compute normalized against average path length

Value

shortest path, distance, normalized distance, and action

Examples

data("example_matrix")
network_table <- inferCSN(example_matrix)
#>  [2025-05-28 02:35:40] Running for <dense matrix>.
#>  [2025-05-28 02:35:40] Checking input parameters.
#>  [2025-05-28 02:35:40] Using L0 sparse regression model.
#>  [2025-05-28 02:35:40] Using 1 core
#>  [2025-05-28 02:35:40] Run done.
static_shortest_path(
  network_table,
  regulator = "g1",
  target = "g2"
)
#> $path
#> [1] "g1" "g2"
#> 
#> $distance
#> [1] 0.2752553
#> 
#> $action
#> [1] 1
#>