combine_peaklists: Read and Combine Bruker MSI peaklist files.

Description Usage Arguments Details Value Functions Assumptions See Also Examples

View source: R/io.R

Description

Peakpicking using Bruker mass spectrometry imaging software generally produces a folder filled with many peaklists — one for each spectrum. combine_peaklists reads all such peaklist files in a given folder, summarises and writes the relevant information to two tables. The load_* functions are for reading the tables created by combine_peaklists.

Usage

1
2
3
4
5
6
load_peaklist(o.name, o.path = ".")

load_speclist(o.name, o.path = ".")

combine_peaklists(i.path, i.name = "peaklists", o.path = ".",
  o.name = NULL)

Arguments

o.name

Name identifying the dataset of interest. If left as NULL for combine_peaklists, this will default to basename(i.path), which is then what should be passed to the load_* functions.

o.path

Path to where output files should be written.

i.path

Path to dataset of interest. This will usually be a folder with a subfolder (i.name) that contains the peaklist files.

i.name

Name of the subfolder in i.path that contains the peaklist files.

Details

Typically, Bruker raw data will be stored all in a single folder (often with the ".d" extension), with a folder name that identifies the relevant information about the run. The only compulsory argument to combine_peaklists is a filepath to that folder, i.path under arguments. Typically the peaklist files themselves will be in a subfolder of this folder, often called "peaklists" (can be specified via i.name). This is the only information with which combine_peaklists is concerned — any other files in said folder are ignored. The output files will by default be named using the folder name provided in i.path, but this can be overridden by supplying o.name. These output files are by default created in the current working directory but this can be changed via o.path.

combine_peaklists creates and writes relevant information to two tables: a peak-list, and a spectrum-list:

Note that Acq will correspond to the order of acquisition of the spectra if the spectra where acquired in increasing order of first region number, second Y-coordinate and third X-coordinate, in that order of priority. This order or acquisition is a common default on Bruker Flex instruments.

Value

On successful completion returns the number of empty spectra found — peaklist files with a header but no peaks. If no peaklist files are found at all returns -1 and a warning.

Functions

Assumptions

combine_peaklists assumes that the data is in a particular format – that produced by Bruker software peakpicking at the time of writing this vignette, specifically that:

Note that combine_peaklists checks for duplicate spectra (peaklist files with the same region number, X-coordinate, and Y-coordinate) and will throw an error if it finds any.

See Also

basename

Examples

1

Armadilloa16/dipps documentation built on May 5, 2019, 7:06 a.m.