extract_ms1_info: Extract MS1 Information from a mass_dataset Object

View source: R/6_zzz.R

extract_ms1_infoR Documentation

Extract MS1 Information from a mass_dataset Object

Description

This function extracts MS1-related data from a 'mass_dataset' object, including MS2 spectrum ID, m/z, retention time (RT), file ID, and variable ID.

Usage

extract_ms1_info(object)

Arguments

object

A 'mass_dataset' object containing MS2 data.

Details

The function extracts MS1-related information from the MS2 data stored within a 'mass_dataset' object. It combines the MS2 data ID and spectrum ID to create a unique 'ms2_spectrum_id', and returns the corresponding m/z, RT, file ID, and variable ID in a data frame.

Value

A data frame containing the following columns:

ms2_spectrum_id

A combined ID made up of the MS2 data ID and spectrum ID.

mz

The m/z values for the corresponding MS2 spectra.

rt

The retention time (RT) values for the corresponding MS2 spectra.

ms2_files_id

The file ID associated with each MS2 spectrum.

variable_id

The variable ID for each MS2 spectrum.

Examples

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

# Extract MS1 information
ms1_info <- extract_ms1_info(my_dataset)
head(ms1_info)

## End(Not run)



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