R/convert_msdial2mass_dataset.R
convert_msdial2mass_dataset.Rd
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.
convert_msdial2mass_dataset(x, path = ".", file_name)
A mass_dataset
object containing the processed MS-Dial data.
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.
##if you want to read the msdital table,
##use this function
## table <- read.table("msdial_table.csv", sep = ",")
data("msdial_table")
object =
convert_msdial2mass_dataset(x = msdial_table)
object
#> --------------------
#> massdataset version: 1.0.33
#> --------------------
#> 1.expression_data:[ 3751 x 20 data.frame]
#> 2.sample_info:[ 20 x 5 data.frame]
#> 20 samples:W03.01 W03.02 W03.03 ... W30.09 W30.10
#> 3.variable_info:[ 3751 x 32 data.frame]
#> 3751 variables:0 1 2 ... 6716 6717
#> 4.sample_info_note:[ 5 x 2 data.frame]
#> 5.variable_info_note:[ 32 x 2 data.frame]
#> 6.ms2_data:[ 0 variables x 0 MS2 spectra]
#> --------------------
#> Processing information
#> 1 processings in total
#> create_mass_dataset ----------
#> Package Function.used Time
#> 1 massdataset convert_msdial2mass_dataset() 2024-09-06 08:49:47