Activates a dataset within the mass dataset object for further analysis.
Usage
activate_mass_dataset(
.data,
what = c("sample_info", "variable_info", "expression_data", "annotation_table")
)Arguments
- .data
A
mass_datasetobject.- what
A character string specifying which dataset to activate. The available options are:
"sample_info": Activates the sample information dataset.
"variable_info": Activates the variable information dataset.
"expression_data": Activates the expression data.
"annotation_table": Activates the annotation table.
By default, it activates the "sample_info" dataset.
Details
This function allows users to activate a specific dataset within the
mass_dataset object. The activated dataset can be then used in subsequent
analysis steps.
Author
Xiaotao Shen xiaotao.shen@outlook.com
Examples
data("expression_data")
data("sample_info")
data("variable_info")
object =
create_mass_dataset(
expression_data = expression_data,
sample_info = sample_info,
variable_info = variable_info
)
object
#> --------------------
#> massdataset version: 0.99.1
#> --------------------
#> 1.expression_data:[ 1000 x 8 data.frame]
#> 2.sample_info:[ 8 x 4 data.frame]
#> 8 samples:Blank_3 Blank_4 QC_1 ... PS4P3 PS4P4
#> 3.variable_info:[ 1000 x 3 data.frame]
#> 1000 variables:M136T55_2_POS M79T35_POS M307T548_POS ... M232T937_POS M301T277_POS
#> 4.sample_info_note:[ 4 x 2 data.frame]
#> 5.variable_info_note:[ 3 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 create_mass_dataset() 2026-03-02 09:27:03
object <- activate_mass_dataset(.data = object, what = "sample_info")
head(dplyr::filter(object, class == "QC"))
#> --------------------
#> massdataset version: 0.99.1
#> --------------------
#> 1.expression_data:[ 6 x 2 data.frame]
#> 2.sample_info:[ 2 x 4 data.frame]
#> 2 samples:QC_1 QC_2
#> 3.variable_info:[ 6 x 3 data.frame]
#> 6 variables:M136T55_2_POS M79T35_POS M307T548_POS ... M349T47_POS M182T828_POS
#> 4.sample_info_note:[ 4 x 2 data.frame]
#> 5.variable_info_note:[ 3 x 2 data.frame]
#> 6.ms2_data:[ 0 variables x 0 MS2 spectra]
#> --------------------
#> Processing information
#> 3 processings in total
#> create_mass_dataset ----------
#> Package Function.used Time
#> 1 massdataset create_mass_dataset() 2026-03-02 09:27:03
#> filter ----------
#> Package Function.used Time
#> 1 massdataset filter() 2026-03-02 09:27:03
#> update_mass_dataset ----------
#> Package Function.used Time
#> 1 massdataset update_mass_dataset() 2026-03-02 09:27:03
