Skip to content

Commit

Permalink
taxonomie plots en Venn diagrammen op basis van data gecorrigeerd voo…
Browse files Browse the repository at this point in the history
…r aantal reads per staal, anders is denk ik bijvoorbeeld gedeelde en unieke OTUs per landgebruik, taxonomie, etc niet vergelijkbaar
  • Loading branch information
slambrechts committed Feb 12, 2024
1 parent 6a8a5f6 commit e034004
Showing 1 changed file with 21 additions and 7 deletions.
28 changes: 21 additions & 7 deletions source/rmarkdown/annelida_data_analyse.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,24 @@ veganobject <- psotu2veg(physeq)

```{r convert-tidytacos}
tidy_physeq <- tidytacos::from_phyloseq(physeq)
tidy_physeq_rarefied <- tidytacos::from_phyloseq(physeq_rarefied)
tidy_physeq <- tidy_physeq %>%
remove_empty_samples() %>%
tidytacos::set_rank_names(
rank_names = c("phylum", "class", "order", "family", "genus", "species")
) %>%
tidytacos::add_alpha() %>%
tidytacos::add_total_count()
tidy_physeq_rarefied <- tidy_physeq_rarefied %>%
remove_empty_samples() %>%
tidytacos::set_rank_names(
rank_names = c("phylum", "class", "order", "family", "genus", "species")
) %>%
tidytacos::add_alpha() %>%
tidytacos::add_total_count()
```


Expand Down Expand Up @@ -192,41 +203,44 @@ tidy_physeq$samples %>%
## OTU tabel

```{r verken-otu-data}
glimpse(otu_table(physeq) %>% as.data.frame %>% as_tibble())
physeq_rarefied <- rarefy_even_depth(physeq, sample.size = 30780)
glimpse(otu_table(physeq_rarefied) %>% as.data.frame %>% as_tibble())
```

## Taxonomie tabel

```{r verken-taxonomie-data}
glimpse(tax_table(physeq) %>% as.data.frame %>% as_tibble())
glimpse(tax_table(physeq_rarefied) %>% as.data.frame %>% as_tibble())
```

Unieke en gedeelde taxa per diepte:

```{r}
tidy_physeq %>%
tidy_physeq_rarefied %>%
tidytacos::tacoplot_venn(Diepte)
```

Unieke en gedeelde taxa per landgebruik:

```{r}
tidy_physeq %>%
tidy_physeq_rarefied %>%
tidytacos::tacoplot_venn(Landgebruik_MBAG)
```

```{r}
tidy_physeq %>%
tidy_physeq_rarefied %>%
tidytacos::tacoplot_stack()
```

```{r}
tidy_physeq %>%
tidy_physeq_rarefied %>%
tidytacos::tacoplot_stack(x = Landgebruik_MBAG)
```

```{r}
tidy_physeq %>%
tidy_physeq_rarefied %>%
tidytacos::tacoplot_stack(x = Diepte)
```

Expand Down

0 comments on commit e034004

Please sign in to comment.