Hi @Rachel05,
Sure. So, Im going to assume that we’re starting with a feature table from both projects (feature-table.qza
), a rep-set from both projects (rep-set.qza
) and a mapping file (map.tsv
). I’m also going to assume that in the map there’s a column I’ll call project with two values, “a” and “b”.
Okay, so the first step I’d do is to do taxonomic classification on all the samples. I happen to like naive baysian classification, so that’s what I’ll show here with my classifier, classifier.qza
(but sub in your favorite taxonomic classification approach)
qiime feature-classifier classify-sklearn \
--i-classifier classifier.qza \
--i-reads rep-seqs.qza \
--o-classification taxonomy.qza
Now, I’ll also build my tree using all my sequences because I think this is a fundamental step in analysis too! My favorite is fragment insertion because I like reference based techniques, so I’ll show that. Again, pick your favorite tree building method.
qiime fragment-insertion sepp \
--i-representative-sequences rep_set.qza \
--i-reference-database sepp-refs-gg-13-8.qza \
--o-tree ./tree.qza \
--o-placements ./tree_placements.qza \
--p-threads 1
So, now I have taxonomy in taxonomy.qza
and a tree in tree.qza
. I’ve only had to do the classification and building once. Now, I separate my samples:
qiime feature-table filter-samples \
--i-table table.qza \
--m-metadata map.tsv \
--p-where "project='a'"
--o-filtered-table project-a.qza
qiime feature-table filter-samples \
--i-table table.qza \
--m-metadata map.tsv \
--p-where "project='b'"
--o-filtered-table project-b.qza
At this point, I would throw my tables and tree into core diversity (or just distance calculation, YMMV). I like a rarefaction depth for 5000 for this data, so I’m going to use that. (You should of course check for your rarefaction depth by summarizing your feature table.)
qiime diversity core-metrics-phylogenetic \
--i-phylogeny tree.qza \
--i-table table.qza \
--p-sampling-depth 5000 \
--m-metadata-file map.tsv \
--output-dir core-metrics-a
These full trees and taxonomy will work as long as you stay within the qiime 2 enviroment. If you chose to go to R or python, you may need to filter there. (But check the threads).
Best,
Justine