makeEdges: makeEdges

Description Usage Arguments Details Value

View source: R/Functions_Spectra_comparison.R

Description

Make an edgelist (data.frame) using a vector of parentmasses and a list of MS spectra. Wrapper for network1().

Usage

1
2
makeEdges(speclist, parentmasses = NULL, mztol = 0.005,
  method = "cosine", minpeaks = 6, nonmatched = T)

Arguments

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

Details

Columns of the returned data.frame:

Value

a data.frame with edge information, see Details


mjhelf/MassTools documentation built on Nov. 19, 2021, 2:38 a.m.