createSimilarityMatrix {MetCirc} | R Documentation

## Create similarity matrix

### Description

Creates the similarity matrix by calculating the normalised dot product (NDP) between precursors

### Usage

    createSimilarityMatrix(mm, m = 0.5, n = 2)

### Arguments

`mm` | `matrix`, colnames are all fragments which occur in the dataset, rownames are m/z / rt values, entries of `mm` are intensity values corresponding to their m/z values
`m` | `numeric`, see `?NDP` for further details
`n` | `numeric`, see `?NDP` for further details

### Details

createSimilarityMatrix calls a function to calculate the NDP between all precursors in the data set. For further information on how the NDP is calculated see `?NDP` and Li et al. (2015): Navigating natural variation in herbivory-induced secondary metabolism in coyote tobacco populations using MS/MS structural analysis. PNAS, E4147–E4155. Currently `m = 0.5` and `n = 2` are set as default.

### Value

`createSimilarityMatrix` returns a similarity matrix that contains the NDP similarity measure between all precursors in the data set

### Author(s)

Thomas Naake, thomasnaake@googlemail.com

### Examples

    data("binnedMSP", package = "MetCirc")
    ## truncate binnedMSP
    binnedMSP <- binnedMSP[1:28,]
    createSimilarityMatrix(binnedMSP, m = 0.5, n = 2)

[Package MetCirc version 1.14.0 Index]