Create the microbiome_dataset object.

create_microbiome_dataset(
  expression_data,
  sample_info,
  variable_info,
  otu_tree,
  taxa_tree,
  ref_seq,
  sample_info_note,
  variable_info_note
)

Arguments

expression_data

MS1 peak table name. https://tidymicrobiome.github.io/microbiomedataset/articles/data_import_and_export.html

sample_info

Sample information name. https://tidymicrobiome.github.io/microbiomedataset/articles/data_import_and_export.html

variable_info

MS1 peak table name. Columns are samples and rows are variables.

otu_tree

otu_tree

taxa_tree

taxa_tree

ref_seq

ref_seq https://tidymicrobiome.github.io/microbiomedataset/articles/data_import_and_export.html

sample_info_note

Sample information name. https://tidymicrobiome.github.io/microbiomedataset/articles/data_import_and_export.html

variable_info_note

Sample information name. https://tidymicrobiome.github.io/microbiomedataset/articles/data_import_and_export.html

Value

A microbiome_dataset-class object.

Author

Xiaotao Shen shenxt1990@outlook.com

Examples


expression_data <-
  as.data.frame(matrix(
    sample(1:100, 100, replace = TRUE),
    nrow = 10,
    ncol = 10
  ))

rownames(expression_data) <- paste0("OTU", 1:nrow(expression_data))
colnames(expression_data) <-
  paste0("Sample", 1:ncol(expression_data))
expression_data
#>       Sample1 Sample2 Sample3 Sample4 Sample5 Sample6 Sample7 Sample8 Sample9
#> OTU1       14      28      58      12      23      30      90      86      71
#> OTU2       69      45      11      87      68     100      65      54      37
#> OTU3       74      74      69      19      93      89      66      23      90
#> OTU4       13      48       5      68      21       6      40      14      13
#> OTU5       35      13      76      19      74      42       4       4      83
#> OTU6       32      72      72       2      17      63      80      17      71
#> OTU7       61      13      17      76      89      92       5      54      51
#> OTU8       85      67      88      62      58      76      50      32      16
#> OTU9       81      82      72      97      25      10       1      25      18
#> OTU10      38      46      23      15      44      79      90      12      13
#>       Sample10
#> OTU1        58
#> OTU2        55
#> OTU3        11
#> OTU4        10
#> OTU5        92
#> OTU6        13
#> OTU7        28
#> OTU8        56
#> OTU9        95
#> OTU10       97

variable_info <-
  as.data.frame(matrix(
    sample(letters, 70, replace = TRUE),
    nrow = nrow(expression_data),
    ncol = 7
  ))

rownames(variable_info) <- rownames(expression_data)
colnames(variable_info) <-
  c("Domain",
    "Phylum",
    "Class",
    "Order",
    "Family",
    "Genus",
    "Species")

variable_info$variable_id <-
  rownames(expression_data)

sample_info <-
  data.frame(sample_id = colnames(expression_data),
             class = "Subject")

object <-
  create_microbiome_dataset(
    expression_data = expression_data,
    sample_info = sample_info,
    variable_info = variable_info
  )

object
#> -------------------- 
#> microbiomedataset version: 0.99.1 
#> -------------------- 
#> 1.expression_data:[ 10 x 10 data.frame]
#> 2.sample_info:[ 10 x 2 data.frame]
#> 3.variable_info:[ 10 x 8 data.frame]
#> 4.sample_info_note:[ 2 x 2 data.frame]
#> 5.variable_info_note:[ 8 x 2 data.frame]
#> -------------------- 
#> Processing information (extract_process_info())
#> create_microbiome_dataset ---------- 
#>             Package               Function.used                Time
#> 1 microbiomedataset create_microbiome_dataset() 2023-04-19 17:33:11