Skip to content

Commit

Permalink
update microviz
Browse files Browse the repository at this point in the history
  • Loading branch information
SilasK committed Aug 30, 2023
1 parent c8d8ba6 commit 5e69b86
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
12 changes: 6 additions & 6 deletions R/Human_example.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ Atlas output files from version 2.17 are stored in the `DiarrheaExample` folder.
```{r}
data_dir <- "../DiarrheaExample/"
atlas_version <- "v2.17"
Expand Down Expand Up @@ -369,18 +371,16 @@ By default this compares the HC vs acute diarreha and md vs accute diarrhea.
```{r}
lm_models <- pseq %>%
tax_agg(rank = "species") %>%
tax_prepend_ranks() %>%
# tax_agg(rank = "species") %>%
# tax_prepend_ranks() %>%
# Filtering
tax_filter(min_prevalence = 0.1, undetected = 0, use_counts = FALSE) %>%
tax_transform(
trans = "clr", chain = TRUE, zero_replace = "halfmin",rank="species"
) %>%
taxatree_models(
type = lm,
trans = "clr", trans_args = list(zero_replace = "halfmin"),
ranks = NULL,# uses every rank available except the first
variables = c(group_variable),
#use_future =TRUE # paralellize
use_future =TRUE # paralellize
)
Expand Down
8 changes: 3 additions & 5 deletions R/Mouse_example.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -339,15 +339,13 @@ Use linear models on CLR transformed data on all taxonimic levels.

```{r}
lm_models <- pseq %>%
tax_agg(rank = "species") %>%
tax_prepend_ranks() %>%
# tax_agg(rank = "species") %>%
# tax_prepend_ranks() %>%
# Filtering
tax_filter(min_prevalence = 0.1, undetected = 0, use_counts = FALSE) %>%
tax_transform(
trans = "clr", chain = TRUE, zero_replace = "halfmin", rank = "species"
) %>%
taxatree_models(
type = lm,
trans = "clr", trans_args = list(zero_replace = "halfmin"),
ranks = NULL, # uses every rank available except the first
variables = c(group_variable),
# use_future =TRUE # paralellize
Expand Down

0 comments on commit 5e69b86

Please sign in to comment.