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).
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)
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!
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)
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:
sample Y9a has a unique value for the metadata column 25week.
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.