<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><div class="">
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On Jul 13, 2017, at 9:33 AM, Elaine Meng <<a href="mailto:meng@cgl.ucsf.edu" class="">meng@cgl.ucsf.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Hi Joe,<br class="">Glad you like the color-by-conservation tutorial!<br class=""><br class="">Assuming that the structure associates with the alignment automatically, you can do all of this with Chimera commands, except worms, for which there is no command. Somebody else would have to weigh in on whether it would be feasible to render worms with a python script.<br class=""><br class="">In the script, just open the structure and alignment with the “open” command and do the coloring with the “rangecolor” command, like the example shown in the tutorial. As in the Render by Attribute dialog, you are not limited to the built-in color palettes. In the GUI you can click the color well and get the color editor and choose any color; in the rangecolor command, you can specify any colors, whether built-in or custom-defined.<br class=""><br class="">You can control the conservation method by setting your preferences beforehand, by opening some (any) sequence alignment, and in the Multalign Viewer (sequence window) menu: Preferences… Headers, then choosing the desired settings. If AL2CO, “gap fraction” is the maximum fraction of sequences with gaps in a column for conservation to still be calculated; for example, if the gap fraction is 0.25, conservation values will only be calculated for columns in which at least three-fourths of the sequences have residues (hence the “novalue” coloring in the rangecolor command below, for residues that don’t have a conservation value). Also use Multalign Viewer menu Headers to ensure the Conservation line is shown, if it isn’t already. I believe all of that is automatically saved for the next time you open an alignment.<br class=""><br class="">Potential issues:<br class="">- does the structure associate automatically with the sequence? you may be able to set laxer criteria if needed in the Multalign Viewer preferences, Structure section<br class="">- the potential ranges of conservation values could vary depending on the measure and alignments you use, so think about whether you would always want a specific color to go with a specific conservation value, or just anchor the coloring to “min” “mid” “max” . Try a few examples manually and see the min/mid/max values reported in the Reply Log when you run rangecolor, to get a feel for the variability of the values obtained with your data.<br class=""><br class="">Here are lines for an example command file, but reasonable possibilities are much broader. The # lines are comments.<br class=""><br class=""># to specify conservation method, set Multalign Viewer header preferences beforehand<br class="">set bgcolor white<br class="">set silhouette<br class=""># define colors same as used in the Render tool's cyan-maroon palette<br class="">colordef maroon2 .62 .125 .37<br class="">colordef cyan2 .059 .78 .81<br class=""># open structure<br class="">open 1hd2<br class=""># show ribbons only (hide atoms)<br class="">~disp<br class=""># open sequence alignment<br class="">open ~/Desktop/peroxiredoxinSFLD.afa<br class=""># color by conservation<br class="">rangecolor mavConservation min cyan2 0 white max maroon2 novalue gray<br class=""><br class="">Further notes:<br class="">- “copy” command to save image, “save” to save session, “close session” to close both the sequence alignment and structure<br class=""><br class="">I hope this helps,<br class="">Elaine<br class="">----------<br class="">Elaine C. Meng, Ph.D. <br class="">UCSF Chimera(X) team<br class="">Department of Pharmaceutical Chemistry<br class="">University of California, San Francisco<br class=""><br class=""><br class=""><blockquote type="cite" class="">On Jul 13, 2017, at 3:40 AM, Healey, Joe <<a href="mailto:J.R.J.Healey@warwick.ac.uk" class="">J.R.J.Healey@warwick.ac.uk</a>> wrote:<br class=""><br class="">Hi Chimera Team,<br class="">I've been following this great tutorial:<br class=""><a href="https://www.cgl.ucsf.edu/chimera/data/tutorials/systems/outline.html#case1" class="">https://www.cgl.ucsf.edu/chimera/data/tutorials/systems/outline.html#case1</a><br class=""><br class="">To render a structure by conservation. I'd like to run this non-interactively for a number of proteins though. Could you tell me what the python or 'chimera code' equivalents would be?<br class=""><br class="">For instance, I would provide a structure (or structures in a session) and MSA in fasta format already, so without interactive menus I'd like to:<br class=""><br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>• Open the structure(s) and MSA<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>• get the conservation from MultAlign (the actual conservation metric doesn't particularly matter to me at the moment)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>• Render any open models by conservation, say using the cyan-maroon colour scale<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>• Additionall depict as smooth worms with defined min and max radii<br class=""><br class="">If this is possible!<br class="">Thanks!<br class="">Joe<br class=""></blockquote><br class=""><br class="">_______________________________________________<br class="">Chimera-users mailing list: <a href="mailto:Chimera-users@cgl.ucsf.edu" class="">Chimera-users@cgl.ucsf.edu</a><br class="">Manage subscription: <a href="http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users" class="">http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users</a><br class=""><br class=""></div></div></blockquote></div><br class=""></div></body></html>