biocore / emp

Code repository of the Earth Microbiome Project.
http://www.earthmicrobiome.org
BSD 3-Clause "New" or "Revised" License
154 stars 68 forks source link

Issue with parsing 16S amplicon data (summarize_otu_distributions.py) from biom table exported from Qiime2 #127

Closed dinhe878 closed 2 years ago

dinhe878 commented 2 years ago

Hi team,

I am trying to use summarize_otu_distributions.py parse my biom table exported from Qiime2. I ran into an issue:

Traceback (most recent call last): File "summarize_otu_distributions.py", line 61, in make_otu_summary(path_table, path_otu_summary) File "summarize_otu_distributions.py", line 21, in make_otu_summary otu_tax = {i: '; '.join(md['taxonomy']) for v, i, md in table.iter(axis='observation')} File "summarize_otu_distributions.py", line 21, in otu_tax = {i: '; '.join(md['taxonomy']) for v, i, md in table.iter(axis='observation')} TypeError: 'NoneType' object is not subscriptable

The emp biom file (emp_deblur_90bp.subset_2k.rare_5000.biom) worked, so I suspect that it has something to do with the biom format? But I do not know where to investigate....

Any help is much appreciated! Many thanks! /Ding

dinhe878 commented 2 years ago

I have resolved the issue. The problem was my biom table does not include taxonomy.