View source: R/update_visualizer.R
| dataForPlotly | R Documentation | 
Function to generate data for interactive visulization
dataForPlotly(
  input_library,
  id = NULL,
  type = c("complete", "consensus"),
  query_spectrum = NULL,
  t = 0.25,
  b = 10
)
| 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. | 
a dataframe with m/z, intensity, ID and all the metadata columns from input_library metadata
Yingjie Zhang
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.