Skip to content

Add Residue Interaction Log Odds (RILO) and Packing Score#57

Open
yusuf1759 wants to merge 2 commits intomainfrom
rilo_score
Open

Add Residue Interaction Log Odds (RILO) and Packing Score#57
yusuf1759 wants to merge 2 commits intomainfrom
rilo_score

Conversation

@yusuf1759
Copy link
Contributor

@yusuf1759 yusuf1759 commented Sep 18, 2025

  • Create ref-free version of PLIF scoring via residue-interaction log-odds
  • Make PLIF compatible with PPI
  • Create PPI version of RILO
  • Add packing and packing entropy score

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the source of these values? Should we link in some documentations?

@@ -0,0 +1,329 @@
PLI_LOG_ODDS = {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Due to the large number of values, we should probably put them into a JSON file

References
----------
.. [1] https://doi.org/10.1002/1097-0134(20010501)43:2<89::AID-PROT1021>3.0.CO;2-H
.. [2] <link to notebook>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which notebook should be linked here?

Comment on lines +25 to 27
"RILOScore",
"RILOScore",
]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"RILOScore",
"RILOScore",
]
"RILOScore",
]



from peppr.logodds import PLI_LOG_ODDS, PPI_LOG_ODDS, SCALING_FACTORS
from peppr.packing import _compute_packing_entropy
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not exist, right?

return False


class iPackingEntropy(Metric):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
class iPackingEntropy(Metric):
class InterfacePackingEntropy(Metric):

Comment on lines +1865 to +1867
The metric is calculated by dividing the interface into small "shards" of residues
and evaluating the packing entropy for each shard.
The final score is the average packing entropy across all shards.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think A formula would help here as well to explain the metric: https://sphinx-rtd-trial.readthedocs.io/en/latest/ext/math.html


References
----------
.. [1] https://doi.org/10.1002/prot.22203
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure this is the correct article? Admittedly I did not fully read it, but it does not comprise the term 'packing entropy' at all.


@property
def name(self) -> str:
return "RiloScore"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return "RiloScore"
return "RILO Score"

import pandas as pd
from peppr.bisyrmsd import bisy_rmsd
from peppr.clashes import find_clashes
from peppr.clashes import find_clashes, _find_interface_contacts
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you import this function from another module, it is not a private function anymore 😉

Suggested change
from peppr.clashes import find_clashes, _find_interface_contacts
from peppr.clashes import find_clashes, find_interface_contacts

ligand_interface_chain_resids = [(a.chain_id, a.res_id) for a in combined_atoms[ligand_interface_chain_resids]]
packing_df = _compute_packing_entropy(
atoms_in=combined_atoms,
chains=["R", "L"],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We cannot rely on specific chain names here

Comment on lines +1594 to +1595
The RILOScore is calculated by dividing the receptor-ligand interface
into small "shards" of residues and evaluating the interactions.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a Notes section with further details of the method would help here.

Copy link
Collaborator

@padix-key padix-key left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also left some comments below. I think the main part that is currently missing are tests. Furthermore, RILOScore seems a bit convoluted to at the moment, as it requires another metric, namely PLIFRecovery. Could you check, if it makes more sense to use the ContactMeasurement class directly? If the size of the code cannot be reasonably reduced, I would also suggest to put the logic into anther module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants