Skip to contents

Build matched microbiome and metabolome matrices using the explicit sample link table stored in a microbiome_metabolome_dataset.

Usage

extract_crossomics_matrix(
  object = NULL,
  microbiome_data = NULL,
  metabolome_data = NULL,
  sample_link = NULL,
  microbiome_rank = NULL,
  microbiome_transform = c("none", "relative", "log", "presence_absence", "clr"),
  metabolome_transform = c("none", "log")
)

Arguments

object

A microbiome_metabolome_dataset object.

microbiome_data

A microbiome_dataset object. Used when object is not supplied.

metabolome_data

A mass_dataset object. Used when object is not supplied.

Optional sample link table used when object is not supplied.

microbiome_rank

Optional taxonomy rank used to aggregate microbiome abundance before extraction.

microbiome_transform

Optional transformation method passed to transform_counts().

metabolome_transform

Metabolome transformation method.

Value

A list containing matched matrices and metadata.

Examples

data("demo_crossomics", package = "microbiomedataset")

x <- create_microbiome_metabolome_dataset(
  microbiome_data = demo_crossomics$microbiome_data,
  metabolome_data = demo_crossomics$metabolome_data,
  sample_link = demo_crossomics$sample_link
)
y <- extract_crossomics_matrix(x, microbiome_rank = "Genus")
names(y)
#> [1] "microbiome_matrix"           "metabolome_matrix"          
#> [3] "sample_info"                 "microbiome_variable_info"   
#> [5] "metabolome_variable_info"    "metabolome_annotation_table"
#> [7] "sample_link"