import_biotyper_spectra {maldipickr} | R Documentation |
Importing spectra from the Bruker MALDI Biotyper device
Description
This function is a wrapper around the readBrukerFlexData::readBrukerFlexDir()
to read both acqus
and acqu
MALDI files.
Usage
import_biotyper_spectra(
biotyper_directory,
remove_calibration = c("BTS", "Autocalibration")
)
Arguments
biotyper_directory |
A path to the folder tree with the spectra to be imported. |
remove_calibration |
A vector of characters used as regex to indicate which (calibration) spectra are going to be removed. |
Details
When using readBrukerFlexData::readBrukerFlexDir()
on acqus
files (instead of the native acqu
files), the function will fail with the following error message:
Error in .readAcquFile(fidFile = fidFile, verbose = verbose) : File ‘/data/maldi_dir/targetA/0_D10/1/1SLin/acqu’ doesn't exists!
But it turns out that acqu
and acqus
files are the same, so the function here create acqu
symbolic links that point to acqus
files.
Value
A list of MALDIquant::MassSpectrum objects
See Also
check_spectra, process_spectra
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)
# Display the list of spectra
spectra_list
[Package maldipickr version 1.3.0 Index]