This repository contains a complete QIIME2 workflow for analyzing microbiome data from paired-end sequencing.
- QIIME2 installed (recommended version: 2023.5 or later)
- Install DADA2 using conda(https://anaconda.org/qiime2/q2-dada2)
- Paired-end fastq.gz files in the
data/
directory - Properly formatted metadata file (
metadata.tsv
)
-
Activate QIIME2 environment:
conda activate qiime2-2023.5 # or your QIIME2 environment name
-
Prepare your data:
- Place all your fastq.gz files in the
data/
directory - Files should be named with the pattern:
SAMPLEID_1.fastq.gz
andSAMPLEID_2.fastq.gz
- Update the
metadata.tsv
file with your sample information
- Place all your fastq.gz files in the
-
Run the workflow:
bash qiime2_workflow.sh
- Data Import: Imports paired-end fastq.gz files using a manifest file
- Quality Control: Uses DADA2 for denoising, chimera removal, and ASV identification
- Phylogenetic Analysis: Builds a phylogenetic tree for diversity analyses
- Taxonomic Classification: Assigns taxonomy using the Silva 138 classifier
- Diversity Analysis: Calculates alpha and beta diversity metrics
- Statistical Tests: Performs statistical tests on diversity metrics based on metadata categories
All output files are stored in the qiime2_output/
directory:
qiime2_output/table.qza
: Feature table (ASV counts)qiime2_output/rep-seqs.qza
: Representative sequencesqiime2_output/taxonomy.qza
: Taxonomic classificationsqiime2_output/rooted-tree.qza
: Phylogenetic treeqiime2_output/diversity/
: Directory containing diversity metrics
Visualizations are stored in qiime2_output/visualizations/
:
demux-paired-end.qzv
: Quality plots for raw sequencestable.qzv
: Feature table summaryrep-seqs.qzv
: Representative sequencestaxonomy.qzv
: Taxonomy summarytaxa-bar-plots.qzv
: Taxonomic bar plotsalpha-rarefaction.qzv
: Rarefaction curves- Various alpha and beta diversity visualizations
- Rarefaction Curves: Check if curves plateau to ensure sufficient sequencing depth
- Alpha Diversity: Compare diversity metrics across groups using statistical tests
- Beta Diversity: Examine community composition differences between groups using PERMANOVA tests
- If the script fails at any step, check the error message for details
- Ensure QIIME2 is properly installed and activated
- Verify that your metadata file is properly formatted
- Check that your fastq.gz files follow the expected naming pattern
You can modify the following parameters in the script:
- DADA2 trimming parameters (trim-left-f, trim-left-r, trunc-len-f, trunc-len-r)
- Sampling depth for diversity analyses
- Taxonomic classifier