From 75ca7d6726a9a752e88a495f70248586a221b4bb Mon Sep 17 00:00:00 2001 From: Daena Rys Date: Mon, 11 Nov 2024 10:56:17 +0200 Subject: [PATCH] vignettes Signed-off-by: Daena Rys --- vignettes/articles/manipulation.Rmd | 7 +++---- vignettes/articles/minimalgut.Rmd | 19 +++++++++---------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/vignettes/articles/manipulation.Rmd b/vignettes/articles/manipulation.Rmd index 0976d7b..31f3394 100644 --- a/vignettes/articles/manipulation.Rmd +++ b/vignettes/articles/manipulation.Rmd @@ -55,9 +55,8 @@ BiocManager::install("miaTime") Once installed, `miaTime` is made available in the usual way. -```{r} +```{r, message = FALSE, warning = FALSE} #| label: load_package - library(miaTime) ``` @@ -86,7 +85,7 @@ number of readily available Load example data: -```{r} +```{r, message = FALSE, warning = FALSE} #| label: lubridate # Load packages @@ -175,7 +174,7 @@ sampling location, ...). Add time point rank per subject. -```{r} +```{r, message = FALSE, warning = FALSE} #| label: rank_for_subject library(dplyr) diff --git a/vignettes/articles/minimalgut.Rmd b/vignettes/articles/minimalgut.Rmd index bee4822..5f8169c 100644 --- a/vignettes/articles/minimalgut.Rmd +++ b/vignettes/articles/minimalgut.Rmd @@ -35,9 +35,8 @@ Dense samples of the minimal gut microbiome. In the initial hours, MDb-MM was grown under batch condition and 24 h onwards, continuous feeding of media with pulse feeding cycles. This information is stored in the `colData`. -```{r} +```{r, message = FALSE, warning = FALSE} #| label: sample_table - library(miaTime) data(minimalgut) @@ -50,7 +49,7 @@ table(tse[["StudyIdentifier"]], tse[["condition_1"]]) Visualize samples available for each of the bioreactors. This allows to identify if there are any missing samples for specific times. -```{r} +```{r, message = FALSE, warning = FALSE} #| label: show_timepoints library(ggplot2) @@ -68,7 +67,7 @@ The `minimalgut` dataset, mucus-diet based minimal microbiome can investigate the succession of mdbMM16 from the start of experiment here hour zero until the end of the experiment. -```{r} +```{r, message = FALSE, warning = FALSE} #| label: calculate_divergence # Transform data to relativeS @@ -85,7 +84,7 @@ tse <- addBaselineDivergence( Let's then visualize the divergence. -```{r} +```{r, message = FALSE, warning = FALSE} #| label: show_divergence library(scater) @@ -103,7 +102,7 @@ p Now visualize abundance of _Blautia hydrogenotrophica_ using the `miaViz::plotSeries()` function. -```{r} +```{r, message = FALSE, warning = FALSE} #| label: plot_series library(miaViz) @@ -122,7 +121,7 @@ Sample dissimilarity between consecutive time steps(step size n >= 1) within a group(subject, age, reaction chamber, etc.) can be calculated by `addStepwiseDivergence`. -```{r} +```{r, message = FALSE, warning = FALSE} #| label: stepwise_divergence # Divergence between consecutive time points @@ -142,7 +141,7 @@ The results are again stored in `colData`. We calculate the speed of divergence change by dividing each divergence change by the corresponding change in time. Then we use similar plotting methods as previously. -```{r} +```{r, message = FALSE, warning = FALSE} #| label: show_stepwise # Calculate slope for the change @@ -166,7 +165,7 @@ p This shows how to calculate and plot moving average for the variable of interest (here: slope). -```{r} +```{r, message = FALSE, warning = FALSE} #| label: moving_average library(dplyr) @@ -194,7 +193,7 @@ tse[["sliding_divergence"]] <- colData(tse) |> After calculating the moving average of divergences, we can visualize the result in a similar way to our previous approach. -```{r} +```{r, message = FALSE, warning = FALSE} #| label: show_moving_average # Create a time series plot for divergence