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 = "g1"
)
#>    regulator target      weight Interaction
#> 1         g1     g2 0.668444900  Activation
#> 2         g1    g18 0.467602224  Repression
#> 3         g1    g17 0.047607627  Activation
#> 4         g1     g5 0.044895033  Activation
#> 5         g1     g9 0.042442058  Repression
#> 6         g1     g4 0.036589574  Repression
#> 7         g1     g6 0.030280993  Repression
#> 8         g1     g7 0.024014462  Activation
#> 9         g1    g16 0.018303456  Repression
#> 10        g1     g3 0.018087949  Activation
#> 11        g1    g15 0.015156339  Activation
#> 12        g1    g14 0.013970876  Repression
#> 13        g1    g12 0.011942835  Activation
#> 14        g1    g10 0.009393328  Activation
#> 15        g1     g8 0.009042402  Activation
#> 16        g1    g11 0.009009966  Activation
#> 17        g1    g13 0.001787438  Repression

network_format(
  network_table,
  regulators = "g1",
  abs_weight = FALSE
)
#>    regulator target       weight
#> 1         g1     g2  0.668444900
#> 2         g1    g18 -0.467602224
#> 3         g1    g17  0.047607627
#> 4         g1     g5  0.044895033
#> 5         g1     g9 -0.042442058
#> 6         g1     g4 -0.036589574
#> 7         g1     g6 -0.030280993
#> 8         g1     g7  0.024014462
#> 9         g1    g16 -0.018303456
#> 10        g1     g3  0.018087949
#> 11        g1    g15  0.015156339
#> 12        g1    g14 -0.013970876
#> 13        g1    g12  0.011942835
#> 14        g1    g10  0.009393328
#> 15        g1     g8  0.009042402
#> 16        g1    g11  0.009009966
#> 17        g1    g13 -0.001787438

network_format(
  network_table,
  targets = "g3"
)
#>    regulator target       weight Interaction
#> 1         g4     g3 0.8103064829  Activation
#> 2         g2     g3 0.5492431610  Activation
#> 3         g5     g3 0.1538770195  Activation
#> 4        g12     g3 0.0559198683  Repression
#> 5        g18     g3 0.0558379444  Activation
#> 6        g17     g3 0.0523794555  Repression
#> 7        g14     g3 0.0505112856  Activation
#> 8         g7     g3 0.0423499727  Activation
#> 9        g15     g3 0.0360931509  Repression
#> 10       g10     g3 0.0313562783  Activation
#> 11       g16     g3 0.0270812908  Activation
#> 12       g13     g3 0.0256788471  Activation
#> 13       g11     g3 0.0230251785  Repression
#> 14        g1     g3 0.0180879493  Activation
#> 15        g8     g3 0.0098219446  Activation
#> 16        g9     g3 0.0095393999  Repression
#> 17        g6     g3 0.0005067688  Repression

network_format(
  network_table,
  regulators = c("g1", "g3"),
  targets = c("g3", "g5")
)
#>   regulator target     weight Interaction
#> 1        g3     g5 0.12187906  Activation
#> 2        g1     g5 0.04489503  Activation
#> 3        g1     g3 0.01808795  Activation