Learn R Programming

chromConverter (version 0.12.0)

read_chemstation_ms: Read 'Agilent ChemStation' MS files

Description

Reads 'Agilent ChemStation MSD Spectral Files' beginning with x01/x32/x00/x00.

Usage

read_chemstation_ms(
  path,
  what = c("MS1", "BPC", "TIC"),
  format_out = c("matrix", "data.frame", "data.table"),
  data_format = "long",
  read_metadata = TRUE,
  metadata_format = c("chromconverter", "raw"),
  collapse = TRUE
)

Value

A list of the streams in what, in the format specified by format_out. In wide format, the BPC and TIC have retention times as rows and a single intensity column; in long format, a retention time column and an intensity column. MS data will always be returned in long format. The format_out argument determines whether the chromatogram is returned as a matrix, data.frame, or data.table. Metadata are attached as attributes if read_metadata is TRUE. With collapse = TRUE, a list of one stream is replaced by that stream.

Arguments

path

Path to 'Agilent' .ms file.

what

Which streams to return: MS1, BPC and/or TIC. Defaults to all three.

format_out

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

data_format

Whether to return the BPC and TIC in long (default) or wide format. Mass spectra are always returned in long format.

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).

collapse

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

Author

Ethan Bass

See Also

Other 'Agilent' parsers: read_agilent_d(), read_agilent_dx(), read_agilent_rslt(), read_chemstation_ch(), read_chemstation_csv(), read_chemstation_logs(), read_chemstation_method(), read_chemstation_reports(), read_chemstation_uv()

Examples

Run this code
if (FALSE) {
read_chemstation_ms(path)
}

Run the code above in your browser using DataLab