clr {MetNet}R Documentation

Create an adjacency matrix based on context likelihood or relatedness network

Description

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.

Usage

clr(mi, clr_threshold=0)

Arguments

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 cmi function of the mpmi package can be used.

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.

Details

For more details on the clr function, refer to ?parmigene::clr.

Value

matrix, matrix with edges inferred from Context Likelihood or Relatedness Network algorithm clr

Author(s)

Thomas Naake, thomasnaake @googlemail.com

Examples

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)

[Package MetNet version 1.0.1 Index]