merging my feature table with taxonomy table

Hi friends-
I have successfully used the ANML classifier (thanks Devon!) to classify arthropod DNA found in bird feces samples for my Master's project (rad!). Now I want to determine which OTUs were found in which samples. I think I can do this by merging my feature-table that I generated from denoising sequences in DADA2. Any help would be much appreciated. I am much more of a bird biologist than a bioinformatics buff- so all of this is really rather new to me.
Thank you!

Hello Kara,

Welcome to the forums! :qiime2:

You are making good progress! (Especially for a :bird: bio person!)

Can you tell us how you made your feature table? There are different ways to merge depending on if you have ASVs from DADA2 or old-school OTUs.

We can also dive deeper. Other than taxa in samples, what's your larger biological question?

You may have found these already, but if not, check out the detailed tutorials that show how to do lots of things with Qiime2. The pd-mice :mouse2: tutorial is especially useful because it also uses animal feces, just like your study.

Howdy Colin-
Thank you for the reply!
Ok- So I made my feature table using DADA2
#denoise- cut off where sequence quality drops below 30 (get cut points from above visualization)
qiime dada2 denoise-paired
--i-demultiplexed-seqs primertrimmed_Poop_eDNA_Demux.qza
--p-trunc-len-f 108
--p-trunc-len-r 108
--p-n-threads 0
--output-dir denoised_Poop_eDNA

So I suppose that I have ASVs from the output.
Here are some of the primary biological questions I am trying to answer:

1).Is diet (food availability) influenced by forest patch size/how fragmented the landscape is?
2.) Are parents selecting certain taxa to feed their young? (will be frequency of occurrence of taxa found in samples- vs frequency of occurrence from my arthropod surveys)

other questions I think would be interesting to consider:
-Are youngsters being fed different items in the first week of life vs the second?
-Was diet different in 2020 (drought year) vs 2021 (normal precipitation)?

Thank you for your help and the warm welcome.
I will look at the tutorial today!

Kara :feather:

OK! The DADA2 pipeline makes ASVs which can be merged after processing with this plugin: merge: Combine multiple tables — QIIME 2 2023.2.0 documentation

However, if you have a single sequencing run, all your data may already be in a single table and there is no need to merge.

Thank you for telling me more about your questions and how you plan to detect changes in diet using marker genes from the feces. Here are some of the comparisons I see:

  1. Do arthropods found in bird poop vary based on forest patch size?
  2. Do arthropods found in samples differ between bird poop and free living?
  3. Do arthropods found in bird poop vary based on the age of the host bird?
  4. Do arthropods found in bird poop vary based on year (and maybe rainfall in that year)?

The question 'how different are these two (or more!) groups of samples' is a measurement of beta diversity. The Emperor PCoA plots will show you which samples cluster, and you can see if one of your categories (forestSize, sampleType, age, year) explains this clustering.

If you see clustering, you can confirm its significance with the adonis test.

But I'm getting ahead of myself. See if you can get all the alpha and beta diversity examples working on the example :mouse2: then on your real :bird: and report back!

1 Like

Hi Colin-
Gosh- I am still not quite sure how to do this!

First things first- joining my taxonomy table and my biom. I have already converted both to tsv.

here are some lines I have already tried:

  1. From the plugin you recommended:
    qiime feature-table merge
    --i-tables classified_taxomony_Poop_eDNA.qza denoised_Poop_eDNA/table.qza
    --p-overlap-method error_on_overlapping_sample
    --o-merged-table merged-table.qza
    (for this one I was a little unsure of what overlap method to use- this is the error message I got:
    There was a problem with the command:
    (1/1) Invalid value for '--i-tables': received <FeatureData[Taxonomy],
    FeatureTable[Frequency]> as an argument, which is incompatible with
    parameter type: List[FeatureTable[Frequency]¹ |

  2. biom add-metadata
    --input-fp denoised_Poop_eDNA/sample_table/3b6011ca-fa8b-4ecc-a6c5-65408f3852ba/data/feature-table.biom
    --observation-metadata-fp classfiedclassified_taxomony_Poop_eDNA.qza
    --output-fp biom-with-taxonomy.biom

  3. biom add-metadata
    -i denoised_Poop_eDNA/sample_table/3b6011ca-fa8b-4ecc-a6c5-65408f3852ba/data/feature-table.biom
    -o table-with-taxonomy.biom
    --observation-metadata-fp classified_taxonomy_Poop_eDNA/data/taxonomy_merge.tsv
    --sc-separated taxonomy

However- no success!

Very grateful for your insight, Colin!


1 Like

Hello Kara,

The easiest way to do this is with qiime metadata tabulate

Check out this post: