Skip to contents

This function reads a Mascot Generic Format (MGF) file while mimicking the MsBackendMgf implementation but using significantly lower memory, making it more suitable for large MGF files.

Usage

read_mgf_opti(
  f,
  msLevel = 2L,
  mapping = Spectra::spectraVariableMapping(MsBackendMgf::MsBackendMgf())
)

Arguments

f

A character string specifying the path to a single MGF file.

msLevel

An integer specifying the MS level. Default is 2L.

mapping

A named character vector mapping MGF fields to standard spectra variables. Defaults to Spectra::spectraVariableMapping(MsBackendMgf::MsBackendMgf()).

Value

A DataFrame containing the parsed spectra data.

Examples

NULL
#> NULL