Bug in humann_genefamilies genus_level

Reported it here: humann_genefamilies_genus_level error: 'dict' object has no attribute 'iteritems' · Issue #32 · biobakery/humann · GitHub

but the issue was closed; it is a real bug, though.

I’m having the same error and couldn’t find any solution yet…
Any updates?


Update: I fixed it by modifying the script following this:

“In Python 3, dict.iteritems was renamed to dict.items . You should do this renaming in your code as well. In Python 2, dict.items works too, though this will give back a list of items, whereas dict.iteritems in Python 2 (and dict.items in Python 3) gives back a generator, enabling low-memory looping over the items.”

I had a second issue, after running the humann_genefamilies_genus_level script my output was not simplified at the genus level. In my case, I’m using a customized database based on GTDB for the tax screening which is giving me a higher number of mapped reads. However, my output looks like this (it uses a “;” to separate genus from species)

UniRef90_A0A249LI51|g__Planktophila;s__Planktophila_sp903922745__280388 1939.8730656373

while humann’s output by default looks like this (it uses a “.” to separate genus from species)

UniRef90_A0A0R2PIC3|g__Candidatus_Planktophila.s__Candidatus_Planktophila_vernalis 5412.2635020382

I replaced that “;” for a “.” using sed and it worked perfectly.
Hope this helps.