Error: qiime diversity bioenv

Hello,

I am getting the following error when executing the below command: Any insights would be greatly appreciated.

Thanks!

qiime diversity bioenv \
  --i-distance-matrix cm7514/unweighted_unifrac_distance_matrix.qza \
  --m-metadata-file Canine_metadata.tsv \
  --o-visualization cm7514/unweighted-unifrac-bioenv.qzv

DissimilarityMatrixError("Data must be at least 1x1 in "
skbio.stats.distance._base.DissimilarityMatrixError: Data must be at least 1x1 in size.

Hey @Nathan_Stone1,

I suspect your distance matrix is empty. You can check by running qiime tools export on the unweighted_unifrac_distance_matrix.qza artifact to see if the internal file is empty.

(This may have happened because you filtered out all of your samples in the rarefy step.)

Thanks. Distance matrix looks good. Any other possibilities? I tried running this on multiple environments with the same result.

Do the IDs in the distance matrix match your metadata? I am pretty sure scikit-bio guards against this, but perhaps that is also subsetting (although I don’t see a DistanceMatrix constructor in that code so I wouldn’t expect your particular error text).

Another option would be the transformer which sits the middle of the artifact and the actual method/visualization execution. Would you be able to post your artifact? I can try messing around with it using some of the internal QIIME 2 APIs which are invoked, I might see something there.

@Nathan_Stone1 can you also provide your Canine_metadata.tsv file? I suspect your distance matrix is being filtered within the bioenv visualizer such that the filtered distance matrix is empty.

unweighted_unifrac_distance_matrix.qza (61.8 KB)

Canine_metadata.tsv (13.9 KB)

Hi guys,
I am having the same issue, checked distance matrix, metadata and ids.

Please let me know if my files would be of any use.
Thanks!

The issue seems to be where the sample-metadata is filtered to find all numeric categories without N/A values. In @Nathan_Stone1’s case it finds these categories as continuous:

Empty DataFrame
Columns: [Latitude, Longitude, Year, Month, Day, SixteenS_CT, Description]
Index: []

But because each of these categoreis has a N/A value somewhere, it drops the entire category, resulting in no samples.

@Nathan_Stone1, try removing samples in your metadata file which have N/A for the categories you are interested in.

@ErikaGanda you may be having the same issue, check if you have N/A values in your continuous categories as well.

1 Like

Thanks @ebolyen! Just to clarify, empty cells in a mapping file are treated as N/A values.

Thanks! I will give it a try!

Thanks all, I’ll give it a try.