Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#4979 closed enhancement (fixed)

MatchMaker get percent identity from Python

Reported by: Tom Goddard Owned by: pett
Priority: moderate Milestone:
Component: Structure Comparison Version:
Keywords: Cc:
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

I call the matchmaker command (routine cmd_match) from Python in AlphaFold fetch. I'd like to report the percent identity in the sequence alignment but the return values from the Python call don't give that information. Would be great to get more complete info in the matchmaker Python return value.

Change History (8)

comment:1 by pett, 4 years ago

Status: assignedaccepted

comment:2 by pett, 4 years ago

The percent identity is a property of the pairwise alignment, so I will have to rework the return matchmaker values to return the alignment if requested (it now only makes the alignment instance if it needs to be shown), and actually add a method to Alignment to compute the percent identity.

in reply to:  3 ; comment:3 by goddard@…, 4 years ago

Percent identity was just a specific example of what I want.  Currently it returns the matched pairs of atoms after pruning.  If I had also matched pairs before distance pruning I think that would give me the percent identity.  The current return value being tuples is not great.  Would be better to have a dictionary with keywords for each return value for better extensibility in the future.

comment:4 by pett, 4 years ago

Yes, by implication I will have to switch to a list of dicts (currently a list of tuples). I think I will need to break backwards compatibility of the return value, otherwise future code will never be able to access the additional values if using run() to execute matchmaker (except if JSON requested).

comment:5 by pett, 4 years ago

Resolution: fixed
Status: acceptedclosed

Now returns a dict that includes the initial pairings as well. Keep in mind that the length of the pairings isn't the chain length -- use len(chain).

From the doc string:

Returns a list of dictionaries, one per chain pairing. The dictionaries are:
{

"full ref atoms": chimerax.atomic.Atoms
"full match atoms": chimerax.atomic.Atoms
"final ref atoms": chimerax.atomic.Atoms
"final match atoms": chimerax.atomic.Atoms
"final RMSD": float
"full RMSD": float
"transformation matrix": chimerax.geometry.Place

}
"full" is before iteration pruning and "final" is afterward.

comment:6 by Tom Goddard, 4 years ago

Resolution: fixed
Status: closedreopened

Thanks! It doesn't quite do what I want. I want the percent identity of the sequence alignment, not just for the atoms with coordinates.

comment:7 by pett, 4 years ago

Resolution: fixed
Status: reopenedclosed

Now also returns the aligned sequences as 'aligned ref seq' and 'aligned match seq'.

comment:8 by Tom Goddard, 4 years ago

Thanks!

Note: See TracTickets for help on using tickets.