Learn R Programming

SIM (version 1.42.0)

readMSL: Read mass spectral library (MSL) files

Description

This funtion read data in NIST mass spectral library (MSL) format and returns a list of compounds, with their names, retention times, retention indexes (if provided), together with mass and intensity of all fragments.

Usage

readMSL(file.name = character(), path = getwd(), Save = FALSE)

Arguments

file.name
a string including the full name of a .MSL file including the library information.
path
a string including the full path to the location of the file.name, optional
Save
if TRUE, the function also saves the list as an RDdata object. It always returns the targets as list.

Value

  • A list including target information:
  • rta numeric vector of retention times
  • rta numeric vector of retention indexes
  • msa list including vectors of fragment masses of each target
  • spa list including vectors of fragment intensities of each target
  • compounda list including character vectors of the target chemical names

Details

NIST mass spectral library, i.e. MSL, data files include compound names and their spectral information. The spectral information consist of number of fragments for each compound, together with the mass and relative and usually normalized intensity of each fragment. Also, the retention time and retention index of the compounds are provided which helps improve the identification by avoding false positives. This functions usually is used indirectly by calling getTarget function.

References

http://omics.georgetown.edu/SIMAT.html

See Also

writeMSL, readCDF

Examples

Run this code
# load an example data set
    extdata.path <- system.file("extdata", package = "SIMAT")
    
    # get the list of targets in a file with MSL format from Example Data Set
    Targets1 <- readMSL(file.name="Targets_1.MSL", path = extdata.path)

Run the code above in your browser using DataLab