<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="">Oh yeah, it's even worse that I thought. The problem is that the realignment job executes in the background, so your script continues on while the job is still running, so therefore you are getting the original association info. Unlike ChimeraX, there is no way to tell computeRealignment() to not return until the job finishes.<div class=""><br class=""></div><div class="">The only option that occurs to me is for you to monitor the job to see when it finishes. Before you call computeRealignment(), do this:</div><div class=""><br class=""></div><div class="">from chimera.tasks import manager</div><div class="">mgr = manager()</div><div class="">num_jobs = mgr.active_task_count() # should be zero unless your script is running other jobs</div><div class=""><br class=""></div><div class=""><i class="">...call computeRealignment()</i></div><div class=""><i class=""><br class=""></i></div><div class="">from time import sleep</div><div class="">while mgr.active_task_count() == num_jobs + 1:</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>sleep(1)</div><div class=""><br class=""></div><div class=""><i class="">...save association info</i></div><div class=""><i class=""><br class=""></i></div><div class=""><span style="font-style: normal;" class="">--Eric</span></div><div class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Nov 14, 2022, at 3:16 PM, Hernando J Sosa via Chimera-users <<a href="mailto:chimera-users@cgl.ucsf.edu" class="">chimera-users@cgl.ucsf.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="elementToProof" style="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; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);">Hi Eric<br class=""></div><div class="elementToProof" style="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; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><br class=""></div><div class="elementToProof" style="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; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);">Using the following argument works:</div><div class="elementToProof" style="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; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><br class=""></div><div class="elementToProof ContentPasted0" style="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; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);">mav.computeRealignment("ClustalOmegaService", ("-i", "-o"),'--full')</div><div class="elementToProof ContentPasted0" style="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; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><br class=""></div><div class="elementToProof ContentPasted0" style="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; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);">However, saving the corresponding association file using:<span class="Apple-converted-space"> </span><br class=""></div><div class="elementToProof ContentPasted0" style="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; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><br class=""></div><div class="elementToProof ContentPasted1 ContentPasted0" style="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; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);">mav.saveAssocInfo('myassocfile.txt')<span class="Apple-converted-space"> </span><br class=""></div><div class="elementToProof ContentPasted1 ContentPasted0" style="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; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><br class=""></div><div class="elementToProof ContentPasted1 ContentPasted0" style="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; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);">I get a file different from the one I get using the Multialign Viewer window menu</div><div class="elementToProof ContentPasted1 ContentPasted0" style="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; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);">MultialignViewer->File->Save Assoc Info...<br class=""></div><div class="elementToProof ContentPasted1 ContentPasted0" style="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; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><br class=""></div><div class="ContentPasted2 ContentPasted1 elementToProof ContentPasted0 ContentPasted3 ContentPasted4" style="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; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);">The saveAssocInfo statement is after the computeRealignment statement but perhaps for some reason I'm getting the association file corresponding to the first alignment ???<br class=""></div><div class="ContentPasted2 ContentPasted1 elementToProof ContentPasted0" style="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; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><br class=""></div><div class="ContentPasted2 ContentPasted1 elementToProof ContentPasted0" style="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; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><br class=""></div><div class="ContentPasted2 ContentPasted1 elementToProof ContentPasted0" style="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; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);">Thanks for any help on this issue.</div><div class="ContentPasted2 ContentPasted1 elementToProof ContentPasted0" style="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; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><br class=""></div><div class="ContentPasted2 ContentPasted1 elementToProof ContentPasted0" style="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; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);">Best</div><div class="ContentPasted2 ContentPasted1 elementToProof ContentPasted0" style="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; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><br class=""></div><div class="ContentPasted2 ContentPasted1 elementToProof ContentPasted0" style="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; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);">Hernando<br class=""></div><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=""><div class="elementToProof ContentPasted1 ContentPasted0" style="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; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><br class=""></div><div class="elementToProof" 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;"><div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><br class=""></div><div id="Signature" class=""><div class=""><div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><span style="margin: 0px; font-size: 15px; font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; color: rgb(32, 31, 30); text-align: start; background-color: rgb(255, 255, 255);" class=""><font size="2" face="Arial" class=""><span style="margin: 0px;" class="">___________________________________<br class=""></span></font></span></div><div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><div style="margin: 0px; font-size: 15px; font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; color: rgb(32, 31, 30); text-align: start; background-color: rgb(255, 255, 255);" class=""><font size="2" face="Arial" class=""><span style="margin: 0px; font-size: 9pt; font-family: Arial, Helvetica, sans-serif;" class="">Hernando Sosa</span><span style="margin: 0px;" class=""><span style="margin: 0px; font-size: 9pt; font-family: Arial, Helvetica, sans-serif;" class=""> </span><span style="margin: 0px;" class=""><br class=""></span></span></font></div><font size="2" face="Arial" style="color: rgb(32, 31, 30); text-align: start; background-color: rgb(255, 255, 255);" class=""><span style="margin: 0px;" class=""><span style="margin: 0px; font-size: 9pt; font-family: Arial, Helvetica, sans-serif;" class="">Dept. of Biochemistry</span></span><br class=""></font><font size="2" face="Arial" style="color: rgb(32, 31, 30); text-align: start; background-color: rgb(255, 255, 255);" class=""><span style="margin: 0px;" class=""><span style="margin: 0px;" class=""></span></span><span style="margin: 0px;" class=""><span style="margin: 0px; font-size: 9pt; font-family: Arial, Helvetica, sans-serif;" class="">Albert Einstein College of Medicine</span></span><br class=""></font><font size="2" face="Arial" style="color: rgb(32, 31, 30); text-align: start; background-color: rgb(255, 255, 255);" class=""><span style="margin: 0px;" class=""><span style="margin: 0px;" class=""></span></span><span style="margin: 0px;" class=""><span style="margin: 0px; font-size: 9pt; font-family: Arial, Helvetica, sans-serif;" class="">1300 Morris Park Av.</span></span><br class=""></font><font size="2" face="Arial" style="color: rgb(32, 31, 30); text-align: start; background-color: rgb(255, 255, 255);" class=""><span style="margin: 0px;" class=""><span style="margin: 0px;" class=""></span></span><span style="margin: 0px;" class=""><span style="margin: 0px; font-size: 9pt; font-family: Arial, Helvetica, sans-serif;" class="">Bronx NY 10461</span></span><br class=""></font><font size="2" face="Arial" style="color: rgb(32, 31, 30); text-align: start; background-color: rgb(255, 255, 255);" class=""><span style="margin: 0px;" class=""><span style="margin: 0px;" class=""></span></span><span style="margin: 0px;" class=""><span style="margin: 0px; font-size: 9pt; font-family: Arial, Helvetica, sans-serif;" class="">phone (718) 430-3456</span></span></font><font size="2" face="Arial" style="color: rgb(32, 31, 30); text-align: start; background-color: rgb(255, 255, 255);" class=""><br class=""></font><div style="margin: 0px; font-size: 15px; font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; color: rgb(32, 31, 30); text-align: start; background-color: rgb(255, 255, 255);" class=""><font size="2" face="Arial" class=""><span style="margin: 0px;" class=""><span style="margin: 0px;" class=""></span></span><span style="margin: 0px;" class=""><span style="margin: 0px; font-size: 9pt; font-family: Arial, Helvetica, sans-serif;" class="">emai: <span class=""> </span></span><span style="margin: 0px;" class=""><a href="mailto:hernando.sosa@einsteinmed.org" target="_blank" rel="noopener noreferrer" data-auth="NotApplicable" title="hernando.sosa@einsteinmed.org" data-linkindex="0" style="margin: 0px;" class=""><span style="margin: 0px; font-size: 9pt; font-family: Arial, Helvetica, sans-serif;" class="">hernando.sosa@einsteinmed.</span></a><span style="margin: 0px; font-size: 9pt; font-family: Arial, Helvetica, sans-serif;" class="">edu</span><br class=""></span></span></font></div><div style="margin: 0px; font-size: 15px; font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; color: rgb(32, 31, 30); text-align: start; background-color: rgb(255, 255, 255);" class=""><span style="margin: 0px;" class=""><font size="2" face="Arial" class=""><span style="margin: 0px; font-size: 9pt; font-family: "Arial Black", Arial, sans-serif;" class="">___________________________________</span></font></span></div><br class=""></div><div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><br class=""></div></div></div></div><div id="signature_bookmark" 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=""></div><div id="appendonsend" 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=""></div><div style="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; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><br class=""></div><hr tabindex="-1" 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; display: inline-block; width: 483.125px;" 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=""></span><div id="divRplyFwdMsg" dir="ltr" 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=""><font face="Calibri, sans-serif" style="font-size: 11pt;" class=""><b class="">From:</b><span class="Apple-converted-space"> </span>Chimera-users <<a href="mailto:chimera-users-bounces@cgl.ucsf.edu" class="">chimera-users-bounces@cgl.ucsf.edu</a>> on behalf of Hernando J Sosa via Chimera-users <<a href="mailto:chimera-users@cgl.ucsf.edu" class="">chimera-users@cgl.ucsf.edu</a>><br class=""><b class="">Sent:</b><span class="Apple-converted-space"> </span>Monday, November 14, 2022 4:25 PM<br class=""><b class="">To:</b><span class="Apple-converted-space"> </span><a href="mailto:chimera-users@cgl.ucsf.edu" class="">chimera-users@cgl.ucsf.edu</a><span class="Apple-converted-space"> </span>List <<a href="mailto:chimera-users@cgl.ucsf.edu" class="">chimera-users@cgl.ucsf.edu</a>><br class=""><b class="">Subject:</b><span class="Apple-converted-space"> </span>Re: [Chimera-users] Realign sequences</font><div class=""> </div></div><div dir="ltr" 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=""><table cellspacing="3" cellpadding="3" border="4" style="background-color: rgb(254, 0, 0); border-collapse: collapse; border: 4px solid rgb(203, 203, 203); color: rgb(255, 204, 103); width: 489px; text-align: center;" class=""><tbody class=""><tr class=""><td class=""><i class="">CAUTION: This email comes from an external source; the attachments and/or links may compromise our secure environment. Do not open or click on suspicious emails. Please click on the “Phish Alert” button on the top right of the Outlook dashboard to report any suspicious emails.</i></td></tr></tbody></table><div class=""><div class="x_elementToProof" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);">Thanks Eric,</div><div class="x_elementToProof" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><br class=""></div><div class="x_elementToProof" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);">I will try first with the<span class="Apple-converted-space"> </span><span class="x_ContentPasted0">computeRealignment() method. Both alignments algorithms seem to work so I'll try Crustal-Omega first. Most likely will have more questions coming.<span class="Apple-converted-space"> </span><br class=""></span></div><div class="x_elementToProof" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><span class="x_ContentPasted0"><br class=""></span></div><div class="x_elementToProof" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><span class="x_ContentPasted0">Eventually we'll try chimera-X which indeed seems like an easier route. However, the problem is that this script is part of a library of scripts and functions that we have built over the years for Chimera (in python 2.7). Translating all to python 3.0 and the different environment of ChimeraX may be more difficult and time consuming at this time.<span class="Apple-converted-space"> </span><br class=""></span></div><div class="x_elementToProof" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><span class="x_ContentPasted0"><br class=""></span></div><div class="x_elementToProof" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><span class="x_ContentPasted0">Thanks again,</span></div><div class="x_elementToProof" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><span class="x_ContentPasted0"><br class=""></span></div><div class="x_elementToProof" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><span class="x_ContentPasted0">Hernando<br class=""></span></div><div id="x_signature_bookmark" class=""></div><div id="x_appendonsend" class=""></div><div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><br class=""></div><hr tabindex="-1" style="display: inline-block; width: 483.125px;" class=""><div id="x_divRplyFwdMsg" dir="ltr" class=""><font face="Calibri, sans-serif" style="font-size: 11pt;" class=""><b class="">From:</b><span class="Apple-converted-space"> </span>Eric Pettersen <<a href="mailto:pett@cgl.ucsf.edu" class="">pett@cgl.ucsf.edu</a>><br class=""><b class="">Sent:</b><span class="Apple-converted-space"> </span>Monday, November 14, 2022 3:04 PM<br class=""><b class="">To:</b><span class="Apple-converted-space"> </span>Hernando J Sosa <<a href="mailto:hernando.sosa@einsteinmed.edu" class="">hernando.sosa@einsteinmed.edu</a>><br class=""><b class="">Cc:</b><span class="Apple-converted-space"> </span>Chimera <<a href="mailto:chimera-users@cgl.ucsf.edu" class="">chimera-users@cgl.ucsf.edu</a>><br class=""><b class="">Subject:</b><span class="Apple-converted-space"> </span>Re: [Chimera-users] Realign sequences</font><div class=""> </div></div><div class="" style="word-wrap: break-word; line-break: after-white-space;"><table cellspacing="3" cellpadding="3" border="4" style="background-color: rgb(254, 0, 0); border-collapse: collapse; border: 4px solid rgb(203, 203, 203); color: rgb(255, 204, 103); width: 489px; text-align: center;" class=""><tbody class=""><tr class=""><td class=""><i class="">CAUTION: This email comes from an external source; the attachments and/or links may compromise our secure environment. Do not open or click on suspicious emails. Please click on the “Phish Alert” button on the top right of the Outlook dashboard to report any suspicious emails.</i></td></tr></tbody></table><div class="">Hi Hernando,<div class=""><span class="x_x_Apple-tab-span" style="white-space: pre;"></span>So the first thing I want to say is that this is about a thousand times easier in ChimeraX, because the <a href="https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.rbvi.ucsf.edu%2Fchimerax%2Fdocs%2Fuser%2Fcommands%2Fsequence.html%23align&data=05%7C01%7Chernando.sosa%40einsteinmed.edu%7C0387de7384a0405b5e3508dac6874fcf%7C9c01f0fd65e040c089a82dfd51e62025%7C0%7C0%7C638040582449460272%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=vl8cURst3fUY3WPANch2WRbsKiGHq6V0ZV6knnI1Viw%3D&reserved=0" data-auth="Verified" originalsrc="https://www.rbvi.ucsf.edu/chimerax/docs/user/commands/sequence.html#align" shash="T2MYP5td1UhNvD9cB/YoVYbGOPDN6hm19+Iv9U67aMVgbrfUSNBgMtZ3HZaSDGzXAoR0be7WDEmXG9yst7k3BiALdHnSfYEqkP78yKJcFZ9m/fKSn0gerYBq60BYpkRugUB1VEQxSuo0IzqhzTXXMuF8lkUtT2bgOfPA1ZGoMho=" class="">"seq align" command</a> in ChimeraX does this directly.</div><div class=""><div class=""><span class="x_x_Apple-tab-span" style="white-space: pre;"></span>At any rate, you would use the computeRealignment() method rather than the realign() method (the latter is for when you already have the realigned sequence in hand). Getting the right argument values will be somewhat challenging. Depending on what realignment method you want to use, you will need to look at either Muscle.py or ClustalOmega.py in the MultAlignViewer folder to find the appropriate values. In particular, look at the return value of the get() method in those files. It returns a (service name, in/out flag strings, option strings) tuple. Those correspond directly to the<span class="Apple-converted-space"> </span><i class="">serviceName</i><span class="" style="font-style: normal;">,<span class="Apple-converted-space"> </span></span><i class="">inOutFlags</i><span class="" style="font-style: normal;">, and<span class="Apple-converted-space"> </span></span><i class="">options</i><span class="" style="font-style: normal;"> arguments of the computeRealignment() method. You will need to look at the lines above the return statement to find the strings that compose the<span class="Apple-converted-space"> </span></span><i class="">options</i> value. Lastly, if you are use Muscle realignment you will have to specify "reordersSequence=True" to the computeRealignment() call.</div><div class=""><span class="x_x_Apple-tab-span" style="white-space: pre;"></span>Good luck! :-)</div><div class=""><br class=""></div><div class=""><div class="">--Eric</div><div class=""><br class=""></div><div class=""><span class="x_x_Apple-tab-span" style="white-space: pre;"></span>Eric Pettersen</div><div class=""><span class="x_x_Apple-tab-span" style="white-space: pre;"></span>UCSF Computer Graphics Lab</div><div class=""><br class=""></div><blockquote type="cite" class=""><div class="">On Nov 12, 2022, at 4:01 PM, Hernando J Sosa via Chimera-users <<a href="mailto:chimera-users@cgl.ucsf.edu" data-auth="NotApplicable" class="">chimera-users@cgl.ucsf.edu</a>> wrote:</div><br class="x_x_Apple-interchange-newline"><div class=""><div class="x_x_elementToProof" style="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; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><br class="x_x_Apple-interchange-newline">Is there a way to realign sequences already in a multialign window within a python script? <span class="x_x_Apple-converted-space"> </span><br class=""></div><div class="x_x_elementToProof" style="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; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);">I want to do this because the first alignment dome using matchmaker in many cases contains mismatches to the aligned structures. Using the realign option in the menu fixes the problem but I want to do this within a script. <br class=""></div><div class="x_x_elementToProof" style="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; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><br class=""></div><div class="x_x_elementToProof" style="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; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);">I have code that creates the alignment window and then retrieves the instance:</div><div class="x_x_elementToProof x_x_ContentPasted0 x_x_ContentPasted3" style="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; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><br class=""></div><div class="x_x_elementToProof x_x_ContentPasted0 x_x_ContentPasted3" style="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; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);">from chimera.extension import manager<div class="x_x_ContentPasted3">from MultAlignViewer.MAViewer import MAViewer</div><div class="x_x_ContentPasted3"><br class=""></div><div class="x_x_ContentPasted4 x_x_ContentPasted3">runCommand('mm #0 #1 show true')<br class=""></div><div class="x_x_ContentPasted3">mavs = [inst for inst in manager.instances if isinstance(inst, MAViewer)]</div><div class="x_x_ContentPasted3 x_x_ContentPasted5">mymav = mavs[-1]</div><div class="x_x_ContentPasted3 x_x_ContentPasted5"><br class=""></div><div class="x_x_ContentPasted3 x_x_ContentPasted5">I tried then to do something like</div><div class="x_x_ContentPasted3 x_x_ContentPasted5">mymav.realign()</div><div class="x_x_ContentPasted3 x_x_ContentPasted5"><br class=""></div><div class="x_x_ContentPasted3 x_x_ContentPasted5">However, I don't know what parameters to put in the realign function, or whether this is the right function to use or whether there is a better way to do this.</div><div class="x_x_ContentPasted3 x_x_ContentPasted5"><br class=""></div><div class="x_x_ContentPasted3 x_x_ContentPasted5">Any help would be appreciated<br class=""></div><div class="x_x_ContentPasted3 x_x_ContentPasted5"><br class=""></div><div class="x_x_ContentPasted3 x_x_ContentPasted5">Thanks</div><div class="x_x_ContentPasted3 x_x_ContentPasted5"><br class=""></div><div class="x_x_ContentPasted3 x_x_ContentPasted5">Hernando<br class=""></div><br class=""></div><div class="x_x_ContentPasted2 x_x_ContentPasted0 x_x_elementToProof" style="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; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);"></div><div class="x_x_ContentPasted1 x_x_elementToProof x_x_ContentPasted0" style="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; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><br class=""></div><span class="" style="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; text-decoration: none; float: none; display: inline !important;">_______________________________________________</span><br class="" style="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; text-decoration: none;"><span class="" style="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; text-decoration: none; float: none; display: inline !important;">Chimera-users mailing list:<span class="x_x_Apple-converted-space"> </span></span><a href="mailto:Chimera-users@cgl.ucsf.edu" data-auth="NotApplicable" class="" style="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;">Chimera-users@cgl.ucsf.edu</a><br class="" style="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; text-decoration: none;"><span class="" style="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; text-decoration: none; float: none; display: inline !important;">Manage subscription:<span class="x_x_Apple-converted-space"> </span></span><a href="https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.rbvi.ucsf.edu%2Fmailman%2Flistinfo%2Fchimera-users&data=05%7C01%7Chernando.sosa%40einsteinmed.edu%7C0387de7384a0405b5e3508dac6874fcf%7C9c01f0fd65e040c089a82dfd51e62025%7C0%7C0%7C638040582449460272%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=tM0pGELY860WCJEx6KUo7af7CEpGNo3kUpoftgPjDcM%3D&reserved=0" data-auth="Verified" originalsrc="https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users" shash="Z2gq14usfbl2TkUpIETDClHkA+2fdbyNX2h3tdqEmf4nCQjE3GSaFvC0f2jOmT6h7y716oQ7P8vbDFEFhma+yEvJyzGMtQKdvWBLVyqMCuIYPeFh8P5lW+j3axQry2/OXCJnFQw33Qf1s1Ds+Ql8vGfQ/BzNtAbgLllIRiwVtjM=" class="" style="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;">https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users</a></div></blockquote></div><br class=""></div></div></div></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="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="https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users" style="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="">https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users</a></div></blockquote></div><br class=""></div></body></html>