Function to setup the required built-in open-source converters or the Bruker library to convert tof-to-mz and scan-to-inv_ion_mobility. When the Burker option is selected the library is downloaded automatically using opentimsr::download_bruker_proprietary_code().

setup_converter_library(opensource = TRUE, path = NULL, force = FALSE)

Arguments

opensource

logical(1) determine if use the built-in open-source converters of opentimsr (defaults) or the proprietary library from Bruker. Defaults to opensource = TRUE.

path

character(1) where save the Bruker library. If NULL the library is cached using BiocFileCache. Used only with the Bruker library. Defaults to path = NULL.

force

logical(1) force to redownload the Bruker library (default: FALSE). See the notes section for the use of force = TRUE on Windows.

Value

The function is called to register and load a converter library and does not return a value.

Note

This function is called during package startup, thus it most cases it is not required to be used. This will use the opentimsr::setup_opensource() function. To use Bruker's proprietary library, call setup_converter_library() with parameter opensource = FALSE. This will download the library with opentimsr::download_bruker_proprietary_code() and cache the file in the local BiocFileCache.

On Windows, the Bruker DLL is bound to the opentimsr package. To allow the Bruker library to be re-downloaded, the package must be temporarily detached so the old file can be deleted, then reattached afterwards. This is done automatically.

Author

Gabriele Tomè

Examples


## To setup the open-source built-in library
setup_converter_library()

## Use `setup_converter_library(opensource = FALSE)` to download and use the
## proprietary library from Bruker. The library file is downloaded and
## cached with *BiocFileCache* package. Alternatively, to download the
## library to a specific local path use the `path` parameter.