Learn R Programming

chromConverter (version 0.12.0)

read_shimadzu: Read 'Shimadzu' ASCII

Description

Reads 'Shimadzu' ASCII (.txt) files. These files can be exported from 'Shimadzu LabSolutions' by right clicking on samples in the sample list and selecting File Conversion:Convert to ASCII.

Usage

read_shimadzu(
  path,
  what = "chroms",
  format_in = NULL,
  include = c("fid", "lc", "dad", "uv", "tic"),
  format_out = c("matrix", "data.frame", "data.table"),
  data_format = c("wide", "long"),
  peaktable_format = c("chromatographr", "original"),
  read_metadata = TRUE,
  metadata_format = c("chromconverter", "raw"),
  ms_format = c("data.frame", "list"),
  collapse = TRUE,
  scale = TRUE
)

Value

A nested list of elements from the specified file, where the top levels are chromatograms, peak tables, and/or mass spectra according to the value of what, and the chromatograms are grouped by type (e.g. fid). Where collapse is TRUE, a list of one is unwrapped at the top level and within each type of chromatogram. Chromatograms are returned in the format specified by format_out and data_format.

Arguments

path

Path to Shimadzu .txt ASCII file.

what

Whether to extract chromatograms (chroms), peak_table, and/or ms_spectra. Accepts multiple arguments.

format_in

This argument is deprecated and is no longer required.

include

Which chromatograms to include: any of fid, lc, dad, uv, tic, and status. Defaults to all but status.

format_out

Class of output. Either matrix, data.frame, or data.table.

data_format

Whether to return data in wide (default) or long format.

peaktable_format

Whether to return peak tables in the standard chromatographr layout (the default) or with all the columns the file provides (original). A chromatographr table has the columns rt, start, end, area, height and FWHM (the full width at half maximum), with times in the same unit as the format's chromatograms and NA where the file does not record a value.

read_metadata

Logical. Whether to attach metadata. Defaults to TRUE.

metadata_format

Format to output metadata. Either chromconverter (standardized field names) or raw (vendor field names, unmapped).

ms_format

Whether to return mass spectral data as a (long) data.frame or a list.

collapse

Logical. Whether to collapse lists that only contain a single element. Defaults to TRUE.

scale

Whether to scale the data by the scaling factor present in the file. Defaults to TRUE.

Author

Ethan Bass

See Also

Other 'Shimadzu' parsers: read_shimadzu_gcd(), read_shimadzu_lcd(), read_shimadzu_method(), read_shimadzu_qgd(), read_sz_lcd_2d(), read_sz_lcd_3d(), read_sz_tables()

Examples

Run this code
path <- system.file("extdata/alkane_ladder.txt", package = "chromConverter")
read_shimadzu(path)

Run the code above in your browser using DataLab