[Chimera-users] Auto-associate define attribute/render by attribute

Healey, Joseph J.Healey.1 at warwick.ac.uk
Thu Jan 23 02:51:01 PST 2020


Hi Chimera team,

I’ve made some good headway with the subject of this previous thread (a relatively simple Bio.pairwise2 alignment approach seems to serve to associate chains reasonably well. One further thing I’d like to clarify, is how missing data is stored for a residue attribute in the case of the renderbyattribute functionality?

e.g. if I have the structure sequence, and the scores (just using integers as a simple example for now):
model.residues = MEREYV
Scores = 192984

I can assign those scores reasonable easily as discussed with something to the effect of:

for res, score in zip(model.residues, scores):
     setattr(res, “attributeName”, score)

If in the case I have scores with missing data however, what value for missing is acceptable/expected by chimera (“”, None etc)?

E.g:
Scores = 192-84

In which case I envisage doing something like:

for res, score in zip(model.residues, scores):
    if score == “-“:
         setattr(res, “attributeName, “”)  # Or whatever the allowable character/value is?
    else:
         setattr(res, “attributeName”, score)

Many thanks,

Joe



Dr. Joseph Healey Ph.D. M.Sc. B.Sc. (Hons) MRSB
Research Fellow
Warwick Medical School
University of Warwick
Coventry
CV47AL
Mob: +44 (0) 7536 042620  | Twitter: @JRJHealey<https://twitter.com/JRJHealey>  |  Website<http://www2.warwick.ac.uk/fac/sci/moac/people/students/2013/joseph_healey>
Email: J.Healey.1 at warwick.ac.uk<mailto:J.Healey.1 at warwick.ac.uk> | ORCID: orcid.org/0000-0002-9569-6738


From: Eric Pettersen <pett at cgl.ucsf.edu>
Reply to: "chimera-users at cgl.ucsf.edu BB" <chimera-users at cgl.ucsf.edu>
Date: Wednesday, 4 December 2019 at 01:00
To: "Healey, Joseph" <J.Healey.1 at warwick.ac.uk>
Cc: "chimera-users at cgl.ucsf.edu BB" <chimera-users at cgl.ucsf.edu>
Subject: Re: [Chimera-users] Auto-associate define attribute/render by attribute

On Dec 3, 2019, at 1:15 AM, Healey, Joseph <J.Healey.1 at warwick.ac.uk<mailto:J.Healey.1 at warwick.ac.uk>> wrote:


  1.  On a related note, is there a need to programmatically ‘refresh’ rangecol/RBA after defining the attribute, as there is with the dialogue box, or should it be happy once the attr is set?

rangecolor will work without any nudging.  The Render By Attribute dialog will remain blissfully unaware of the new attributes until you use its refresh menu item.  You can use that dialog’s refreshAttrs() method to programatically nudge it.  Look at MultAlignViewer/MAViewer.py in your Chimera distribution for an example (search for refreshAttrs).

—Eric



Eric Pettersen
UCSF Computer Graphics Lab



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20200123/0fa5c8d3/attachment-0001.html>


More information about the Chimera-users mailing list