View source: R/library_similarity.R
library_similarity | R Documentation |
The function searches unknown MS/MS spectra in a spectral library
library_similarity(library, query_spectrum = NULL, method = c("Fragment", "Simple", "All", "Cosine"), prec_mz = 0, use.prec = FALSE, ppm_search = 20, relative = 1, mirror.plot = T, png.out = F)
library |
A list generated by the function library_generator() or the name of mgf spectral library file |
query_spectrum |
Two-column data matrix. Two columns represent m/z and intensity of query tandem spectrum |
method |
Character. Method to compare the similarity between query spectrum and library spectra.
|
prec_mz |
Numeric. Precursor mass of query spectrum (if known). Default value is 0. Must NOT be 0 if method = "All" or use.prec = TRUE (see below) |
use.prec |
Boolean. If set to TRUE, precursor mass is used to "pre-query" the library |
ppm_search |
Numeric. Mass tolerance in ppm for precursor/fragment search. |
relative |
Numeric between 0 and 100. The relative intensity threshold of the highest peak in each spectrum). Peaks in query spectrum below relative thresholds are not taken into account. |
mirror.plot |
Boolean. True if the query-library comparison is visualized as mirror plot |
png.out |
Boolean. True if plotted mirror spectra are exported as png images! |
<plot>: Comparing query spectrum to ordered "hits" in the spectrum library
SELECTED: Library object that contain found scans.
ID_SELECTED: IDs of found compounds.
SCORES: Similarity scores between query spectrum and each
Youzhong Liu, Youzhong.Liu@uantwerpen.be
data(DRUG_THERMO_LIBRARY) dat = cbind(c(136.073,149.071,151.0991,180.047),c(1,1,20,3)) query = library_similarity(library2, dat, method = "Cosine", prec_mz = 0, use.prec =FALSE, ppm_search = 20, relative = 1, mirror.plot = F) # Query-library comparison via mirror plot: library_visualizer_similarity(query$SELECTED, id= query$ID_SELECTED[1], query_spectrum = dat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.