Skip to contents

This function converts mzTab data into a mass_dataset object. It processes the mzTab data to create a mass_dataset object containing expression data, sample information, and variable information.

Usage

convert_mztab2mass_dataset(file, path = ".")

Arguments

file

The name of the mzTab file to be read.

path

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

Value

A mass_dataset object containing the processed mzTab data.

Details

The function reads mzTab 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

# Path to the example mzTab file
mzTab_file <- system.file("extdata", "data.mzTab", package = "massdataset")

# Convert mzTab to mass_dataset object
mass_dataset_object <- convert_mztab2mass_dataset(
  file = "data.mzTab",
  path = dirname(mzTab_file)
)

# View summary of the object
summary(mass_dataset_object)
#>     assay_1         assay_2     
#>  Min.   :12345   Min.   :34567  
#>  1st Qu.:15123   1st Qu.:42898  
#>  Median :17900   Median :51228  
#>  Mean   :17900   Mean   :51228  
#>  3rd Qu.:20678   3rd Qu.:59559  
#>  Max.   :23456   Max.   :67890