Taxonomic Classification Percentages


I have completed the taxonomic analysis portion from the “Moving Pictures” tutorial with my own data and have produced a taxonomy.qzv file from which I downloaded a .tsv file version. I am able to see the taxonomy classifications of each normalized individual sample (seq/OTU), but I wanted to know if there was a way to organize that data to show the percentage present of each kingdom or phylum for each group of samples (my sample groups are labeled L1-L20, so 20 individual sample groups).

Thank you for your help in advance.

see collapse.

you can also group samples by metadata column(s) before collapse to see average taxonomic compositions across groups (which is what it sounds like you are going for).

I hope that helps!

Hi Nicholas,

First, thank you for the response! I tried to group my data, like you mentioned but I ran into an issue where I am unable to group the feature table by the SampleID.

The command I used was:
qiime feature-table group
–i-table table1.qza
–p-axis sample
–m-metadata-file pyrosequencing-metadata.tsv
–m-metadata-column SampleID
–p-mode sum
–o-grouped-table grouped table.qza

I then received an error stating:
“There was an issue with retrieving column ‘SampleID’ from the metadata:
‘SampleID’ is not a column in the metadata. Available columns: ‘BarcodeSequence’, …”

I realize that qiime does not recognize the SampleID’s as a separat column entity, but my goal is to see the overall breakdown from each sample ID in terms of taxonomy. So for example, how many samples in my sample ID group L1 are in the Proteobacteria phylum and the Actinobacteria phylum and so on and so forth, all the way to L20. I said kingdom and phylum in the initial post, but I meant I want to do this for phylum and class. I hope this clears up exactly what issue I’m having. Do you still recommend that I utilize the group and collapse function as you have mentioned, and if so, how do I circumvent the issue that came up when I ran the command, so that I may group by sample ID’s?

Again thank you very much for all your time and assistance.

Hi @spark,
SampleID should be unique for each sample… so grouping on SampleID does not make sense. If you have another metadata column that contains values shared across multiple samples, group on that column. If not, it sounds like you maybe just want to collapse, or use taxa barplot to look at the taxonomic composition of individual samples.

I believe there is a bit of a misunderstanding as to what I meant by grouping based on sample ID. The sample ID’s I am referring to, are the samples that were sent in for sequencing, and the ‘samples’ with the sample ID groups I keep referring to (the 814 DNA sequences/different OTU’s that resulted from the sequencing of all the different samples [sample ID’s] , in my case) are the ones that were taxonomical categorized. I want to know if there is a way to group the samples (OTU’s) (with their taxonomy categorizations) per sample ID and have that in a .tsv file format which I can then further process in qiime2 to find out how many of a specific phylum, class, order, and etc. are present within each of the samples [sample ID’s]. Hopefully this cleared up what I meant, and in that case, would I still proceed with trying to collapse the taxonomy?

Thank you.

Okay, I think I am confused because it sounds like you are referring to both samples (the individual samples sent in for sequencing) and features (the OTUs/ASVs that were detected in each sample) as “samples”.

It sounds like you just want to use collapse, not group. Collapse will collapse features (e.g., OTUs, ASVs) that share the same taxonomy assignment.

qiime taxa barplot will also give you a visaulization of the taxonomic composition in each sample.

1 Like

I apologize for the incorrect use of the terminology and the confusion. Thank you for clarifying, I will be sure to use the proper terminology in the future to prevent any misunderstanding.

I used the collapse function as you mentioned and I believe it is exactly what I am looking for.

Thank you for all your assistance as well as your patience.

1 Like

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