Extract expression_data from mass_dataset

Extract sample information.

Extract variable information.

Extract variable information.

Extract variable information note.

Extract sample information note.

Extract process information

Extract ms2 data

extract_expression_data(object)

extract_sample_info(object)

extract_variable_info(object)

extract_annotation_table(object)

extract_variable_info_note(object)

extract_sample_info_note(object)

extract_process_info(object)

extract_ms2_data(object)

# S4 method for mass_dataset
sample_info(object)

# S4 method for mass_dataset
expression_data(object)

# S4 method for mass_dataset
variable_info(object)

# S4 method for mass_dataset
process_info(object)

# S4 method for mass_dataset
ms2_data(object)

# S4 method for mass_dataset
sample_info_note(object)

# S4 method for mass_dataset
variable_info_note(object)

# S4 method for mass_dataset
annotation_table(object)

Arguments

object

(required) mass_dataset class object

Value

A data frame (expression_data).

A data frame (sample_info).

A data frame (variable_info).

A data frame (annotation_table).

A data frame (variable_info_note).

A data frame (sample_info_note).

A list of tidymass_parameter.

A ms2_data class object.

A data.frame (sample_info)

A data.frame (expression_data)

A data.frame (variable_info)

A list of tidymass_parameter class objects

A ms2_data class object.

A data.frame (sample_info_note)

A data.frame (variable_info_note)

A data.frame (annotation_table)

Author

Xiaotao Shen shenxt1990@outlook.com

Examples

data("expression_data")
data("sample_info")
data("variable_info")
object =
  create_mass_dataset(
    expression_data = expression_data,
    variable_info = variable_info,
    sample_info = sample_info
  )
 expression_data2 =
 extract_expression_data(object = object)
 head(expression_data2)
#>               Blank_3 Blank_4      QC_1      QC_2     PS4P1     PS4P2   PS4P3
#> M136T55_2_POS      NA      NA 1857924.8 1037763.8 1494436.1 3496912.1 1959179
#> M79T35_POS         NA      NA 2821550.2 1304875.3 2471336.1 3333582.7 2734244
#> M307T548_POS       NA      NA  410387.6  273687.8  288590.2  137297.5      NA
#> M183T224_POS       NA      NA        NA        NA        NA 5059068.1 5147422
#> M349T47_POS        NA      NA 8730104.8 4105598.5 5141073.2 8424315.6 7896633
#> M182T828_POS  3761893 2572593        NA 3662819.1 5700534.8 4600172.4 5557015
#>                   PS4P4
#> M136T55_2_POS 1005418.8
#> M79T35_POS    3361452.3
#> M307T548_POS   271318.3
#> M183T224_POS         NA
#> M349T47_POS   6441449.0
#> M182T828_POS  4433034.2
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,
  )
 sample_info2 =
 extract_sample_info(object = object)
 head(sample_info2)
#>   sample_id injection.order   class   group
#> 1   Blank_3               1   Blank   Blank
#> 2   Blank_4               2   Blank   Blank
#> 3      QC_1               3      QC      QC
#> 4      QC_2               4      QC      QC
#> 5     PS4P1               5 Subject Subject
#> 6     PS4P2               6 Subject Subject
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,
  )
 variable_info2 =
 extract_variable_info(object = object)
 head(variable_info2)
#>     variable_id        mz        rt
#> 1 M136T55_2_POS 136.06140  54.97902
#> 2    M79T35_POS  79.05394  35.36550
#> 3  M307T548_POS 307.14035 547.56641
#> 4  M183T224_POS 183.06209 224.32777
#> 5   M349T47_POS 349.01584  47.00262
#> 6  M182T828_POS 181.99775 828.35712
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,
  )
 annotation_table =
 extract_annotation_table(object = object)
 head(annotation_table)
#> data frame with 0 columns and 0 rows
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,
  )
 test =
 extract_variable_info_note(object = object)
 head(test)
#>          name     meaning
#> 1 variable_id variable_id
#> 2          mz          mz
#> 3          rt          rt
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,
  )
 test =
 extract_sample_info_note(object = object)
 head(test)
#>              name         meaning
#> 1       sample_id       sample_id
#> 2 injection.order injection.order
#> 3           class           class
#> 4           group           group
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: 1.0.12 
#> -------------------- 
#> 1.expression_data:[ 1000 x 8 data.frame]
#> 2.sample_info:[ 8 x 4 data.frame]
#> 3.variable_info:[ 1000 x 3 data.frame]
#> 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 (extract_process_info())
#> 1 processings in total
#> create_mass_dataset ---------- 
#>       Package         Function.used                Time
#> 1 massdataset create_mass_dataset() 2022-08-07 19:33:03
extract_process_info(object)
#> $create_mass_dataset
#> -------------------- 
#> pacakge_name: massdataset 
#> function_name: create_mass_dataset() 
#> time: 2022-08-07 19:33:03 
#> parameters:
#> no : no 
#> 
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,
  )
 test =
 extract_ms2_data(object = object)