Skip to content

Files

Latest commit

0c78bc8 · Jan 24, 2023

History

History

tutorial

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Jan 24, 2023
Jan 24, 2023
Jan 24, 2023

In this tutorial, we would like to demonstrate how the q2-mOTUs fits into the QIIME 2 framework. We will use the study PRJEB52147 and its metadata from Qiita ID 13241. The article is published in Scientific Reports.

Importing data

First, we import the quality-controlled metagenomic sequencing data similarly as we do it for test data using Manifest file and qiime tools import. An example might be found in q2_motus/tests/data/paired folder. Artifact was not uploaded to GitHub due to a large filesize.

Profiling metagenomic samples

qiime motus profile \
--i-samples artifacts/study-seqs.qza \
--p-threads 8 \
--o-table artifacts/motu-table.qza \
--o-taxonomy artifacts/motu-taxonomy.qza

Importing precomputed mOTUs tables

Attention: precomupted mOTU table should be generated from full taxonomy -q flag and counts -c flag profiles.

qiime motus import-table \
--i-motus-table $TMPDIR/merged.motus \
--o-table artifacts/motu-table.qza \
--o-taxonomy artifacts/motu-taxonomy.qza

Exploratory analysis

Now, we make a summary of the FeatureTable[Frequency] artifact motu-table.qza.

qiime feature-table summarize \
--i-table artifacts/motu-table.qza \
--o-visualization visualizations/motu-table-summary.qzv

motu-table-summary.qzv

Creating a distance matrix

We will create a PCoA using Bray-Curtis distance metric for our samples to get an overview of samples First, let's create a DistanceMatrix artifact using qiime diversity beta command.

qiime diversity beta --i-table artifacts/motu-table.qza \
--p-metric braycurtis \
--o-distance-matrix artifacts/bc-distances.qza

Calculating PCoA

Then, let's calculate PCoA using qiime diversity pcoa command.

qiime diversity pcoa \
--i-distance-matrix artifacts/bc-distances.qza \
--o-pcoa artifacts/bc-pcoa.qza

Visualizing results

And visualize results using Emperor.

qiime emperor plot --i-pcoa artifacts/bc-pcoa.qza \
--m-metadata-file artifacts/PRJEB52147_metadata.qza \
--o-visualization visualizations/bc-emperor.qzv

bc-emperor.qzv

We might see, that different sample types cluster together. We will filter only samples for feces.

qiime feature-table filter-samples \
--i-table artifacts/motu-table.qza \
--m-metadata-file artifacts/PRJEB52147_metadata.qza \
--p-where "[sample_type]='feces'" \
--o-filtered-table artifacts/motu-table-feces.qza

Taxnonomy visualization

Now, we'll create visualizations of out taxonomical profiles using taxa barplot.

qiime taxa barplot \
--i-table artifacts/motu-table-feces.qza \
--i-taxonomy artifacts/motu-taxonomy.qza \
--m-metadata-file artifacts/PRJEB52147_metadata.qza \
--o-visualization visualizations/motu-taxa-barplot-feces.qzv

motu-taxa-barplot-feces.qzv

Then, we'll make a Krona plot, which allows us an interactive exploration of the taxonomic composition of samples.

qiime krona collapse-and-plot \
--i-table artifacts/motu-table-feces.qza \
--i-taxonomy artifacts/motu-taxonomy.qza \
--o-krona-plot visualizations/motu-krona-feces.qzv

motu-krona-feces.qzv

Hypothesis testing

We will test if maternal asthma has a significant influence on fecal microbiome composition using Bray-Curtis distance metric.

Creating a distance matrix

qiime diversity beta \
--i-table artifacts/motu-table-feces.qza \
--p-metric braycurtis \
--o-distance-matrix artifacts/bc-distances-feces.qza

Conducting a test

qiime diversity beta-group-significance \
--i-distance-matrix artifacts/bc-distances-feces.qza \
--m-metadata-file artifacts/PRJEB52147_metadata.qza \
--m-metadata-column diagnosis \
--o-visualization visualizations/bc-distances-feces-diagnosis.qzv

bc-distances-feces-diagnosis.qzv

Differential abundance testing

Adding pseudocount

We will see which taxa are differentially abundant between feces and meconium samples using ANCOM method. First, we will collapse our table to the mOTUs level. We do not advise usage of mOTUs on any other taxonomical level, as this is a separate concept and taxonomy is only an approximation of the relationship between mOTUs and classical taxonomy.

qiime taxa collapse \
--i-table artifacts/motu-table.qza \
--i-taxonomy artifacts/motu-taxonomy.qza \
--p-level 7 \
--o-collapsed-table artifacts/motu-table-motus.qza

ANCOM is a compositional data analysis method, that cannot work with zeros. We will add a pseudocount of 1 and create a FeatureTable[Composition] artifact.

qiime composition add-pseudocount \
--i-table artifacts/motu-table-motus.qza \
--p-pseudocount 1 \
--o-composition-table artifacts/motu-table-motus-ancom.qza

Conducting a test

Then, we will run ANCOM using qiime composition ancom command.

qiime composition ancom \
--i-table artifacts/motu-table-genus-ancom.qza \
--m-metadata-file artifacts/PRJEB52147_metadata.qza \
--m-metadata-column sample_type \
--o-visualization visualizations/motu-table-ancom.qzv

motu-table-ancom.qzv

Conclusions

q2-mOTUs plugin allows taxonomical profiling of metagenomic sequencing data. We demonstrated, that its output can be used for robust downstream analysis in QIIME2, thus complementing already existing software.