View source: R/distancematrix_mds.R
distanceMatrix | R Documentation |
distanceMatrix()
creates a distance matrix from a list of MS2
spectra, MS1 pseudospectra or neutral loss patterns by pairwise comparison
using the specified distance function. This distance matrix is the basis for
CluMSID's data mining functions.
distanceMatrix(speclist, distFun = "cossim", type = c("spectrum", "neutral_losses"), mz_tolerance = 1e-05)
speclist |
A list of |
distFun |
The distance function to be used. At the moment, only
|
type |
|
mz_tolerance |
The m/z tolerance to be used for merging, default
is |
A numeric length(speclist)
by length(speclist)
matrix
containing pairwise distances (1 - similarity) between all features in
speclist
. Row and column names are taken from the id
slot
or, if present, pasted from the id
and annotation
slots of
the MS2spectrum
or
pseudospectrum
objects.
load(file = system.file("extdata", "annotatedSpeclist.RData", package = "CluMSIDdata")) distanceMatrix(annotatedSpeclist[1:20])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.