Skip to contents

This function converts data from MS-Dial into a mass_dataset object. It reads the data either from a given data frame or from a file and processes it to create a mass_dataset object.

Usage

convert_msdial2mass_dataset(x, path = ".", file_name)

Arguments

x

A data frame containing MS-Dial data. If missing, the function will read from a file.

path

The directory where the file is located. Default is the current directory.

file_name

The name of the file to read if x is missing.

Value

A mass_dataset object containing the processed MS-Dial data.

Details

The function reads MS-Dial data and processes it to create a mass_dataset object. It extracts sample information, variable information, and expression data. It also performs checks to ensure the data is correctly formatted.

Author

Xiaotao Shen xiaotao.shen@outlook.com

Examples

data("msdial_table")
object <- convert_msdial2mass_dataset(x = msdial_table)
dim(extract_expression_data(object))
#> [1] 3751   20