Description Usage Arguments Details Value
View source: R/Functions_Spectra_comparison.R
Make an edgelist (data.frame) using a vector of parentmasses
and a list of MS spectra. Wrapper for network1()
.
1 2 |
speclist |
(non-nested) list of MS spectra |
parentmasses |
vector of parent m/z values (same length as speclist). |
mztol |
max difference between matched peaks in m/z |
method |
"cosine" will use lsa::cosine(), "pearson" will use stats::cor() |
minpeaks |
minimum number of peaks that have to be matched, otherwise returns 0 |
nonmatched |
if TRUE, will add non-matching peaks to calculation, with 0 intensity in the spectrum missing the peak |
Columns of the returned data.frame:
from
vertex id
to
vertex id
cosine
similarity measure
deltamz
parent mass difference
a data.frame with edge information, see Details
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.