qiime2 / q2-diversity

BSD 3-Clause "New" or "Revised" License
4 stars 45 forks source link

Bray-Curtis: `Data must be symmetric and cannot contain NaNs.` #262

Open sjanssen2 opened 5 years ago

sjanssen2 commented 5 years ago

I encountered the error message

Plugin error from diversity:

  Data must be symmetric and cannot contain NaNs.

Debug info has been saved to /tmp/qiime2-q2cli-err-4o_gtofm.log

when I tried to compute Bray-Curtis beta diversity distances for the attached test.txt feature table (is lists cytokine concentrations not sequence reads, but that is not the cause of the problem):

It works for other metrics, e.g. Jaccard

qiime diversity beta --i-table input.qza --p-metric jaccard --p-n-jobs 1 --o-distance-matrix jaccard

I figure, the problem is caused by samples 65, 66, 67, 68 and 69 which are 0 for all features. However, we should return a more speaking message that points to the input feature table and NOT to the resulting distance matrix, which could not even been computed. It took me some time to figure this out.

ebolyen commented 5 years ago

Yeah a better error message is a really good idea. I believe @ChrisKeefe has some related work for alpha diversity (NaN vs filter) which can be similarly applied for beta diversity (which he will also be tackling soon). This is all happening in the context of q2-diversity-lib

cherman2 commented 1 year ago

I just tested this and this error still exists.