dataForPlotly: Function to generate data for interactive visulization

View source: R/update_visualizer.R

dataForPlotlyR Documentation

Function to generate data for interactive visulization

Description

Function to generate data for interactive visulization

Usage

dataForPlotly(
  input_library,
  id = NULL,
  type = c("complete", "consensus"),
  query_spectrum = NULL,
  t = 0.25,
  b = 10
)

Arguments

input_library

A list generated by the function library_generator() or the name of mgf/msp/RData spectral library file

id

Compound id of the spectra to be plotted (both most recent MS1 and MS2 spectra will be plotted!)

type

Character. "Complete" if raw specra are visualized. "Consensus" if consensus spectra are visualized

query_spectrum

Two-column data matrix. Optional for mirror plot. Two columns represent m/z and intensity of query tandem spectrum.

t

numeric value specifying the tolerance used to align the m/z values of the two spectra (used in calculating consine similarity score), 0.25 by default.

b

numeric value specifying the baseline threshold for peak identification. Expressed as a percent of the maximum intensity (used in calculating consine similarity score), 10 by default.

Value

a dataframe with m/z, intensity, ID and all the metadata columns from input_library metadata

Author(s)

Yingjie Zhang


daniellyz/MergeION2 documentation built on Jan. 26, 2024, 6:24 a.m.