Filter and sort matrix
filter_sort_matrix(network_matrix, regulators = NULL, targets = NULL)
Filtered and sorted matrix
data("example_matrix")
network_table <- inferCSN(example_matrix)
#> ✔ Running for <dense matrix>.
#> ✔ Checking input parameters.
#> ✔ Using L0 sparse regression model.
#> ✔ Using 1 core.
#> ✔ Run done.
network_matrix <- table_to_matrix(network_table)
filter_sort_matrix(network_matrix)[1:6, 1:6]
#> g1 g2 g3 g4 g5
#> g1 0.000000000 0.338137767 0.0092681907 -0.01975279 0.022905010
#> g2 0.208240363 0.000000000 0.2814299337 0.01135446 0.006973898
#> g3 0.007219557 0.357707045 0.0000000000 0.36993781 0.062181513
#> g4 -0.016931373 0.016194043 0.4151977047 0.00000000 0.334764758
#> g5 0.022599496 0.011010652 0.0788459511 0.38034320 0.000000000
#> g6 -0.017414505 -0.006287723 -0.0002596662 0.08075083 0.371229345
#> g6
#> g1 -0.0159799588
#> g2 -0.0039367559
#> g3 -0.0006236106
#> g4 0.0658743327
#> g5 0.3460084473
#> g6 0.0000000000
filter_sort_matrix(
network_matrix,
regulators = c("g1", "g2"),
targets = c("g3", "g4")
)
#> g3 g4
#> g1 0.009268191 -0.01975279
#> g2 0.281429934 0.01135446