10. Construct a Phylogeny - DianaCarolinaVergara/16S-rRNA-Analysis GitHub Wiki

Phylogenetic Analysis

Phylogenetics

There are a number of diversity metrics like unifrac distance that require the construction of a phylogenetic tree.

Examples of phylogenetic trees analysis:

Fig 1. The neighbor-joining phylogenetic tree was based on partial BenA gene sequences. And with colors the relative abundances.

Fig 2. A proposal for a new taxonomic classification of bacteria based on their genetic characteristics

Multiple sequence alignment

First Mafft time qiime alignment mafft is used to align the sequences. Input is the .qza file produced in the dada2 filter step.

And as the output --o-alignment we obtained the alignments of all sequences.

time qiime alignment mafft \
  --i-sequences rep-seqs-dada2.qza \
  --o-alignment aligned-rep-seqs.qza

Masking sites

Some sites in the alignment are not phylogenetically informative. These sites are masked.

time qiime alignment mask \
  --i-alignment aligned-rep-seqs.qza \
  --o-masked-alignment masked-aligned-rep-seqs.qza

Creating a Tree

time qiime phylogeny fasttree \
  --i-alignment masked-aligned-rep-seqs.qza \
  --o-tree unrooted-tree.qza
  --o-visualization unrooted-tree.qzv

Download the unrooted-tree.qzv file and open it in iTOL <https://itol.embl.de/>

OPTIONAL

Midpoint rooting

Fastree creates an unrooted tree. We can root the tree at itโ€™s midpoint with this command time qiime phylogeny midpoint-root:

The input is the previous unrooted-tree.qza

And the output --o-rooted-tree would be the midpoint rooted tree

time qiime phylogeny midpoint-root \
  --i-tree unrooted-tree.qza \
  --o-rooted-tree rooted-tree.qza

time qiime alignment mafft \
  --i-sequences taxonomy.qza \
  --o-alignment aligned-rep-seqs.qza