clr {MetNet} | R Documentation |
clr
infers an adjacency matrix using
context likelihood/relatedness network using the clr
function from
the parmigene
package. The presence/absence is based on if the
returned value exceeds a user-defined threshold value. clr
will
return the adjacency matrix containing the presence/absence value.
clr(mi, clr_threshold=0)
mi |
matrix, where columns and the rows are features
(metabolites), cell entries are mutual information values between the
features. As input, the mutual information (e.g. raw MI estimates or
Jackknife bias corrected MI estimates) from the |
clr_threshold |
numeric, if the clr value exceeds the threshold (clr$_i,j$ > threshold, where clr$_i, j$ is the clr value of the ith row feature and of the jth column feature), the connection is defined as present, if the clr value is lower than the threshold value (clr$_i,j$ ≤q threshold) there is no statistical connection reported. |
For more details on the clr
function,
refer to ?parmigene::clr.
matrix, matrix with edges inferred from Context Likelihood or
Relatedness Network algorithm clr
Thomas Naake, thomasnaake @googlemail.com
data("x_test", package="MetNet") x <- x_test[, 3:dim(x_test)[2]] x <- as.matrix(x) x_z <- t(apply(x, 1, function(y) (y - mean(y)) / sd(y))) mi_x_z <- mpmi::cmi(x_z)$bcmi clr(mi_x_z, clr_threshold=0)