combine {MetNet} | R Documentation

## Combine structural and statistical adjacency matrix

### Description

The function 'combine' takes as input the structural and statistical adjacency matrix, created in former steps, adds them together and will report a connection between metabolites in the returned when the sum exceeds the 'threshold'. `combine` returns this consensus matrix supported by the structural and statistical adjacency matrices.

### Usage

    combine(structural, statistical, threshold = 1)

### Arguments

`structural` | list containing 'numeric' structural adjacency matrix in the first entry and 'character' structural adjanceny matrix in the second entry
`statistical` | matrix containing 'numeric' statistical adjacency matrix
`threshold` | numeric, threshold value to be applied to define a connection as present

### Details

The matrices will be added and a unweighted connection will be reported when the value exceeds a certain value.

### Value

'list', in the first entry 'matrix' of type 'numeric'containing the consensus adjacency matrix as described above harbouring connections reported by the structual and statistcal adjacency matrices. In the second entry a 'matrix' of type 'character' the corresonding type/putative link at this position.

### Author(s)

Thomas Naake, thomasnaake@googlemail.com

### Examples

    data("x_test", package = "MetNet")
    x_test <- as.matrix(x_test)
    functional_groups <- rbind(
        c("Monosaccharide (-H2O)", "C6H10O5", "162.0528234315"),
        c("Disaccharide (-H2O)", "C12H20O11", "340.1005614851"),
        c("Trisaccharide (-H2O)", "C18H30O15", "486.1584702945"))
    functional_groups <- data.frame(group = functional_groups[, 1],
         formula = functional_groups[, 2],
         mass = as.numeric(functional_groups[, 3]))
    struct_adj <- structural(x_test, functional_groups, ppm = 5)
    stat_adj_l <- statistical(x_test,
        model = c("pearson", "spearman"),
        correlation_adjust = "bonferroni")
    stat_adj <- threshold(stat_adj_l, type = "top2", args = list(n = 10))
    combine(struct_adj, stat_adj)

[Package MetNet version 1.5.3 Index]