Humann=4.0.0a1 : MinPath12hmp.py:804: SyntaxWarning

Hi,

I am using humann=4.0.0a1 with metaphlan=4.1.1. I am getting the following error.

.conda/envs/biobakery4/lib/python3.12/site-packages/humann/quantify/MinPath12hmp.py:804: SyntaxWarning: invalid escape sequence ‘\d’

m = re.match(‘^[^\d]+(?P\d+)’, aline)

Could you please provide instructions how to solve this issue?

Thank you!

I believe this is a result of changes in Python’s regex engine in v3.12+. If you install HUMAnN in an earlier Python environment (e.g. 3.11) it should resolve this. We’ll work on ironing out these Python issues, since 3.12 and 3.13 have been out for a couple of years at this point and we should support them.