Hi, I am quite new to use QIIME. I combined 4 groups of samples together to start the analysis. After assign taxonomy, I tried to separate them by "WWTP" using below command.
qiime feature-table group --i-table table.qza --p-axis sample --p-mode sum --m-metadata-file samples-id.txt --m-metadata-column WWTP --o-grouped-table table_WWTP.qza
Then I re-run the assign taxonomy as below,
qiime taxa barplot --i-table table_WWTP.qza --i-taxonomy taxonomy.qza --m-metadata-file samples-id.txt --o-visualization taxa-bar-plots_WWTP.qzv --verbose
The error shows as below:
Plugin error from taxa:
Sample IDs found in the table are missing in the metadata: {'H', 'A', 'P', 'Q'}.
See above for debug info.
It seems after separating, the metadata file was not recognized properly.
Hello and welcome to the forum.
To create a taxonomy barplot with grouped table one need to create a new metadata file with group names as sample id's.
Thanks, I tried to create a new metadata file as attached one. I put the group name as SampleID(A, H,P,Q). As each group has many samples, there are many duplicates of A, H, P, Q in SampleID. It raises another error saying that Metada IDs must be unique. Could you please advise the format of the new metadata file?
That's right - in collapsed table, each group treated as one "sample", not a group of samples. So, your new metadata should have only one ID per group. Just remove all the duplicates from this new metadata - it needed only for creation of a barplot.