Convert a raw input matrix into an edgynode adjacency matrix
make_adjacency.Rd
Users may work with a vast variety of input matrices that
are derived from various gene regulatory network inference methods and tools
with various values and value ranges. This function aims to ensure that
such raw data is converted into a edgynode adjacency matrix format
and is the first conversion step when importing existing raw
adjacency matrices into the edgynode ecosystem.
Arguments
- x
a
matrix
object.- known_binary
a logical value indicating whether the input matrix
x
is already known to be a binary matrix (for this case useknown_binary = TRUE
) or not (for this case useknown_binary = FALSE
(default)).- known_symmetric
a logical value indicating whether the input matrix
x
is already known to be symmetric (for this case useknown_symmetric = TRUE
) or not (for this case useknown_symmetric = FALSE
(default)).
Examples
# look at raw matrix
edgynode::adjacency_matrix_test_3
#> [,1] [,2] [,3]
#> [1,] 0 -1 2
#> [2,] 1 2 4
#> [3,] 4 0 0
# convert raw matrix into a edgynode adjacency matrix
edgynode::make_adjacency(edgynode::adjacency_matrix_test_3)
#> N1 N2 N3
#> N1 0 -1 2
#> N2 1 2 4
#> N3 4 0 0
#> attr(,"class")
#> [1] "adjacency" "matrix" "array"
#> attr(,"known_symmetric")
#> [1] FALSE
#> attr(,"known_binary")
#> [1] FALSE