mass_dataset-extracting: Extract Components from mass_dataset Object

extract_expression_dataR Documentation

Extract Components from mass_dataset Object

Description

This function extracts the components from an object of class "mass_dataset". It first checks if the object belongs to the class "mass_dataset" and then extracts the expression data.

Usage

extract_expression_data(object)

extract_sample_info(object)

extract_variable_info(object, with_expression_data = FALSE)

extract_annotation_table(object, with_expression_data = FALSE)

extract_variable_info_note(object)

extract_sample_info_note(object)

extract_process_info(object)

extract_ms2_data(object)

Arguments

object

An object of class "mass_dataset" from which the MS2 data will be extracted.

with_expression_data

Logical, whether to include expression data in the output. Default is FALSE.

Value

A data frame containing the expression data or other componets in mass_dataset class.

Author(s)

Xiaotao Shen shenxt1990@outlook.com

Examples

###expression_data
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)
###sample_info
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)
###variable_info
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)
###annotation_table
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)
###variable_info_note
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)
###sample_info_note
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)
###process_info
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
extract_process_info(object)
###ms2_data
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)

tidymass/massdataset documentation built on Sept. 14, 2024, 4:41 p.m.