How to merge replicate samples in taxonomy-bar

Hi there, i am new to qiime2,and i just fund a problem in my analysis is that when i runing my Taxonomic analysis, i couldn't not merge my three biological duplicates,as the picture shows


this could make the interpretation of the result difficult (wild animal gut),i was want to asking that if there is any way to merge biological duplicates as follow

this is also three biological duplicates but has been merge as one (same data)
thanks you very much!
chen

Hi!

  1. Create a new (if you don't have it already) column in your metadata, for example, named 'Group' and provide a name for each group of samples, that you want to merge in barplot.

  2. Create a new metadata file, for example, named metadata_grouped.tsv, in which in the Sample-ID column instead of ID's of individual samples you will have the names of your groups of samples. Now you are treating this group as one sample for taxa barplot. This metadata will oontain less rows, than original metadata, because now you have groupes of samples.

  3. Collapse your table according "Group" column in your original metadata:

    qiime feature-table group \
       --i-table table.qza \
       --p-axis 'sample' \
       --m-metadata-file metadata.tsv \
       --m-metadata-column "Group" \
       --p-mode 'mean-ceiling' \
       --o-grouped-table table_grouped.qza
    
  4. Create a new barplot with grouped metadata and table:

     qiime taxa barplot \
       --i-table table_grouped.qza \
       --i-taxonomy taxonomy.qza \
       --m-metadata-file metadata_grouped.tsv \
       --o-visualization taxa-barplot_grouped.qzv
4 Likes

thanks you so much! the problem has been solved!

1 Like

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