Generating separate taxonomy lists for each of my experimental groups?

Hi everyone! I’m pretty new to qiime2. I’m analyzing mouse fecal samples to compare a disease state to wild type. I’ve run through everything from the Moving Pictures tutorial and it all went fine, but now I’m trying to figure out how to do something additional. Basically, I want to generate a list of the bacterial species found in the wild type group, and a list of species found in the disease group. My eventual goal is to compare the lists to see which species are present in wild type but not in mice with the particular disease.

I looked around this forum and saw a suggestion for using “qiime feature-table filter-samples” and then using the --p-where parameter to create a feature table with the wild type group and a separate one for the disease group. Here’s the specific command I ran (file names have been altered to maintain privacy, but hopefully you’ll get the idea!):

qiime feature-table filter-samples
–i-table table.qza
–m-metadata-file metadata.txt
–p-where “[disease-WT] = ‘WT’”
–o-filtered-table WT_species.qza

I did this for both groups (WT and disease) and it worked okay. But now that I have these filtered tables, I have no idea where to go from here. I went back to the Moving Pictures tutorial but it looks like to do any of the taxonomic analysis I’d need to almost start back at the beginning (deblur step), and I wasn’t sure how I would even do that? I have no problem with doing it if it’s correct, but it seemed a little strange so I wanted to check. I fear that I’m totally off-base and there’s something else I should be doing instead.

So how would you recommend going about generating these separate species lists? I plan to use Python to actually compare the lists (unless qiime2 has an easy way to do it) but would really appreciate advice on where to go from here.

Thank you!

1 Like

Hi!
I am pretty sure that there are several ways to achieve your goal.
I will describe as I did, but it is only one option and you are welcome to try something else.
So, you have two tables, one for WT, and second for mouses with a disease. Each of them you can collapse to taxonomy level:

qiime taxa collapse \
    --i-table WT_table.qza\
    --i-taxonomy taxonomy.qza \
    --p-level 7 \
    --o-collapsed-table WT_collapsed_table.qza

Now you will have 4 tables, by two (collapsed and with ASVs) for a group. Again, for each of the tables you can run:

qiime feature-table core-features \
    --i-table WT_collapsed_table.qza \
    --o-visualization WT_collapsed_core.qzv

In the result, you will have four core.qzv files, in which you can find the tables of core features (on taxonomy or ASV level) for each group.
There will be a tables of features, shared between 100% of samples in group, 95%, 90% and so on to 50%. You can choose any of them.
I prefer to perform it for both (taxonomy and ASV levels) because there may be a cases, for example, when you have a Pseudomonas in both of your groups, but actually it is different ASVs.
To compare both groups, you also may want to use Venn diagrams
https://bioinfogp.cnb.csic.es/tools/venny/
or
http://www.interactivenn.net/index.html
or use list intersections.
So you can obtain features, shared between groups and unique features for each group.

If you want all the features, even if they were found from one sample in the group (not the best option, IMHO), you can import a collapsed or ASV table to biom and convert it to .tsv table.

2 Likes

This was exactly what I needed! Thank you so much for your help!

A post was split to a new topic: all features are unclassified

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.