Error prompt: all values the 'grouping' are the same

Hello everyone. I am a qiime2 beginner. When I was processing a batch of data, the front run was very smooth. However, there are always errors when running to the final diversity abundance analysis.

The command I entered is like this:

time qiime feature-table filter-samples
–i-table table.qza --m-metadata-file metadata.txt "
–p-where “[salt]=‘low’”
–o-filtered-table low- table.qza

time qiime composition add-pseudocount
–i-table low- table.qza "
–o-composition-table comp-low- table.qza

time qiime composition ancom
–i-table comp-low- table.qza "
–m-metadata-file metadata.txt "
–m-metadata-column salt
–o-visualization ancom- salt.qzv

The. qza file of the first two commands can be output successfully, but when the third command is run, there will always be an error:

All values the grouping are the same. This method cannot operate on a grouping vector with only a single group of samples(e.g., there are no ‘between’ variance because there is only a single group).

I don’t know where the problem is. I have revised it several times and the same situation has appeared. I hope you can help me. Thank you very much.

1 Like

Hey there @LiyingXie!


ANCOM needs more than one "group" of things in order to compare the effects of the group compositions. For example, check out the Moving Pictures tutorial:

In that section, we compare samples from the gut, for two different subjects.

In your commands you shared above, you are filtering to only "low" salt samples (which is great!), but then in the ancom command you are asking ancom to only look at the salt samples. This won't work (as you learned from the error message), because ANCOM has nothing to compare against - all of your salt samples are one value: "low"! Do you have another metadata column that you could look at? If not, maybe you should try running ANCOM (on the salt column) without filtering any samples out.



Thank you very much for your help. After I corrected the error, I ran it again and the problem was solved. It really solved my urgent need. Thanks again. Good luck!

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