-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMiscMetabar.Rmd
80 lines (55 loc) · 2.86 KB
/
MiscMetabar.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
---
title: "Introduction"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Introduction}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
message = FALSE
)
```
# Introduction to MiscMetabar: an R package to facilitate visualization and reproducibility in metabarcoding analysis
## Raison d'être
- Complete R packages dada2 and phyloseq
- Useful visualizations (`biplot_pq`, `circle_pq`, `upset_pq`, `ggvenn_pq`)
- Facilitate the use of targets package
## Quick overview
For an introduction to metabarcoding in R, Please visite the [state of the field](https://adrientaudiere.github.io/MiscMetabar/articles/states_of_fields_in_R.html) vignettes. The [import, export and track](https://adrientaudiere.github.io/MiscMetabar/articles/import_export_track.html) vignette explains how import and export `phyloseq` object. Its also show how to summarize useful information (number of sequences, samples and clusters) accross bioinformatic pipelines.
If you are interested in ecological metrics, see the vignettes describing [alpha-diversity](https://adrientaudiere.github.io/MiscMetabar/articles/alpha-div.html) and [beta-diversity](https://adrientaudiere.github.io/MiscMetabar/articles/beta-div.html) analysis.
The vignette [filter taxa and samples](https://adrientaudiere.github.io/MiscMetabar/articles/filter.html) describes some data-filtering processes using MiscMetabar and the [reclustering](https://adrientaudiere.github.io/MiscMetabar/articles/Reclustering.html) tutorial introduces the different way of clustering already-clustered OTU/ASV. The vignette [tengeler](https://adrientaudiere.github.io/MiscMetabar/articles/tengeler.html) explore the dataset from Tengeler et al. (2020) using some MiscMetabar functions.
For developers, I also wrote a vignette describing som [rules of codes](https://adrientaudiere.github.io/MiscMetabar/articles/Rules.html).
### Summarize a physeq object
```{r example}
library("MiscMetabar")
library("phyloseq")
data("data_fungi")
summary_plot_pq(data_fungi)
```
### Create an interactive table of the tax_table
```{r results="asis"}
data("GlobalPatterns", package = "phyloseq")
tax_datatable(subset_taxa(
GlobalPatterns,
rowSums(GlobalPatterns@otu_table) > 100000
))
```
### Sankey diagram of the tax_table
```{r}
gp <- subset_taxa(GlobalPatterns, GlobalPatterns@tax_table[, 1] == "Archaea")
sankey_pq(gp, taxa = c(1:5))
```
### Upset plot for visualize distribution of taxa in function of samples variables
```{r}
upset_pq(gp, "SampleType", taxa = "Class")
```
# References
Tengeler, A.C., Dam, S.A., Wiesmann, M. et al. Gut microbiota from persons with attention-deficit/hyperactivity disorder affects the brain in mice. Microbiome 8, 44 (2020). <https://doi.org/10.1186/s40168-020-00816-x>
# Session inform
```{r}
sessionInfo()
```