Error in qiime diversity beta when using a merged feature table.

Hi,

I am receiving an error message when running the qiime diversity beta command on my merged feature table file.

This is the code I am running (qiime2-2019.4, I believe in a conda environment).

source tab-qiime

*qiime diversity beta *

*--i-table COMBINED/longitudinal_merged_table.qza *

*--p-metric braycurtis *

--o-distance-matrix COMBINED/7.1_meta_ABCDetc_Tx_dada2_braycurtis_notNorm_divesrity.qza

conda deactivate

Error message:
Plugin error from diversity:

Data must be symmetric and cannot contain NaNs.

I understand NaNs are missing data but I am not sure where this has arisen from.

The code however works if I use one of the unmerged files below. ie replace longitudinal_merged_table.qza with table_1.qza or table_2.qza or table_3.qza or table_4.qza (see below).

I therefore am
guessing I haven't merged the files correctly, though from looking on the qiime2 forum I think I have used the recommended method.

I merged the files as follows:

*feature-table merge *
*--i-tables table_1.qza *
*--i-table table_2.qza *
*--i-tables table_3.qza *
--i-tables table_4.qza
--o-merged-table COMBINED/longitudinal_merged_table.qza

(--p-overlap-method [default: error_on_overlapping_sample])

Any suggestions and help much appreciated! Let me know if you need any further information.
Thanks!

I've had a look through these already for merging and trying to work out why the beta diversity hasn't worked but I am still at a loss, apologies I am not a true bioinformatician.
https://docs.qiime2.org/2018.8/tutorials/fmt/

Also ignore the * symbols above, I am not sure why they are appearing in my code when I post it up here.

  • don’t appear in the code at all.
    Thanks.

Hello,

I think I have managed to solve this.

Turns out table_4.qza didn’t work alone either.

Basically I had a few samples in that file that were retained in the table.qza file but none of the reads for those samples had met the requirements during the qiime dada2 denoise-paired step.

If I created a new column in my metadata file called ‘fail’ with variables ‘y’ and ‘n’ and then used the command:
qiime feature-table filter-samples
https://docs.qiime2.org/2019.10/plugins/available/feature-table/filter-samples/
to filter out all those sample which failed during the qiime dada2 denoise-paired step calling them ‘n’ in metadata column ‘fail’.

Once these are removed the filtered table runs in qiime diversity beta without a glitch.

Not sure if there is a less roundabout way of doing this but this is a fix if anyone is having a similar problem.

Thanks.

2 Likes

You could use filter-samples on the merged table to filter based on sequence count, instead of based on sample metadata.

Thanks for solving!

1 Like