extract_ms2_info: Extract MS2 Information from a mass_dataset Object

extract_ms2_infoR Documentation

Extract MS2 Information from a mass_dataset Object

Description

This function extracts MS2 spectral data from a 'mass_dataset' object, returning the MS2 spectra with combined file and spectrum IDs.

Usage

extract_ms2_info(object)

Arguments

object

A 'mass_dataset' object containing MS2 data.

Details

The function extracts the MS2 spectra from a 'mass_dataset' object, combines the file and spectrum IDs to create unique identifiers, and returns a list of MS2 spectra. Each MS2 spectrum contains m/z and intensity data, and the list is named according to the file and spectrum IDs.

Value

A named list where each element is an MS2 spectrum (a matrix of m/z and intensity values) with names representing the combined file and spectrum IDs.

Examples

## Not run: 
# Load a sample mass dataset
my_dataset <- load_mass_dataset("path/to/dataset")

# Extract MS2 information
ms2_info <- extract_ms2_info(my_dataset)
head(names(ms2_info))

## End(Not run)



tidymass/metid documentation built on Oct. 8, 2024, 10:32 p.m.