ebi-pf-team / interproscan

Genome-scale protein function classification
Apache License 2.0
302 stars 67 forks source link

Typo in Python Library #381

Closed davidbio closed 1 month ago

davidbio commented 1 month ago

I received the following after a fresh install of IPS-5.70-102.0.

Error output from binary:
Traceback (most recent call last):
  File "bin/mobidb/idrpred-cli.py", line 9, in <module>
    from idrpred.idrpred import main
  File "/home/ips/docker_ips/ips/bin/mobidb/idrpred/__init__.py", line 206, in <module>
    def _repl_struct_by_disord(match: re.Match):
AttributeError: module 're' has no attribute 'Match'
        at uk.ac.ebi.interpro.scan.management.model.implementations.RunBinaryStep.execute(RunBinaryStep.java:201)

So I modified bin/mobidb/idrpred/__init__.py from

def _repl_struct_by_disord(match: re.Match):
    return _POSITIVE_FLAG * len(match.group(0))

to

def _repl_struct_by_disord(match: re.match):
    return _POSITIVE_FLAG * len(match.group(0))

which fixed it for me.

matthiasblum commented 1 month ago

Hi @davidbio,

Thank you for reporting this. The idrpred package requires Python 3.8 or higher, as re.Match is indeed not a valid reference in previous versions of Python.