extractMS {PepSAVIms}R Documentation

Extract embedded mass spectrometry data

Description

Extract mass spectrometry data from an object with class binMS, class filterMS, or class msDat.

Usage

extractMS(msObj, type = "matrix")

Arguments

msObj

An an object with class binMS, class filterMS, or class msDat.

type

A character string with value either "matrix", or "msDat". If "matrix" is provided as the argument, then the mass-to-charge values, charge values, and mass spectrometry data are combined into a single matrix and returned. If "msDat" is provided as the argument, then an msDat object containing this data is returned.

Details

A convenience function for extracting and inspecting the mass spectrometry data in a binMS, filterMS, or msDat object. binMS and filterMS objects are lists that contain an msDat object, and specifying "msDat" for type merely returns the msDat element from the list for these classes of object. specifying "msDat" for an object with class "msDat" merely returns the argument, i.e. is the identity function. When "matrix" is specified, then the elements in the embedded msDat object are combined into a single matrix using cbind and returned.

Value

Returns either a matrix containing the mass spectrometry data if "matrix" is specified as the argument to type, or an object with class msDat if "msDat" is specified as the argument to type. See Details for more detail regarding the return objects.


[Package PepSAVIms version 0.9.1 Index]