lib.search: lib.search

View source: R/lib.search.R

lib.searchR Documentation

lib.search

Description

spectral searching using Spectra::compare function(s)

Usage

lib.search(
  prod.tol.ppm = NULL,
  prec.tol.ppm = NULL,
  r.sigma = 50,
  exp.spectra = NULL,
  exp.rt = NULL,
  exp.ri = NULL,
  exp.precursor = NULL,
  lib.spectra = NULL,
  lib.rt = NULL,
  lib.ri = NULL,
  lib.precursor = NULL,
  n.cores = 2,
  block.size = 100,
  min.score = 0.5
)

Arguments

prod.tol.ppm

allowable product ion mass error in spectral matching in parts per million. generally, use ~ 15 for TOF, 500 for quad.

prec.tol.ppm

allowable precursor ion mass error in spectral matching in parts per million. generally, use ~ 15 for TOF, 500 for quad. Note though that quad isolation is NOT accurate mass, so you could consider using a larger window to account for potential chimeric spectra.

r.sigma

retention time (or index) sigma for adjusting spectral match scores when retention similarity is used. use similarly to RAMClustR retention time similarity calculation.

exp.spectra

experimental spectra, as an R object of class 'Spectra' produced from the Spectra package

exp.rt

experimental spectra retention times (if desired for retention time matching). Use only one of exp.rt or exp.ri.

exp.ri

experimental spectra retention index (if desired for retention index matching). Use only one of exp.rt or exp.ri.

exp.precursor

experimental precursor masses (if desired for precursor selective spectral matching)

lib.spectra

library spectra, as an R object of class 'Spectra' produced from the Spectra package

lib.rt

library spectra retention times (if desired for retention time matching)

lib.ri

library spectra retention index (if desired for retention index matching)

lib.precursor

library precursor masses (if desired for precursor selective spectral matching)

n.cores

how many parallel threads to use

block.size

number of library spectra to search at once - multiple smaller blocks appear to be appreciably faster than one larger block.

min.score

minimum match score for results to be returned.

Details

this function searches experimental spectra against library spectra, returning the cosine similarity scores for all matches with score > min.score.

Value

a matrix including columns for the index of the experimental spectrum, the index of the library spectrum, the spectral similarity score, a retention index (or time) similarity score, and a the total score, which is the product of the spectral and retention time similarities.

Author(s)

Corey Broeckling

References

Broeckling CD, Afsar FA, Neumann S, Ben-Hur A, Prenni JE. RAMClust: a novel feature clustering method enables spectral-matching-based annotation for metabolomics data. Anal Chem. 2014 Jul 15;86(14):6812-7. doi: 10.1021/ac501530d. Epub 2014 Jun 26. PubMed PMID: 24927477.


cbroeckl/csu.pmf.tools documentation built on Jan. 26, 2024, 6:27 p.m.