<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Zachariah,<div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>I can see three possible approaches to extracting the information you need:</div><div class=""><br class=""></div><div class="">1) Call the underlying routine that MatchMaker uses. I’m guessing your script is doing something like <i class="">runCommand(“matchmaker #0 #1”)</i> to do the matching, and that call returns nothing. The pertinent call is MatchMaker.match(…). It returns the reference atoms, corresponding matched atoms, and raw and pruned RMSDs. I’d say you’d have to be pretty Python savvy to use this approach because coming up with the arguments to the MatchMaker.match() call and processing the return values will require a good working knowledge of Python and how Chimera’s Python API works. Anyway, if you took this approach you would first call MatchMaker.match() with no iteration and the returned matched atoms would indicate the domain on the matched structure. If you decide to take this approach I could offer further guidance.</div><div class=""><br class=""></div><div class="">2) Extract the information from the Multalign Viewer tool. Probably the most practical approach, even if it is somewhat tricky. Since the Multalign Viewer tool is only available if the Chimera interface is shown, you won’t be able to run the script without the interface (<i class="">i.e.</i> with the --nogui flag). Anyway, once you run the matchmaker command to generate the MAV instance, use the <i class="">findMAV()</i><span style="font-style: normal;" class=""> function shown in this previous chimera-users message: </span><a href="http://plato.cgl.ucsf.edu/pipermail/chimera-users/2014-June/010016.html" class="">http://plato.cgl.ucsf.edu/pipermail/chimera-users/2014-June/010016.html</a> to the MAV Python instance. Assuming the domain on the reference is selected (and only that is selected), you can get a list of those residues with:</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span><i class="">from chimera.selection import currentResidues</i></div><div class=""><i class=""><span class="Apple-tab-span" style="white-space:pre"> </span>ref_domain = currentResidues()</i></div><div class=""><i class=""><br class=""></i></div><div class=""><span style="font-style: normal;" class="">and assuming the MAV instance is in the variable </span><i class="">mav</i><span style="font-style: normal;" class="">, you can get a list of the corresponding matched residues with:</span></div><div class=""><span style="font-style: normal;" class=""><br class=""></span></div><div class=""><span class="Apple-tab-span" style="font-style: normal; white-space: pre;"> </span><i class="">match_domain =[]</i></div><div class=""><i class=""><span class="Apple-tab-span" style="white-space:pre"> </span>ref_seq, match_seq = mav.seqs</i></div><div class=""><i class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>ref_map = ref_seq.matchMaps.values()[0]</i></div><div class=""><i class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>match_map = match_seq.matchMaps.values()[0]</i></div><div class=""><i class=""><span class="Apple-tab-span" style="white-space:pre"> </span>for ref_r in ref_domain:</i></div><div class=""><i class=""><span class="Apple-tab-span" style="white-space:pre"> </span>pos = ref_map[ref_r]</i></div><div class=""><i class=""><span class="Apple-tab-span" style="white-space:pre"> </span>try:</i></div><div class=""><i class=""><span class="Apple-tab-span" style="white-space:pre"> </span>match_domain.append(match_map[pos])</i></div><div class=""><i class=""><span class="Apple-tab-span" style="white-space:pre"> </span>except KeyError:</i></div><div class=""><i class=""><span class="Apple-tab-span" style="white-space:pre"> </span>pass</i></div><div class=""><i class=""><br class=""></i></div><div class=""><span style="font-style: normal;" class="">then you can select those residues with:</span></div><div class=""><span style="font-style: normal;" class=""><br class=""></span></div><div class=""><span class="Apple-tab-span" style="font-style: normal; white-space: pre;"> </span><i class="">from chimera.selection import setCurrent</i></div><div class=""><i class=""><span class="Apple-tab-span" style="white-space:pre"> </span>setCurrent(match_domain)</i></div><div class=""><i class=""><br class=""></i></div><div class="">Now the matched domain (only) should be selected and you can go on to do whatever you would do with that. You should probably also call <i class="">mav.Quit()</i><span style="font-style: normal;" class=""> to close the MAV instance.</span></div><div class=""><span style="font-style: normal;" class=""><br class=""></span></div><div class=""><span style="font-style: normal;" class="">3) Use ChimeraX. In ChimeraX, the </span><i class="">chimera.runCommand(…)</i><span style="font-style: normal;" class=""> </span>equivalent (<i class="">chimerax.core.commands.run(…)</i>) <b style="font-style: normal;" class="">does</b> return the match values, such as the atom correspondences, so as you can imagine things would be simpler. I don’t know if ChimeraX does everything else you intend to do or not, but it certainly does the things you mentioned. It is also faster than Chimera, and can run the script in nogui mode, if either of those are relevant. I can provide further guidance here also if you choose this route.</div><div class=""><br class=""></div><div class="">—Eric</div><div class=""><br class=""><div class="">
<div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span class="Apple-tab-span" style="white-space: pre;"><br class="Apple-interchange-newline"> </span>Eric Pettersen</div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>UCSF Computer Graphics Lab</div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br class=""></div><br class="Apple-interchange-newline">
</div>
<br class=""><div><span class="Apple-tab-span" style="white-space:pre"> </span><br class=""><blockquote type="cite" class=""><div class="">On Nov 13, 2019, at 7:56 PM, Zachariah Schuurs <<a href="mailto:zachariah.schuurs@hdr.qut.edu.au" class="">zachariah.schuurs@hdr.qut.edu.au</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Dear Chimera Team,<o:p class=""></o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">I have a reference protein domain and then a series of PDB files which all contain the same domain. I have programmatically been able to script an alignment of the reference to the same domain in the other files whereby he domain in the proteins of interest are isolated using the zone select method. This however leaves me with fragments and often misses some of the domain features of the interest proteins that occur outside of the specified zone.<o:p class=""></o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">I am wondering if it is possible to write a python script that selects the area on the protein of interest by selecting the residues in the sequence alignment after MatchMaker is conducted. For instance – protein #0 is my reference protein, which is 150 residues long. My protein of interest contains the same domain as the reference, but is 500 residues long. Upon conducting MatchMaker and getting an output sequence alignment, the 150 residues of #0 (the reference) are selected, along with the aligned residues in the protein of interest. It is possible to select the residues in the sequence alignment window (as in the picture) but I wish to be able to script it. The selected 150 residues (or so) in the protein of interest are then saved as their own trimmed file. I have been able to write a python script for completing the MatchMaker etc, but I am not sure how to achieve the selection of residues in #1 based of the alignment with #0, or if it is even possible.<o:p class=""></o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Thanks<o:p class=""></o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; background-color: white;" class=""><b class=""><span style="font-size: 12pt; color: rgb(68, 84, 106);" class="">Zachariah Schuurs</span></b><b class=""><span style="font-size: 12pt; color: rgb(0, 112, 192);" class=""> </span></b><b class=""><span style="color: rgb(0, 112, 192);" class=""> </span></b><b class=""><span style="color: rgb(166, 166, 166);" class="">| PhD Candidate </span></b><span style="font-size: 12pt;" class=""><o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; background-color: white;" class=""><b class=""><span style="font-size: 12pt; color: rgb(68, 84, 106);" class="">CARP – Cancer & Ageing Research Program</span></b><span style="font-size: 12pt; font-family: Candara, sans-serif; color: rgb(68, 84, 106);" class=""><o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; background-color: white;" class=""><span style="font-size: 10pt; color: rgb(31, 73, 125);" class="">Institute of Health and Biomedical Innovation</span><span style="font-size: 10pt; color: rgb(166, 166, 166);" class=""> <b class="">|</b> </span><span style="font-size: 10pt; color: rgb(31, 73, 125);" class="">Queensland University of Technology</span><span style="font-size: 12pt; font-family: Candara, sans-serif;" class=""><o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; background-color: white;" class=""><span style="font-size: 10pt; color: rgb(31, 73, 125);" class="">Level 6</span><span style="font-size: 10pt; color: rgb(68, 84, 106);" class=""> </span><b class=""><span style="font-size: 10pt; color: rgb(166, 166, 166);" class="">|</span></b><span style="font-size: 10pt; color: rgb(68, 84, 106);" class=""> </span><span style="font-size: 10pt; color: rgb(31, 73, 125);" class="">Translational Research Institute</span><span style="font-size: 10pt; color: rgb(68, 84, 106);" class=""> </span><b class=""><span style="font-size: 10pt; color: rgb(166, 166, 166);" class="">|</span></b><span style="font-size: 10pt; color: rgb(68, 84, 106);" class=""> </span><span style="font-size: 10pt; color: rgb(31, 73, 125);" class="">37 Kent St</span><span style="font-size: 10pt; color: rgb(68, 84, 106);" class=""> </span><b class=""><span style="font-size: 10pt; color: rgb(166, 166, 166);" class="">|</span></b><span style="font-size: 10pt; color: rgb(68, 84, 106);" class=""> </span><span style="font-size: 10pt; color: rgb(31, 73, 125);" class="">Woolloongabba QLD 4102</span><span style="font-size: 12pt; font-family: Candara, sans-serif;" class=""><o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; background-color: white;" class=""><b class=""><span style="font-size: 10pt; color: rgb(146, 208, 80);" class="">T: </span></b><span style="font-size: 10pt; color: rgb(68, 84, 106);" class="">+61 7 3443 7296</span><span style="font-size: 10pt; color: rgb(0, 112, 192);" class=""> <b class=""> </b></span><b class=""><span style="font-size: 10pt; color: rgb(166, 166, 166);" class="">| </span></b><b class=""><span style="font-size: 10pt; color: rgb(146, 208, 80);" class="">E:</span></b><span style="font-size: 10pt; color: rgb(146, 208, 80);" class=""> </span><u class=""><span style="font-size: 10pt; color: rgb(5, 99, 193);" class=""><a href="mailto:zachariah.schuurs@hdr.qut.edu.au" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">zachariah.schuurs@hdr.qut.edu.au</a></span></u><span style="font-size: 10pt; color: rgb(31, 73, 125);" class=""> </span><b class=""><span style="font-size: 10pt; color: rgb(166, 166, 166);" class="">| </span></b><b class=""><span style="font-size: 10pt; color: rgb(146, 208, 80);" class="">Web</span></b><b class=""><span style="font-size: 10pt; color: rgb(166, 166, 166);" class="">: </span></b><span class=""><a href="http://www.carp.org.au/" style="color: rgb(149, 79, 114); text-decoration: underline;" class=""><b class=""><span style="font-size: 10pt; color: rgb(5, 99, 193);" class="">www.carp.org.au</span></b></a></span><span style="font-size: 12pt; font-family: Candara, sans-serif;" class=""><o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span id="cid:image002.jpg@01D59AF3.602278E0"><image002.jpg></span><o:p class=""></o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><i class=""><span class=""><o:p class=""> </o:p></span></i></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><i class=""><span class=""><o:p class=""> </o:p></span></i></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><i class=""><span class=""><o:p class=""> </o:p></span></i></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><i class=""><span class=""><o:p class=""> </o:p></span></i></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><i class=""><span class=""><o:p class=""> </o:p></span></i></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><i class=""><span class=""><o:p class=""> </o:p></span></i></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><i class=""><span class="">I acknowledge the Turrbal and Yugara, as the First Nations owners of the lands where QUT now stands. I pay respect to their Elders, lores, customs and creation spirits. I recognise that these lands have always been places of teaching, research and learning.</span></i><i class=""><span style="font-size: 12pt;" class=""><o:p class=""></o:p></span></i></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span class=""><o:p class=""> </o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="color: rgb(127, 127, 127);" class="">This email and its attachments (if any) contain confidential information intended for use by the addressee and may be privileged. We do not waive any confidentiality, privilege or copyright associated with the email or the attachments. If you are not the intended addressee, you must not use, transmit, disclose or copy the email or any attachments. If you receive this email by mistake, please notify the sender immediately and delete the original email.<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span class=""><span id="cid:image004.png@01D59AF3.602278E0"><image004.png></span></span><o:p class=""></o:p></div></div><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">_______________________________________________</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Chimera-users mailing list:<span class="Apple-converted-space"> </span></span><a href="mailto:Chimera-users@cgl.ucsf.edu" style="color: rgb(149, 79, 114); text-decoration: underline; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">Chimera-users@cgl.ucsf.edu</a><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Manage subscription:<span class="Apple-converted-space"> </span></span><a href="http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users" style="color: rgb(149, 79, 114); text-decoration: underline; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users</a></div></blockquote></div><br class=""></div></body></html>