Format network table

network_format(
  network_table,
  regulators = NULL,
  targets = NULL,
  abs_weight = TRUE
)

Arguments

network_table

The weight data table of network.

regulators

Regulators list.

targets

Targets list.

abs_weight

Logical value, default is TRUE, whether to perform absolute value on weights, and when set abs_weight to TRUE, the output of weight table will create a new column named Interaction.

Value

Formated network table

Examples

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_format(
  network_table,
  regulators = c("g1")
)
#>    regulator target      weight Interaction
#> 1         g1     g2 0.338137767  Activation
#> 2         g1    g18 0.290239415  Repression
#> 3         g1    g17 0.029059626  Activation
#> 4         g1     g5 0.022905010  Activation
#> 5         g1     g9 0.022804262  Repression
#> 6         g1     g4 0.019752793  Repression
#> 7         g1     g6 0.015979959  Repression
#> 8         g1     g7 0.012455804  Activation
#> 9         g1    g16 0.011136553  Repression
#> 10        g1    g15 0.009534899  Activation
#> 11        g1     g3 0.009268191  Activation
#> 12        g1    g14 0.008791775  Repression
#> 13        g1    g12 0.006908786  Activation
#> 14        g1    g10 0.005505657  Activation
#> 15        g1    g11 0.005331591  Activation
#> 16        g1     g8 0.004970697  Activation
#> 17        g1    g13 0.001101969  Repression

network_format(
  network_table,
  regulators = c("g1"),
  abs_weight = FALSE
)
#>    regulator target       weight
#> 1         g1     g2  0.338137767
#> 2         g1    g18 -0.290239415
#> 3         g1    g17  0.029059626
#> 4         g1     g5  0.022905010
#> 5         g1     g9 -0.022804262
#> 6         g1     g4 -0.019752793
#> 7         g1     g6 -0.015979959
#> 8         g1     g7  0.012455804
#> 9         g1    g16 -0.011136553
#> 10        g1    g15  0.009534899
#> 11        g1     g3  0.009268191
#> 12        g1    g14 -0.008791775
#> 13        g1    g12  0.006908786
#> 14        g1    g10  0.005505657
#> 15        g1    g11  0.005331591
#> 16        g1     g8  0.004970697
#> 17        g1    g13 -0.001101969

network_format(
  network_table,
  targets = c("g3")
)
#>    regulator target       weight Interaction
#> 1         g4     g3 0.4151977047  Activation
#> 2         g2     g3 0.2814299337  Activation
#> 3         g5     g3 0.0788459511  Activation
#> 4        g12     g3 0.0286531102  Repression
#> 5        g18     g3 0.0286111327  Activation
#> 6        g17     g3 0.0268390173  Repression
#> 7        g14     g3 0.0258817747  Activation
#> 8         g7     g3 0.0216999516  Activation
#> 9        g15     g3 0.0184939819  Repression
#> 10       g10     g3 0.0160668278  Activation
#> 11       g16     g3 0.0138763419  Activation
#> 12       g13     g3 0.0131577355  Activation
#> 13       g11     g3 0.0117980066  Repression
#> 14        g1     g3 0.0092681907  Activation
#> 15        g8     g3 0.0050327240  Activation
#> 16        g9     g3 0.0048879492  Repression
#> 17        g6     g3 0.0002596662  Repression

network_format(
  network_table,
  regulators = c("g1", "g3"),
  targets = c("g3", "g5")
)
#>   regulator target      weight Interaction
#> 1        g3     g5 0.062181513  Activation
#> 2        g1     g5 0.022905010  Activation
#> 3        g1     g3 0.009268191  Activation