View source: R/library_manager.R
library_manager | R Documentation |
The function queries and selects or removes scans from the spectral library that satisfy user-defined conditions (query metadata)
library_manager(library, query = "", logical = c("AND", "OR"), ppm_search = 20, rt_search = 12)
library |
A list generated by the function library_generator() or the name of mgf spectral library file |
query |
Vector of characters. Vector of conditions used for querying the library. e.g. c("IONMODE=Positive","PEPMASS=325.19"). The left-hand side must match with the medata items of the searched library. |
logical |
Character. "AND" for selecting scans that satisfy all conditions, "OR" when selecting records that satisfy at least one condition |
ppm_search |
Numeric. Mass tolerance in ppm. Only used when searching by precursor mass "PEPMASS=..." |
rt_search |
Numeric. Retention time tolerance in second (although rt in the query and metadata in min). Only used when searching by retention time "RT=..." |
SELECTED: Library object that only contain selected scans
ID_SELECTED: IDs of selected scans
LEFT: Library object that only contain unselected scans
ID_SELECTED: IDs of unnselected scans
data(DRUG_THERMO_LIBRARY) # Search library using query command lines: query = library_manager(library2,query=c("IONMODE=Positive","RT=1.2"), logical="AND", rt_search=6) # Create a new library from query: new_library1 = query$SELECTED # Summary of found compounds: library_reporter(new_library1) # Remove scans from current library according to query: new_library2 = query$LEFT # Add another filter: query = library_manager(new_library1,query=c("IONMODE=Positive","MSLEVEL=2","RT=1.2")) new_library3 = query$SELECTED
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.