[chimerax-users] User defined color values for each residue/position

Elaine Meng meng at cgl.ucsf.edu
Mon Nov 30 12:34:44 PST 2020


Hi Nicco,
There are a couple of alternatives for coloring to show residue conservation.  One is to use ChimeraX's built-in methods to calculate conservation and assign the attribute to your structure(s), followed by using command "color byattribute."  Another is to create a file to assign your own arbitrary attribute, then use the command "color byattribute".  

I have tutorial on this for Chimera, but not yet for ChimeraX.  Details on the two methods:

(1) Use one of the built-in methods, such as from AL2CO (many choices of conservation equation: entropy, sum-of-pairs, etc.) after opening the sequence alignment directly in ChimeraX.  This will automatically assign the conservation attribute to the residues of any structures associated with the alignment.  Then you can use the "color byattribute" command to use any colormapping you want to show the values.

ChimeraX reads several sequence alignment formats:
<http://rbvi.ucsf.edu/chimerax/docs/user/commands/open.html#sequence>

After you have opened the alignment, use the context menu in the sequence window. "Headers... Conservation" shows the conservation line, and the Headers section of Settings (also opened from the context menu) controls how it is calculated:
<http://rbvi.ucsf.edu/chimerax/docs/user/tools/sequenceviewer.html>
<http://rbvi.ucsf.edu/chimerax/docs/user/tools/sequenceviewer.html#settings-headers>

Choose some quantitative method (as opposed to clustal characters) for the Conservation line and then use the "color byattribute" command with attribute name "seq_conservation":
<http://rbvi.ucsf.edu/chimerax/docs/user/commands/color.html#byattribute>

For example:

color byattribute seq_conservation palette rainbow

Some names of build-in attributes:
<http://rbvi.ucsf.edu/chimerax/docs/user/attributes.html#attrnames>

(2) If you wanted to do your own conservation calculation (you don't want to use AL2CO or other built-in  methods), then you can use an "attribute assignment  file" to assign an arbitrary attribute (named whatever you want) to the residues of your structure(s), and then use "color byattribute" as in method #1.

Description of attribute assignment format, a simple text file, and some example files:
<http://rbvi.ucsf.edu/chimerax/docs/user/formats/defattr.html>

Simply opening the file (filename suffix .defattr) will assign the values as an attribute of your structure(s), provided you specified the residues correctly in the file.  If you get a recent daily build you can open it with the "open" command.  If you get ChimeraX version 1.1 you can open it with the "defattr" command.  You need version 1.1 or newer to do any of this.

I hope this helps,
Elaine
-----
Elaine C. Meng, Ph.D.                       
UCSF Chimera(X) team
Department of Pharmaceutical Chemistry
University of California, San Francisco

> On Nov 30, 2020, at 11:11 AM, Niccolò Arecco <arecco.niccolo at gmail.com> wrote:
> 
> Hi, 
> I’m using ChimeraX to visualise the structure of a complex of 4 proteins. 
> I generated a sequence alignment of protein sequences of 1 of the 4 proteins and at each column (amino acid) of the multi protein alignment I assign a score from 0 to 1, where 0 represents no sequence conservation and 1 represent perfect sequence conservation. 
> 
> I’d like to colour-code these values on a publicly available structure. Can I do it with ChimeraX? I tried to google a bit and read the docs but couldn’t fine a way. 
> 
> The input “colouring” file could be something like this tab delimited file:
> 
> #POS AA 	SCORE
> 1	  M 		0.2
> 2 	  V		0.5
> ….
> n       N 		0.8
> 
> But I can reshape it in a better format if necessary.
> 
> If this is not possible to do it with ChimeraX are you aware of any other tool / software that would allow me to do this?
> 
> In the end I’d like to be able to do something like ConSurf (https://consurf.tau.ac.il) does but I’d like to avoid if possible always having to use the web interface as I’d like to semi-automatise this process for every protein in the complex at least.
> 
> Thanks a lot!
> Best wishes
> Nicco




More information about the ChimeraX-users mailing list