View source: R/library_merger.R
library_merger | R Documentation |
The function picks or generates a single MS1 and MS2 scan for each compound ID in the spectral library.
library_merger(library, method = c("consensus", "common_peaks", "max_tic", "max_nb_peaks", "most_recent"), consensus_window = 10, output_library = "")
library |
A list generated by the function library_generator() or the name of mgf spectral library file |
method |
A character of method for grouping library by compound IDs.
|
consensus_window |
m/z window (in ppm) for spectra alignment, only used when method = "consensus" or "common_peaks". To generate consensus spectra, mass peaks in different spectra within the mass window were aligned by averaging their mass values and intensities. The metadata was kept for the spectrum with higher TIC. |
output_library |
Name of the output library, the file extension must be mgf |
The same as library_generator()
Youzhong Liu, Youzhong.Liu@uantwerpen.be
data(DRUG_THERMO_LIBRARY) # Withholding the scan (MS1 and MS) with highest TIC for each ID: library2_1=library_merger(library2, method="max_tic", output_library="library_V2_filtered.mgf") # Generating consensus spectra for all scans (MS1 and MS) of the same ID. The scan with highest TIC is used for metadata: library2_2=library_merger(library2, method="consensus", consensus_window = 20, output_library="library_V2_consensus.mgf")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.