Error on beta-group-significance


I tried the following code and got this error:

qiime diversity beta-group-significance --i-distance-matrix core-metrics-results/unweighted_unifrac_distance_matrix.qza --m-metadata-file /disk1/ishige/qiime2_ishii_171108/171108_ishii_metadata.txt --m-metadata-category 25week --o-visualization core-metrics-results/unweighted-unifrac-25week-significance.qzv --p-pairwise

Plugin error from diversity:

All values in the grouping vector are unique. This method cannot
operate on a grouping vector with only unique values (e.g., there are
no 'within' distances because each group of objects contains only a
single object).

I attached metadata.

taichiro ishige

171108_ishii_metadata.txt (3.5 KB)

Hi @taichiro_ishige,
Does that distance matrix contain all samples listed in the metadata file? You can summarize the feature table used to create it to make sure that all samples are present.

I ask because this error indicates that all samples in the distance matrix have the same value for 25week. If other samples are being filtered out unintentionally, e.g., because you are rarefying this feature table at a high sequencing depth, this could cause this error. If unweighted_unifrac_distance_matrix.qza is the output of diversity core-metrics-phylogenetic, then it has been rarefied in that process.

If that doesn’t work, would you mind sharing your distance matrix? (you can send directly to me if you do not want to post this file openly on the forum)

Good luck!


Just wanted to follow-up briefly on @Nicholas_Bokulich’s comment about all of your samples being present in your distance matrix. There was a great thread on here a few months back, where someone was using a pretty aggressive even sampling depth, which was filtering out most of their samples. Please take a look at that thread and double check how many samples you might have filtered out when performing even sampling. Thanks! :t_rex:


Hi, Nicholas_Bokulich

thanks a lot for your replying!

Does that distance matrix contain all samples listed in the metadata file?

Yes, all samples listed in the metadata file and summarize table.
I attached summarizetable.gzv.summarizetable.qzv (622.9 KB)
unweighted_unifrac_distance_matrix.qza is the output of diversity core-metrics-phylogenetic.unweighted_unifrac_distance_matrix.qza (167.4 KB)

taichiro ishige

1 Like

Dear @taichiro_ishige,
Thank you for sending your data. The error is caused by a known bug and relates to two aspects of your data that are easily fixed:

  1. sample Y9a has a unique value for the metadata column 25week.
  2. You are using the --p-pairwise parameter to perform pairwise comparisons between all groups in that metadata column. It cannot compare a group that has no replicates.

So as a temporary workaround (until that bug is fixed) you either need to disable pairwise comparisons (i.e., just remove the --p-pairwise parameter from your command), or remove that sample from your distance matrix prior to testing.

I hope that helps!


Dear Nicholas_Bokulich

Thank you for replying so quickly, I really appreciate!

When I tried to remove the --p-pairwise parameter, I resolved this trouble.

thanks very much, again!
taichiro ishige


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