diff --git a/vignettes/data_import.Rmd b/vignettes/data_import.Rmd index 5bf74fd..669de6a 100644 --- a/vignettes/data_import.Rmd +++ b/vignettes/data_import.Rmd @@ -225,7 +225,6 @@ The `metaphlan` format is another commonly used format in bioinformatics for microbiome sequencing data. Here's how you can import data in `metaphlan` format to `TreeSummarizedExperiment.` - ### To TreeSummarizedExperiment To convert data from the `metaphlan` format to the `TreeSummarizedExperiment` @@ -238,15 +237,20 @@ tse_metaphlan <- mia::loadFromMetaphlan( file = system.file("extdata", "merged_abundance_table.txt", package = "mia"), ) -tse_metaphlan +tse_metaphlan <- TreeSummarizedExperiment::TreeSummarizedExperiment( + assays = list(counts = SummarizedExperiment::assay(tse_metaphlan)), + rowData = SummarizedExperiment::rowData(tse_metaphlan), + colData = SummarizedExperiment::colData(tse_metaphlan) |> + as.data.frame() |> + dplyr::mutate(condition = rep(c("A", "B"), times = 3)) +) # Recipe init -rec <- dar::recipe(tse_metaphlan) +rec <- dar::recipe(tse_metaphlan, var_info = "condition", tax_info = "Genus") rec ``` - ## Conclusion In this guide, we have explored various methods for importing microbiome