-
Notifications
You must be signed in to change notification settings - Fork 205
QIIME 2 de novo tree creation
These commands are based on QIIME 2 tutorials and are on this page simply for convenience.
We'll need to make a multiple-sequence alignment of the ASVs before running FastTree. First, we'll make a folder for the output files.
mkdir tree_out
We'll use MAFFT to make a de novo multiple-sequence alignment of the ASVs.
qiime alignment mafft --i-sequences deblur_output/rep_seqs_final.qza \
--p-n-threads 1 \
--o-alignment tree_out/rep_seqs_final_aligned.qza
Variable positions in the alignment need to be masked before FastTree is run, which can be done with this command:
qiime alignment mask --i-alignment tree_out/rep_seqs_final_aligned.qza \
--o-masked-alignment tree_out/rep_seqs_final_aligned_masked.qza
Finally FastTree can be run on this masked multiple-sequence alignment:
qiime phylogeny fasttree --i-alignment tree_out/rep_seqs_final_aligned_masked.qza \
--p-n-threads 1 \
--o-tree tree_out/rep_seqs_final_aligned_masked_tree
FastTree returns an unrooted tree. One basic way to add a root to a tree is to add it add it at the midpoint of the largest tip-to-tip distance in the tree, which is done with this command:
qiime phylogeny midpoint-root --i-tree tree_out/rep_seqs_final_aligned_masked_tree.qza \
--o-rooted-tree tree_out/rep_seqs_final_aligned_masked_tree_rooted.qza
To keep this output filename consistent with the SOP you can simply make a copy of this output tree.
cp tree_out/rep_seqs_final_aligned_masked_tree_rooted.qza asvs-tree.qza
- Please feel free to post a question on the Microbiome Helper google group if you have any issues.
- General comments or inquires about Microbiome Helper can be sent to morgan.langille@dal.ca.
Useful Links
Main SOPs
Amplicon SOP v2 (virtual box workflow)
Amplicon SOP v2 (qiime2-2022.11)
Amplicon SOP v2 (qiime2-2024.5)
PacBio Amplicon SOP v2 (qiime2-2022.2)
Tutorials
- CBW 2024 Workshops
- CBW-IMPACTT-workshop-tutorials-2023
- Intro to Unix
- ICG workshop tutorials 2023
- IMPACTT workshop tutorials 2022
- PICRUSt2 (CBW 2021)
- Metagenomics (CBW 2021)
- Intro to GNU Parallel
- BIOC4010 16S Tutorial
- Metagenomics Tutorial (Humann2 based)
- Download From SRA
- Random Forest Tutorial in R
- Other Tutorials