---
title: More on phyloseq and ggplot2
tags: R, phyloseq
description: View the slide with "Slide Mode".
---
---
## Some Background on ggplot <img src=https://hackmd.io/_uploads/H1uww4K5n.png width="50" height="50">
At this point in the program, we have had some experience using ggplot in our previous tutorials. However, we haven't gone over what ggplot is and why are we using it.
- `ggplot2`, commonly referred to simply as ggplot, is an R package used to create visually appealing, highly tailorable plots, graphs and charts.
- It can be installed into R independently or it can used as a component of `tidyverse` package.
---
## Highlights of using ggplot <img src=https://hackmd.io/_uploads/H1uww4K5n.png width="50" height="50">
ggplot is a popular and commonly used package among many researchers, but why? Some reasons for ggplot's popularity include:
* customization
* labels
* elements aesthetics(color, shape, size and, etc.)
* themes
* layering
* consistent synthax
* continous development
* free! . . . ahem, I mean open source :smiling_face_with_smiling_eyes_and_hand_covering_mouth:
---
## Some Background on Phyloseq <img src=https://hackmd.io/_uploads/ryU3ZBFc3.png width="50" height="50">
Phyloseq is an R package for microbiome data analysis.
* It allows for the to exploration and analysis of high-throughput sequencing data, such as 16S rRNA amplicon or metagenomic data.
* With Phyloseq, researchers can efficiently process, visualize, and interpret complex microbial community data.
* It can be installed into R as a part of the BiocManager package or indepentdently
----
## Functions of Phyloseq <img src=https://hackmd.io/_uploads/ryU3ZBFc3.png width="50" height="50">
Phyloseq was specifically designed for the handling of microbiome data. Many of phyloseq's features makes it easier to work with microbiome data in comparison to base R. Some of these features include:
* data import
* phyloseq is able to import data from a variety of formats(ex. qiime, mothur, etc.)
* diversity analysis and plotting
* phyloseq contains tools that allows for computing alpha and beta diversity metrics
* data representation
* phyloseq stores data in a comprehensive "phyloseq-class" object, integrating taxonomic abundance, sample metadata, and phylogenetic information.
---
## Highlights Phyloseq <img src=https://hackmd.io/_uploads/ryU3ZBFc3.png width="50" height="50">
Some of the reasons phyloseq is popular among those who work with microbial community data are due to a few important features including, but not limited to:
* flexible with microbiome data types and formats
* integrable with other R packages (ex.ggplot2, vegan,etc.)
* continous development
* open source = free! :smile:
We will have more opportunities to practice with ggplot and phyloseq in with today's tutorials :muscle:
---
## Get started!
I'll be discussing this summary before we head into tutorial for the day: [https://hackmd.io/4Zpa35WESgG72gi325AbWw?view](https://hackmd.io/4Zpa35WESgG72gi325AbWw?view)
Please download these files, and drag them into your intro_R folder from yesterday
more functions: [https://github.com/mblstamps/stamps2023/blob/main/day1/intro_R/07-bonus_functions.Rmd](https://github.com/mblstamps/stamps2023/blob/main/day1/intro_R/07-bonus_functions.Rmd)
phyloseq: [https://github.com/mblstamps/stamps2023/blob/main/day1/intro_R/05-phyloseq.Rmd](https://github.com/mblstamps/stamps2023/blob/main/day1/intro_R/05-phyloseq.Rmd)
ggplot:[https://github.com/mblstamps/stamps2023/blob/main/day1/intro_R/06-ggplot.Rmd](https://github.com/mblstamps/stamps2023/blob/main/day1/intro_R/05-phyloseq.Rmd)