Plugin error from micom: cannot convert float NaN to integer

Hi all, I am having a problem with running Qiime2 - MICOM I keep getting this error:

Merged with the database using ranks: species
Traceback (most recent call last):
File "/opt/anaconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/q2cli/", line 520, in call
results = self._execute_action(
File "/opt/anaconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/q2cli/", line 581, in _execute_action
results = action(**arguments)
File "", line 2, in build
File "/opt/anaconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/qiime2/sdk/", line 342, in bound_callable
outputs = self.callable_executor(
File "/opt/anaconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/qiime2/sdk/", line 566, in callable_executor
output_views = self._callable(**view_args)
File "/opt/anaconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/q2_micom/", line 88, in build
tax = build_spec(abundance, taxonomy, models, cutoff, strict)
File "/opt/anaconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/q2_micom/", line 60, in build_spec
ValueError: cannot convert float NaN to integer

Plugin error from micom:

cannot convert float NaN to integer

See above for debug info.

I used this code: (I have taken out the correct file path as it includes personal information)

qiime micom build
--i-abundance abundanceOTU4.qza
--i-taxonomy taxonomy_cleaned.qza
--i-models metabolic_models_2024.qza
--p-cutoff 0.0001
--p-threads 2
--o-community-models output_models_2024.qza

I have tried everything, I have messed around with each qza file to see what the problem is but nothing is working. I think my abundance data may be causing a problem but I am not sure how.

Please see attached all three files:

abundanceOTU4.qza (12.2 KB)

taxonomy_cleaned.qza (6.2 KB)

metabolic_models_2024.qza (555.9 KB)
NMWcsM1k.qza) (6.2 KB)

If anyone has any advice please do respond, as I have been stuck on this step the past week. I highly appreciate this thank you :slight_smile:

@cdiener would you be able to help this user?

Or @seangibbons, would you be able to help?

@cdiener is the person to address this -- he may be a bit slow to respond, as he's setting up his new lab in Austria at the moment.

Based on the error, it appears you have missing abundance values in your input data. I'm guessing MICOM doesn't like that. I suggest replacing your NaN (missing) values with zeros in your abundance matrix, and seeing if that helps.

1 Like

Thanks for the update and the suggestion @seangibbons!