ProDy icon indicating copy to clipboard operation
ProDy copied to clipboard

Pfam not completely working

Open jamesmkrieger opened this issue 1 year ago • 9 comments

For example, the AMPAR test only gives 2 out of 4 pfam domains at least sometimes

jamesmkrieger avatar Feb 14 '24 03:02 jamesmkrieger

@atbogetti, any chance you could check this too please seeing as you’ve just been over the pfam code changes?

jamesmkrieger avatar Mar 08 '24 09:03 jamesmkrieger

@jamesmkrieger Yes, I have actually started to look into this already. I will figure it out.

AnthonyBogetti avatar Mar 08 '24 15:03 AnthonyBogetti

Thanks! Glad to have you on board

jamesmkrieger avatar Mar 08 '24 16:03 jamesmkrieger

@jamesmkrieger I tried the pfam tests and also encountered failures. I have narrowed down the source of the issue to this line: https://github.com/prody/ProDy/blob/412c8fa9b18f78065bea4d9a641f77a520dc0892/prody/database/pfam.py#L421-L422. For some reason, that way of selecting the residues is causing the following error: TypeError: can't multiply sequence by non-int of type 'Forward'. I tried manually inputting the range and got the same error, though when I just use a single number as the selection (for instance, resindex 10) it works just fine. Do you know if something changed in the residue selection language recently? I can dig deeper but just wanted to see if this may be familiar to you before proceeding.

AnthonyBogetti avatar Mar 08 '24 19:03 AnthonyBogetti

I don’t think it changed. The selection parser is too complicated to change really. Maybe something changed in pyparsing though

jamesmkrieger avatar Mar 09 '24 00:03 jamesmkrieger

Bingo. I downgraded pyparsing to v3.1.1 (current is 3.1.2) and it works now. The pfam tests also all pass without any failures.

AnthonyBogetti avatar Mar 11 '24 20:03 AnthonyBogetti

Great!

jamesmkrieger avatar Mar 12 '24 07:03 jamesmkrieger

Can you revert #1816 and see if they still pass please?

Also, please can you check if this fixes the problems with the latest numpy versions too (see #1655)?

jamesmkrieger avatar Mar 12 '24 07:03 jamesmkrieger

@jamesmkrieger Yes I will check those and get back to you.

AnthonyBogetti avatar Mar 12 '24 17:03 AnthonyBogetti

Bingo. I downgraded pyparsing to v3.1.1 (current is 3.1.2) and it works now. The pfam tests also all pass without any failures.

Actually, that's not true. The pfam tests pass because I changed them. The original tests still fail if we change the pyparsing version (see https://github.com/prody/ProDy/actions/runs/8294288857?pr=1845), so I don't think that's actually the issue here although it's definitely an issue that we have to fix (see also #1844).

jamesmkrieger avatar Mar 15 '24 10:03 jamesmkrieger

Can you revert #1816 and see if they still pass please?

This was the wrong number. The one I meant was #1825, which I have reverted in #1845 that led to the tests failing as mentioned above. Sorry

jamesmkrieger avatar Mar 15 '24 10:03 jamesmkrieger

Also, please can you check if this fixes the problems with the latest numpy versions too (see #1655)?

The numpy thing with pyparsing is now checked and that indeed fixed it.

jamesmkrieger avatar Mar 15 '24 17:03 jamesmkrieger

closed by #1851

jamesmkrieger avatar Mar 27 '24 15:03 jamesmkrieger