get_spectra_names {maldipickr} | R Documentation |
Extract spectra names and check for uniqueness
Description
Given the list of raw spectra, get_spectra_names()
extracts the spectra names
using the file metadata, and warns if the associated sanitized names are not unique.
Usage
get_spectra_names(spectra_list)
Arguments
spectra_list |
A list of MALDIquant::MassSpectrum objects. |
Value
A tibble with four columns
-
sanitized_name
: spectra names based onfullName
where dots and dashes are converted to underscores -
name
: spectra name using thename
label in the spectra metadata -
fullName
: spectra full name using thefullName
label in the spectra metadata -
file
: the path to the raw spectra data
Examples
# Get an example directory of six Bruker MALDI Biotyper spectra
directory_biotyper_spectra <- system.file(
"toy-species-spectra",
package = "maldipickr"
)
# Import the six spectra
spectra_list <- import_biotyper_spectra(directory_biotyper_spectra)
# Extract the names
get_spectra_names(spectra_list)
# Artificially create duplicated entries to show the warning
get_spectra_names(spectra_list[c(1,1)])
[Package maldipickr version 1.3.0 Index]