No MMTK name for atom "H" in standard residue "GLY"
Dear all, i'm trying to minimize a peptide (Tools, Structure editing, Minimize Structure) but I obtain this error message: No MMTK name for atom "H" in standard residue "GLY". I have a Gly in position 1, does this depends on the NH protonation? Also, I fixed most of the residues, including Gly 1, trying to minimize a small region (Fixed Atoms: selected, in minimize panel) but still have the same errors. How can I solve it? Thanks for your help, Best Marco -- Dr Marco Sette, PhD. Department of Chemical Sciences and Technology University of Rome, "Tor Vergata" via della Ricerca Scientifica, 00133, Rome, Italy e-mail: sette@uniroma2.it Tel.: +39-0672594424 -- Questa email è stata esaminata alla ricerca di virus dal software antivirus Avast. www.avast.com
Is there a way to realign sequences already in a multialign window within a python script? 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. I have code that creates the alignment window and then retrieves the instance: from chimera.extension import manager from MultAlignViewer.MAViewer import MAViewer runCommand('mm #0 #1 show true') mavs = [inst for inst in manager.instances if isinstance(inst, MAViewer)] mymav = mavs[-1] I tried then to do something like mymav.realign() 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. Any help would be appreciated Thanks Hernando
Hi Hernando, So the first thing I want to say is that this is about a thousand times easier in ChimeraX, because the "seq align" command <https://www.rbvi.ucsf.edu/chimerax/docs/user/commands/sequence.html#align> in ChimeraX does this directly. 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 serviceName, inOutFlags, and options arguments of the computeRealignment() method. You will need to look at the lines above the return statement to find the strings that compose the options value. Lastly, if you are use Muscle realignment you will have to specify "reordersSequence=True" to the computeRealignment() call. Good luck! :-) --Eric Eric Pettersen UCSF Computer Graphics Lab
On Nov 12, 2022, at 4:01 PM, Hernando J Sosa via Chimera-users <chimera-users@cgl.ucsf.edu> wrote:
Is there a way to realign sequences already in a multialign window within a python script? 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.
I have code that creates the alignment window and then retrieves the instance:
from chimera.extension import manager from MultAlignViewer.MAViewer import MAViewer
runCommand('mm #0 #1 show true') mavs = [inst for inst in manager.instances if isinstance(inst, MAViewer)] mymav = mavs[-1]
I tried then to do something like mymav.realign()
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.
Any help would be appreciated
Thanks
Hernando
_______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu <mailto:Chimera-users@cgl.ucsf.edu> Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users <https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users>
Thanks Eric, I will try first with the computeRealignment() method. Both alignments algorithms seem to work so I'll try Crustal-Omega first. Most likely will have more questions coming. 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. Thanks again, Hernando ________________________________ From: Eric Pettersen <pett@cgl.ucsf.edu> Sent: Monday, November 14, 2022 3:04 PM To: Hernando J Sosa <hernando.sosa@einsteinmed.edu> Cc: Chimera <chimera-users@cgl.ucsf.edu> Subject: Re: [Chimera-users] Realign sequences 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. Hi Hernando, So the first thing I want to say is that this is about a thousand times easier in ChimeraX, because the "seq align" command<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%7C51e6f1e00b82448da82a08dac67b680e%7C9c01f0fd65e040c089a82dfd51e62025%7C0%7C0%7C638040530608108295%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=ls90S%2FQVnv814c0rJWqyDSnbQP6REGxMJZ6ZoTvVYEY%3D&reserved=0> in ChimeraX does this directly. 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 serviceName, inOutFlags, and options arguments of the computeRealignment() method. You will need to look at the lines above the return statement to find the strings that compose the options value. Lastly, if you are use Muscle realignment you will have to specify "reordersSequence=True" to the computeRealignment() call. Good luck! :-) --Eric Eric Pettersen UCSF Computer Graphics Lab On Nov 12, 2022, at 4:01 PM, Hernando J Sosa via Chimera-users <chimera-users@cgl.ucsf.edu<mailto:chimera-users@cgl.ucsf.edu>> wrote: Is there a way to realign sequences already in a multialign window within a python script? 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. I have code that creates the alignment window and then retrieves the instance: from chimera.extension import manager from MultAlignViewer.MAViewer import MAViewer runCommand('mm #0 #1 show true') mavs = [inst for inst in manager.instances if isinstance(inst, MAViewer)] mymav = mavs[-1] I tried then to do something like mymav.realign() 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. Any help would be appreciated Thanks Hernando _______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu<mailto:Chimera-users@cgl.ucsf.edu> Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users<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%7C51e6f1e00b82448da82a08dac67b680e%7C9c01f0fd65e040c089a82dfd51e62025%7C0%7C0%7C638040530608264514%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=gNhUsyA%2BvqiBWts2E0B8g1Mon37ow0kXFQnPO90HaTY%3D&reserved=0>
Hi Eric Using the following argument works: mav.computeRealignment("ClustalOmegaService", ("-i", "-o"),'--full') However, saving the corresponding association file using: mav.saveAssocInfo('myassocfile.txt') I get a file different from the one I get using the Multialign Viewer window menu MultialignViewer->File->Save Assoc Info... The saveAssocInfo statement is after the computeRealignment statement but perhaps for some reason I'm getting the association file corresponding to the first alignment ??? Thanks for any help on this issue. Best Hernando ___________________________________ Hernando Sosa Dept. of Biochemistry Albert Einstein College of Medicine 1300 Morris Park Av. Bronx NY 10461 phone (718) 430-3456 emai: hernando.sosa@einsteinmed.<mailto:hernando.sosa@einsteinmed.org>edu ___________________________________ ________________________________ From: Chimera-users <chimera-users-bounces@cgl.ucsf.edu> on behalf of Hernando J Sosa via Chimera-users <chimera-users@cgl.ucsf.edu> Sent: Monday, November 14, 2022 4:25 PM To: chimera-users@cgl.ucsf.edu List <chimera-users@cgl.ucsf.edu> Subject: Re: [Chimera-users] Realign sequences 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. Thanks Eric, I will try first with the computeRealignment() method. Both alignments algorithms seem to work so I'll try Crustal-Omega first. Most likely will have more questions coming. 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. Thanks again, Hernando ________________________________ From: Eric Pettersen <pett@cgl.ucsf.edu> Sent: Monday, November 14, 2022 3:04 PM To: Hernando J Sosa <hernando.sosa@einsteinmed.edu> Cc: Chimera <chimera-users@cgl.ucsf.edu> Subject: Re: [Chimera-users] Realign sequences 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. Hi Hernando, So the first thing I want to say is that this is about a thousand times easier in ChimeraX, because the "seq align" command<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> in ChimeraX does this directly. 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 serviceName, inOutFlags, and options arguments of the computeRealignment() method. You will need to look at the lines above the return statement to find the strings that compose the options value. Lastly, if you are use Muscle realignment you will have to specify "reordersSequence=True" to the computeRealignment() call. Good luck! :-) --Eric Eric Pettersen UCSF Computer Graphics Lab On Nov 12, 2022, at 4:01 PM, Hernando J Sosa via Chimera-users <chimera-users@cgl.ucsf.edu<mailto:chimera-users@cgl.ucsf.edu>> wrote: Is there a way to realign sequences already in a multialign window within a python script? 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. I have code that creates the alignment window and then retrieves the instance: from chimera.extension import manager from MultAlignViewer.MAViewer import MAViewer runCommand('mm #0 #1 show true') mavs = [inst for inst in manager.instances if isinstance(inst, MAViewer)] mymav = mavs[-1] I tried then to do something like mymav.realign() 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. Any help would be appreciated Thanks Hernando _______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu<mailto:Chimera-users@cgl.ucsf.edu> Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users<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>
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. 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: from chimera.tasks import manager mgr = manager() num_jobs = mgr.active_task_count() # should be zero unless your script is running other jobs ...call computeRealignment() from time import sleep while mgr.active_task_count() == num_jobs + 1: sleep(1) ...save association info --Eric
On Nov 14, 2022, at 3:16 PM, Hernando J Sosa via Chimera-users <chimera-users@cgl.ucsf.edu> wrote:
Hi Eric
Using the following argument works:
mav.computeRealignment("ClustalOmegaService", ("-i", "-o"),'--full')
However, saving the corresponding association file using:
mav.saveAssocInfo('myassocfile.txt')
I get a file different from the one I get using the Multialign Viewer window menu MultialignViewer->File->Save Assoc Info...
The saveAssocInfo statement is after the computeRealignment statement but perhaps for some reason I'm getting the association file corresponding to the first alignment ???
Thanks for any help on this issue.
Best
Hernando
___________________________________ Hernando Sosa Dept. of Biochemistry Albert Einstein College of Medicine 1300 Morris Park Av. Bronx NY 10461 phone (718) 430-3456 emai: hernando.sosa@einsteinmed. <mailto:hernando.sosa@einsteinmed.org>edu ___________________________________
From: Chimera-users <chimera-users-bounces@cgl.ucsf.edu <mailto:chimera-users-bounces@cgl.ucsf.edu>> on behalf of Hernando J Sosa via Chimera-users <chimera-users@cgl.ucsf.edu <mailto:chimera-users@cgl.ucsf.edu>> Sent: Monday, November 14, 2022 4:25 PM To: chimera-users@cgl.ucsf.edu <mailto:chimera-users@cgl.ucsf.edu> List <chimera-users@cgl.ucsf.edu <mailto:chimera-users@cgl.ucsf.edu>> Subject: Re: [Chimera-users] Realign sequences
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. Thanks Eric,
I will try first with the computeRealignment() method. Both alignments algorithms seem to work so I'll try Crustal-Omega first. Most likely will have more questions coming.
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.
Thanks again,
Hernando
From: Eric Pettersen <pett@cgl.ucsf.edu <mailto:pett@cgl.ucsf.edu>> Sent: Monday, November 14, 2022 3:04 PM To: Hernando J Sosa <hernando.sosa@einsteinmed.edu <mailto:hernando.sosa@einsteinmed.edu>> Cc: Chimera <chimera-users@cgl.ucsf.edu <mailto:chimera-users@cgl.ucsf.edu>> Subject: Re: [Chimera-users] Realign sequences
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. Hi Hernando, So the first thing I want to say is that this is about a thousand times easier in ChimeraX, because the "seq align" command <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> in ChimeraX does this directly. 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 serviceName, inOutFlags, and options arguments of the computeRealignment() method. You will need to look at the lines above the return statement to find the strings that compose the options value. Lastly, if you are use Muscle realignment you will have to specify "reordersSequence=True" to the computeRealignment() call. Good luck! :-)
--Eric
Eric Pettersen UCSF Computer Graphics Lab
On Nov 12, 2022, at 4:01 PM, Hernando J Sosa via Chimera-users <chimera-users@cgl.ucsf.edu <mailto:chimera-users@cgl.ucsf.edu>> wrote:
Is there a way to realign sequences already in a multialign window within a python script? 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.
I have code that creates the alignment window and then retrieves the instance:
from chimera.extension import manager from MultAlignViewer.MAViewer import MAViewer
runCommand('mm #0 #1 show true') mavs = [inst for inst in manager.instances if isinstance(inst, MAViewer)] mymav = mavs[-1]
I tried then to do something like mymav.realign()
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.
Any help would be appreciated
Thanks
Hernando
_______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu <mailto:Chimera-users@cgl.ucsf.edu> Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users <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>
Chimera-users mailing list: Chimera-users@cgl.ucsf.edu <mailto:Chimera-users@cgl.ucsf.edu> Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users <https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users>
Hi Eric, With these instructions now the program hangs after the computeRealignment() call. I am running the script though idle, Not sure if this would be part of the problem ?? I checked that mgr.active_task_count() return a value of zero before the computeRealignment() call and 1 after. but the script hangs there Thanks Hernando ________________________________ From: Eric Pettersen <pett@cgl.ucsf.edu> Sent: Monday, November 14, 2022 6:43 PM To: Hernando J Sosa <hernando.sosa@einsteinmed.edu> Cc: chimera-users@cgl.ucsf.edu <chimera-users@cgl.ucsf.edu> Subject: Re: [Chimera-users] Realign sequences 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. 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. 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: from chimera.tasks import manager mgr = manager() num_jobs = mgr.active_task_count() # should be zero unless your script is running other jobs ...call computeRealignment() from time import sleep while mgr.active_task_count() == num_jobs + 1: sleep(1) ...save association info --Eric On Nov 14, 2022, at 3:16 PM, Hernando J Sosa via Chimera-users <chimera-users@cgl.ucsf.edu<mailto:chimera-users@cgl.ucsf.edu>> wrote: Hi Eric Using the following argument works: mav.computeRealignment("ClustalOmegaService", ("-i", "-o"),'--full') However, saving the corresponding association file using: mav.saveAssocInfo('myassocfile.txt') I get a file different from the one I get using the Multialign Viewer window menu MultialignViewer->File->Save Assoc Info... The saveAssocInfo statement is after the computeRealignment statement but perhaps for some reason I'm getting the association file corresponding to the first alignment ??? Thanks for any help on this issue. Best Hernando ___________________________________ Hernando Sosa Dept. of Biochemistry Albert Einstein College of Medicine 1300 Morris Park Av. Bronx NY 10461 phone (718) 430-3456 emai: hernando.sosa@einsteinmed.<mailto:hernando.sosa@einsteinmed.org>edu ___________________________________ ________________________________ From: Chimera-users <chimera-users-bounces@cgl.ucsf.edu<mailto:chimera-users-bounces@cgl.ucsf.edu>> on behalf of Hernando J Sosa via Chimera-users <chimera-users@cgl.ucsf.edu<mailto:chimera-users@cgl.ucsf.edu>> Sent: Monday, November 14, 2022 4:25 PM To: chimera-users@cgl.ucsf.edu<mailto:chimera-users@cgl.ucsf.edu> List <chimera-users@cgl.ucsf.edu<mailto:chimera-users@cgl.ucsf.edu>> Subject: Re: [Chimera-users] Realign sequences 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. Thanks Eric, I will try first with the computeRealignment() method. Both alignments algorithms seem to work so I'll try Crustal-Omega first. Most likely will have more questions coming. 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. Thanks again, Hernando ________________________________ From: Eric Pettersen <pett@cgl.ucsf.edu<mailto:pett@cgl.ucsf.edu>> Sent: Monday, November 14, 2022 3:04 PM To: Hernando J Sosa <hernando.sosa@einsteinmed.edu<mailto:hernando.sosa@einsteinmed.edu>> Cc: Chimera <chimera-users@cgl.ucsf.edu<mailto:chimera-users@cgl.ucsf.edu>> Subject: Re: [Chimera-users] Realign sequences 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. Hi Hernando, So the first thing I want to say is that this is about a thousand times easier in ChimeraX, because the "seq align" command<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%7Ca4e9c4da2fbc426ea96508dac699ff47%7C9c01f0fd65e040c089a82dfd51e62025%7C0%7C0%7C638040661992821972%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=7D8capYxHlZ02%2B0k9PDxnyQKAZRtYLOxxAxRqjGJGok%3D&reserved=0> in ChimeraX does this directly. 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 serviceName, inOutFlags, and options arguments of the computeRealignment() method. You will need to look at the lines above the return statement to find the strings that compose the options value. Lastly, if you are use Muscle realignment you will have to specify "reordersSequence=True" to the computeRealignment() call. Good luck! :-) --Eric Eric Pettersen UCSF Computer Graphics Lab On Nov 12, 2022, at 4:01 PM, Hernando J Sosa via Chimera-users <chimera-users@cgl.ucsf.edu<mailto:chimera-users@cgl.ucsf.edu>> wrote: Is there a way to realign sequences already in a multialign window within a python script? 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. I have code that creates the alignment window and then retrieves the instance: from chimera.extension import manager from MultAlignViewer.MAViewer import MAViewer runCommand('mm #0 #1 show true') mavs = [inst for inst in manager.instances if isinstance(inst, MAViewer)] mymav = mavs[-1] I tried then to do something like mymav.realign() 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. Any help would be appreciated Thanks Hernando _______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu<mailto:Chimera-users@cgl.ucsf.edu> Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users<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%7Ca4e9c4da2fbc426ea96508dac699ff47%7C9c01f0fd65e040c089a82dfd51e62025%7C0%7C0%7C638040661992821972%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=IfGcSeWPTzdq7YxyWGCPcpo%2BjjemX3z%2BRF5PvWvo7Yg%3D&reserved=0> _______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu<mailto:Chimera-users@cgl.ucsf.edu> Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users<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%7Ca4e9c4da2fbc426ea96508dac699ff47%7C9c01f0fd65e040c089a82dfd51e62025%7C0%7C0%7C638040661992821972%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=IfGcSeWPTzdq7YxyWGCPcpo%2BjjemX3z%2BRF5PvWvo7Yg%3D&reserved=0>
Ah, need to add a call to get the background task callback to occur. After the sleep() call add: from chimera import tkgui tkgui.app.update() --Eric
On Nov 15, 2022, at 8:46 AM, Hernando J Sosa via Chimera-users <chimera-users@cgl.ucsf.edu> wrote:
Hi Eric,
With these instructions now the program hangs after the computeRealignment() call. I am running the script though idle, Not sure if this would be part of the problem ?? I checked that mgr.active_task_count() return a value of zero before the computeRealignment() call and 1 after. but the script hangs there
Thanks
Hernando
From: Eric Pettersen <pett@cgl.ucsf.edu <mailto:pett@cgl.ucsf.edu>> Sent: Monday, November 14, 2022 6:43 PM To: Hernando J Sosa <hernando.sosa@einsteinmed.edu <mailto:hernando.sosa@einsteinmed.edu>> Cc: chimera-users@cgl.ucsf.edu <mailto:chimera-users@cgl.ucsf.edu> <chimera-users@cgl.ucsf.edu <mailto:chimera-users@cgl.ucsf.edu>> Subject: Re: [Chimera-users] Realign sequences
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. 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.
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:
from chimera.tasks import manager mgr = manager() num_jobs = mgr.active_task_count() # should be zero unless your script is running other jobs
...call computeRealignment()
from time import sleep while mgr.active_task_count() == num_jobs + 1: sleep(1)
...save association info
--Eric
On Nov 14, 2022, at 3:16 PM, Hernando J Sosa via Chimera-users <chimera-users@cgl.ucsf.edu <mailto:chimera-users@cgl.ucsf.edu>> wrote:
Hi Eric
Using the following argument works:
mav.computeRealignment("ClustalOmegaService", ("-i", "-o"),'--full')
However, saving the corresponding association file using:
mav.saveAssocInfo('myassocfile.txt')
I get a file different from the one I get using the Multialign Viewer window menu MultialignViewer->File->Save Assoc Info...
The saveAssocInfo statement is after the computeRealignment statement but perhaps for some reason I'm getting the association file corresponding to the first alignment ???
Thanks for any help on this issue.
Best
Hernando
___________________________________ Hernando Sosa Dept. of Biochemistry Albert Einstein College of Medicine 1300 Morris Park Av. Bronx NY 10461 phone (718) 430-3456 emai: hernando.sosa@einsteinmed. <mailto:hernando.sosa@einsteinmed.org>edu ___________________________________
From: Chimera-users <chimera-users-bounces@cgl.ucsf.edu <mailto:chimera-users-bounces@cgl.ucsf.edu>> on behalf of Hernando J Sosa via Chimera-users <chimera-users@cgl.ucsf.edu <mailto:chimera-users@cgl.ucsf.edu>> Sent: Monday, November 14, 2022 4:25 PM To: chimera-users@cgl.ucsf.edu <mailto:chimera-users@cgl.ucsf.edu> List <chimera-users@cgl.ucsf.edu <mailto:chimera-users@cgl.ucsf.edu>> Subject: Re: [Chimera-users] Realign sequences
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. Thanks Eric,
I will try first with the computeRealignment() method. Both alignments algorithms seem to work so I'll try Crustal-Omega first. Most likely will have more questions coming.
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.
Thanks again,
Hernando
From: Eric Pettersen <pett@cgl.ucsf.edu <mailto:pett@cgl.ucsf.edu>> Sent: Monday, November 14, 2022 3:04 PM To: Hernando J Sosa <hernando.sosa@einsteinmed.edu <mailto:hernando.sosa@einsteinmed.edu>> Cc: Chimera <chimera-users@cgl.ucsf.edu <mailto:chimera-users@cgl.ucsf.edu>> Subject: Re: [Chimera-users] Realign sequences
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. Hi Hernando, So the first thing I want to say is that this is about a thousand times easier in ChimeraX, because the "seq align" command <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%7Ca4e9c4da2fbc426ea96508dac699ff47%7C9c01f0fd65e040c089a82dfd51e62025%7C0%7C0%7C638040661992821972%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=7D8capYxHlZ02%2B0k9PDxnyQKAZRtYLOxxAxRqjGJGok%3D&reserved=0> in ChimeraX does this directly. 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 serviceName, inOutFlags, and options arguments of the computeRealignment() method. You will need to look at the lines above the return statement to find the strings that compose the options value. Lastly, if you are use Muscle realignment you will have to specify "reordersSequence=True" to the computeRealignment() call. Good luck! :-)
--Eric
Eric Pettersen UCSF Computer Graphics Lab
On Nov 12, 2022, at 4:01 PM, Hernando J Sosa via Chimera-users <chimera-users@cgl.ucsf.edu <mailto:chimera-users@cgl.ucsf.edu>> wrote:
Is there a way to realign sequences already in a multialign window within a python script? 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.
I have code that creates the alignment window and then retrieves the instance:
from chimera.extension import manager from MultAlignViewer.MAViewer import MAViewer
runCommand('mm #0 #1 show true') mavs = [inst for inst in manager.instances if isinstance(inst, MAViewer)] mymav = mavs[-1]
I tried then to do something like mymav.realign()
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.
Any help would be appreciated
Thanks
Hernando
_______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu <mailto:Chimera-users@cgl.ucsf.edu> Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users <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%7Ca4e9c4da2fbc426ea96508dac699ff47%7C9c01f0fd65e040c089a82dfd51e62025%7C0%7C0%7C638040661992821972%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=IfGcSeWPTzdq7YxyWGCPcpo%2BjjemX3z%2BRF5PvWvo7Yg%3D&reserved=0>
Chimera-users mailing list: Chimera-users@cgl.ucsf.edu <mailto:Chimera-users@cgl.ucsf.edu> Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users <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%7Ca4e9c4da2fbc426ea96508dac699ff47%7C9c01f0fd65e040c089a82dfd51e62025%7C0%7C0%7C638040661992821972%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=IfGcSeWPTzdq7YxyWGCPcpo%2BjjemX3z%2BRF5PvWvo7Yg%3D&reserved=0>
Chimera-users mailing list: Chimera-users@cgl.ucsf.edu <mailto:Chimera-users@cgl.ucsf.edu> Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users <https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users>
Thanks Eric, Yes, these were the last instructions needed to make it work. Now the right association file with the realigned sequences is produced. Thanks again Best Hernando ___________________________________ Hernando Sosa Dept. of Biochemistry Albert Einstein College of Medicine 1300 Morris Park Av. Bronx NY 10461 phone (718) 430-3456 emai: hernando.sosa@einsteinmed.<mailto:hernando.sosa@einsteinmed.org>edu ___________________________________ ________________________________ From: Eric Pettersen <pett@cgl.ucsf.edu> Sent: Tuesday, November 15, 2022 1:51 PM To: Hernando J Sosa <hernando.sosa@einsteinmed.edu> Cc: Chimera <chimera-users@cgl.ucsf.edu> Subject: Re: [Chimera-users] Realign sequences 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. Ah, need to add a call to get the background task callback to occur. After the sleep() call add: from chimera import tkgui tkgui.app.update() --Eric On Nov 15, 2022, at 8:46 AM, Hernando J Sosa via Chimera-users <chimera-users@cgl.ucsf.edu<mailto:chimera-users@cgl.ucsf.edu>> wrote: Hi Eric, With these instructions now the program hangs after the computeRealignment() call. I am running the script though idle, Not sure if this would be part of the problem ?? I checked that mgr.active_task_count() return a value of zero before the computeRealignment() call and 1 after. but the script hangs there Thanks Hernando ________________________________ From: Eric Pettersen <pett@cgl.ucsf.edu<mailto:pett@cgl.ucsf.edu>> Sent: Monday, November 14, 2022 6:43 PM To: Hernando J Sosa <hernando.sosa@einsteinmed.edu<mailto:hernando.sosa@einsteinmed.edu>> Cc: chimera-users@cgl.ucsf.edu<mailto:chimera-users@cgl.ucsf.edu> <chimera-users@cgl.ucsf.edu<mailto:chimera-users@cgl.ucsf.edu>> Subject: Re: [Chimera-users] Realign sequences 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. 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. 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: from chimera.tasks import manager mgr = manager() num_jobs = mgr.active_task_count() # should be zero unless your script is running other jobs ...call computeRealignment() from time import sleep while mgr.active_task_count() == num_jobs + 1: sleep(1) ...save association info --Eric On Nov 14, 2022, at 3:16 PM, Hernando J Sosa via Chimera-users <chimera-users@cgl.ucsf.edu<mailto:chimera-users@cgl.ucsf.edu>> wrote: Hi Eric Using the following argument works: mav.computeRealignment("ClustalOmegaService", ("-i", "-o"),'--full') However, saving the corresponding association file using: mav.saveAssocInfo('myassocfile.txt') I get a file different from the one I get using the Multialign Viewer window menu MultialignViewer->File->Save Assoc Info... The saveAssocInfo statement is after the computeRealignment statement but perhaps for some reason I'm getting the association file corresponding to the first alignment ??? Thanks for any help on this issue. Best Hernando ___________________________________ Hernando Sosa Dept. of Biochemistry Albert Einstein College of Medicine 1300 Morris Park Av. Bronx NY 10461 phone (718) 430-3456 emai: hernando.sosa@einsteinmed.<mailto:hernando.sosa@einsteinmed.org>edu ___________________________________ ________________________________ From: Chimera-users <chimera-users-bounces@cgl.ucsf.edu<mailto:chimera-users-bounces@cgl.ucsf.edu>> on behalf of Hernando J Sosa via Chimera-users <chimera-users@cgl.ucsf.edu<mailto:chimera-users@cgl.ucsf.edu>> Sent: Monday, November 14, 2022 4:25 PM To: chimera-users@cgl.ucsf.edu<mailto:chimera-users@cgl.ucsf.edu> List <chimera-users@cgl.ucsf.edu<mailto:chimera-users@cgl.ucsf.edu>> Subject: Re: [Chimera-users] Realign sequences 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. Thanks Eric, I will try first with the computeRealignment() method. Both alignments algorithms seem to work so I'll try Crustal-Omega first. Most likely will have more questions coming. 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. Thanks again, Hernando ________________________________ From: Eric Pettersen <pett@cgl.ucsf.edu<mailto:pett@cgl.ucsf.edu>> Sent: Monday, November 14, 2022 3:04 PM To: Hernando J Sosa <hernando.sosa@einsteinmed.edu<mailto:hernando.sosa@einsteinmed.edu>> Cc: Chimera <chimera-users@cgl.ucsf.edu<mailto:chimera-users@cgl.ucsf.edu>> Subject: Re: [Chimera-users] Realign sequences 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. Hi Hernando, So the first thing I want to say is that this is about a thousand times easier in ChimeraX, because the "seq align" command<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%7Ce8d63f5972be459d3c1708dac73a5ce1%7C9c01f0fd65e040c089a82dfd51e62025%7C0%7C0%7C638041350739139034%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=jXqCj8TWOGAnaubPqVeNR2IjEvx3%2F%2F%2BAmnpIGDL0Ty8%3D&reserved=0> in ChimeraX does this directly. 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 serviceName, inOutFlags, and options arguments of the computeRealignment() method. You will need to look at the lines above the return statement to find the strings that compose the options value. Lastly, if you are use Muscle realignment you will have to specify "reordersSequence=True" to the computeRealignment() call. Good luck! :-) --Eric Eric Pettersen UCSF Computer Graphics Lab On Nov 12, 2022, at 4:01 PM, Hernando J Sosa via Chimera-users <chimera-users@cgl.ucsf.edu<mailto:chimera-users@cgl.ucsf.edu>> wrote: Is there a way to realign sequences already in a multialign window within a python script? 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. I have code that creates the alignment window and then retrieves the instance: from chimera.extension import manager from MultAlignViewer.MAViewer import MAViewer runCommand('mm #0 #1 show true') mavs = [inst for inst in manager.instances if isinstance(inst, MAViewer)] mymav = mavs[-1] I tried then to do something like mymav.realign() 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. Any help would be appreciated Thanks Hernando _______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu<mailto:Chimera-users@cgl.ucsf.edu> Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users<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%7Ce8d63f5972be459d3c1708dac73a5ce1%7C9c01f0fd65e040c089a82dfd51e62025%7C0%7C0%7C638041350739139034%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=92trtKcB5KkXpwuX4UBI0KO8mjarol8T63Ca9oVatTM%3D&reserved=0> _______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu<mailto:Chimera-users@cgl.ucsf.edu> Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users<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%7Ce8d63f5972be459d3c1708dac73a5ce1%7C9c01f0fd65e040c089a82dfd51e62025%7C0%7C0%7C638041350739139034%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=92trtKcB5KkXpwuX4UBI0KO8mjarol8T63Ca9oVatTM%3D&reserved=0> _______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu<mailto:Chimera-users@cgl.ucsf.edu> Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users<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%7Ce8d63f5972be459d3c1708dac73a5ce1%7C9c01f0fd65e040c089a82dfd51e62025%7C0%7C0%7C638041350739139034%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=92trtKcB5KkXpwuX4UBI0KO8mjarol8T63Ca9oVatTM%3D&reserved=0>
Great! You should still use ChimeraX, :-) --Eric
On Nov 15, 2022, at 3:40 PM, Hernando J Sosa via Chimera-users <chimera-users@cgl.ucsf.edu> wrote:
Thanks Eric,
Yes, these were the last instructions needed to make it work. Now the right association file with the realigned sequences is produced.
Thanks again
Best
Hernando
___________________________________ Hernando Sosa Dept. of Biochemistry Albert Einstein College of Medicine 1300 Morris Park Av. Bronx NY 10461 phone (718) 430-3456 emai: hernando.sosa@einsteinmed. <mailto:hernando.sosa@einsteinmed.org>edu ___________________________________
From: Eric Pettersen <pett@cgl.ucsf.edu <mailto:pett@cgl.ucsf.edu>> Sent: Tuesday, November 15, 2022 1:51 PM To: Hernando J Sosa <hernando.sosa@einsteinmed.edu <mailto:hernando.sosa@einsteinmed.edu>> Cc: Chimera <chimera-users@cgl.ucsf.edu <mailto:chimera-users@cgl.ucsf.edu>> Subject: Re: [Chimera-users] Realign sequences
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. Ah, need to add a call to get the background task callback to occur. After the sleep() call add:
from chimera import tkgui tkgui.app.update()
--Eric
On Nov 15, 2022, at 8:46 AM, Hernando J Sosa via Chimera-users <chimera-users@cgl.ucsf.edu <mailto:chimera-users@cgl.ucsf.edu>> wrote:
Hi Eric,
With these instructions now the program hangs after the computeRealignment() call. I am running the script though idle, Not sure if this would be part of the problem ?? I checked that mgr.active_task_count() return a value of zero before the computeRealignment() call and 1 after. but the script hangs there
Thanks
Hernando
From: Eric Pettersen <pett@cgl.ucsf.edu <mailto:pett@cgl.ucsf.edu>> Sent: Monday, November 14, 2022 6:43 PM To: Hernando J Sosa <hernando.sosa@einsteinmed.edu <mailto:hernando.sosa@einsteinmed.edu>> Cc: chimera-users@cgl.ucsf.edu <mailto:chimera-users@cgl.ucsf.edu> <chimera-users@cgl.ucsf.edu <mailto:chimera-users@cgl.ucsf.edu>> Subject: Re: [Chimera-users] Realign sequences
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. 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.
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:
from chimera.tasks import manager mgr = manager() num_jobs = mgr.active_task_count() # should be zero unless your script is running other jobs
...call computeRealignment()
from time import sleep while mgr.active_task_count() == num_jobs + 1: sleep(1)
...save association info
--Eric
On Nov 14, 2022, at 3:16 PM, Hernando J Sosa via Chimera-users <chimera-users@cgl.ucsf.edu <mailto:chimera-users@cgl.ucsf.edu>> wrote:
Hi Eric
Using the following argument works:
mav.computeRealignment("ClustalOmegaService", ("-i", "-o"),'--full')
However, saving the corresponding association file using:
mav.saveAssocInfo('myassocfile.txt')
I get a file different from the one I get using the Multialign Viewer window menu MultialignViewer->File->Save Assoc Info...
The saveAssocInfo statement is after the computeRealignment statement but perhaps for some reason I'm getting the association file corresponding to the first alignment ???
Thanks for any help on this issue.
Best
Hernando
___________________________________ Hernando Sosa Dept. of Biochemistry Albert Einstein College of Medicine 1300 Morris Park Av. Bronx NY 10461 phone (718) 430-3456 emai: hernando.sosa@einsteinmed. <mailto:hernando.sosa@einsteinmed.org>edu ___________________________________
From: Chimera-users <chimera-users-bounces@cgl.ucsf.edu <mailto:chimera-users-bounces@cgl.ucsf.edu>> on behalf of Hernando J Sosa via Chimera-users <chimera-users@cgl.ucsf.edu <mailto:chimera-users@cgl.ucsf.edu>> Sent: Monday, November 14, 2022 4:25 PM To: chimera-users@cgl.ucsf.edu <mailto:chimera-users@cgl.ucsf.edu> List <chimera-users@cgl.ucsf.edu <mailto:chimera-users@cgl.ucsf.edu>> Subject: Re: [Chimera-users] Realign sequences
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. Thanks Eric,
I will try first with the computeRealignment() method. Both alignments algorithms seem to work so I'll try Crustal-Omega first. Most likely will have more questions coming.
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.
Thanks again,
Hernando
From: Eric Pettersen <pett@cgl.ucsf.edu <mailto:pett@cgl.ucsf.edu>> Sent: Monday, November 14, 2022 3:04 PM To: Hernando J Sosa <hernando.sosa@einsteinmed.edu <mailto:hernando.sosa@einsteinmed.edu>> Cc: Chimera <chimera-users@cgl.ucsf.edu <mailto:chimera-users@cgl.ucsf.edu>> Subject: Re: [Chimera-users] Realign sequences
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. Hi Hernando, So the first thing I want to say is that this is about a thousand times easier in ChimeraX, because the "seq align" command <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%7Ce8d63f5972be459d3c1708dac73a5ce1%7C9c01f0fd65e040c089a82dfd51e62025%7C0%7C0%7C638041350739139034%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=jXqCj8TWOGAnaubPqVeNR2IjEvx3%2F%2F%2BAmnpIGDL0Ty8%3D&reserved=0> in ChimeraX does this directly. 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 serviceName, inOutFlags, and options arguments of the computeRealignment() method. You will need to look at the lines above the return statement to find the strings that compose the options value. Lastly, if you are use Muscle realignment you will have to specify "reordersSequence=True" to the computeRealignment() call. Good luck! :-)
--Eric
Eric Pettersen UCSF Computer Graphics Lab
On Nov 12, 2022, at 4:01 PM, Hernando J Sosa via Chimera-users <chimera-users@cgl.ucsf.edu <mailto:chimera-users@cgl.ucsf.edu>> wrote:
Is there a way to realign sequences already in a multialign window within a python script? 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.
I have code that creates the alignment window and then retrieves the instance:
from chimera.extension import manager from MultAlignViewer.MAViewer import MAViewer
runCommand('mm #0 #1 show true') mavs = [inst for inst in manager.instances if isinstance(inst, MAViewer)] mymav = mavs[-1]
I tried then to do something like mymav.realign()
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.
Any help would be appreciated
Thanks
Hernando
_______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu <mailto:Chimera-users@cgl.ucsf.edu> Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users <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%7Ce8d63f5972be459d3c1708dac73a5ce1%7C9c01f0fd65e040c089a82dfd51e62025%7C0%7C0%7C638041350739139034%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=92trtKcB5KkXpwuX4UBI0KO8mjarol8T63Ca9oVatTM%3D&reserved=0>
Chimera-users mailing list: Chimera-users@cgl.ucsf.edu <mailto:Chimera-users@cgl.ucsf.edu> Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users <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%7Ce8d63f5972be459d3c1708dac73a5ce1%7C9c01f0fd65e040c089a82dfd51e62025%7C0%7C0%7C638041350739139034%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=92trtKcB5KkXpwuX4UBI0KO8mjarol8T63Ca9oVatTM%3D&reserved=0>
Chimera-users mailing list: Chimera-users@cgl.ucsf.edu <mailto:Chimera-users@cgl.ucsf.edu> Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users <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%7Ce8d63f5972be459d3c1708dac73a5ce1%7C9c01f0fd65e040c089a82dfd51e62025%7C0%7C0%7C638041350739139034%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=92trtKcB5KkXpwuX4UBI0KO8mjarol8T63Ca9oVatTM%3D&reserved=0>
Chimera-users mailing list: Chimera-users@cgl.ucsf.edu <mailto:Chimera-users@cgl.ucsf.edu> Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users <https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users>
Hi Marco, Chimera assigns partial charges and atom types to the atoms of standard residues by looking up the atom name in a table. That means that those atoms have to have their PDB standard names. There is no atom named 'H' in a standard N-terminal glycine. The hydrogens attached to the N should be named H1, H2, and H3, and the ones attached to the CA should be named HA1 and HA2. Assuming it wasn't Chimera that added this 'H', an easy way to fix it is with the commands (Favorites→Command Line) "del H" followed by "addh". Then you should be able to minimize. --Eric Eric Pettersen UCSF Computer Graphics Lab
On Nov 12, 2022, at 3:15 AM, Marco Sette via Chimera-users <chimera-users@cgl.ucsf.edu> wrote:
Dear all,
i'm trying to minimize a peptide (Tools, Structure editing, Minimize Structure) but I obtain this error message: No MMTK name for atom "H" in standard residue "GLY".
I have a Gly in position 1, does this depends on the NH protonation?
Also, I fixed most of the residues, including Gly 1, trying to minimize a small region (Fixed Atoms: selected, in minimize panel) but still have the same errors.
How can I solve it?
Thanks for your help,
Best
Marco
-- Dr Marco Sette, PhD. Department of Chemical Sciences and Technology University of Rome, "Tor Vergata" via della Ricerca Scientifica, 00133, Rome, Italy e-mail: sette@uniroma2.it Tel.: +39-0672594424
-- Questa email è stata esaminata alla ricerca di virus dal software antivirus Avast. www.avast.com
_______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users
Hi Eric, it works ! :) Thanks a lot, Best, Marco Il 14/11/2022 22:24, Eric Pettersen ha scritto:
Hi Marco, Chimera assigns partial charges and atom types to the atoms of standard residues by looking up the atom name in a table. That means that those atoms have to have their PDB standard names. There is no atom named 'H' in a standard N-terminal glycine. The hydrogens attached to the N should be named H1, H2, and H3, and the ones attached to the CA should be named HA1 and HA2. Assuming it wasn't Chimera that added this 'H', an easy way to fix it is with the commands (Favorites→Command Line) "del H" followed by "addh". Then you should be able to minimize.
--Eric
Eric Pettersen UCSF Computer Graphics Lab
On Nov 12, 2022, at 3:15 AM, Marco Sette via Chimera-users <chimera-users@cgl.ucsf.edu> wrote:
Dear all,
i'm trying to minimize a peptide (Tools, Structure editing, Minimize Structure) but I obtain this error message: No MMTK name for atom "H" in standard residue "GLY".
I have a Gly in position 1, does this depends on the NH protonation?
Also, I fixed most of the residues, including Gly 1, trying to minimize a small region (Fixed Atoms: selected, in minimize panel) but still have the same errors.
How can I solve it?
Thanks for your help,
Best
Marco
-- Dr Marco Sette, PhD. Department of Chemical Sciences and Technology University of Rome, "Tor Vergata" via della Ricerca Scientifica, 00133, Rome, Italy e-mail: sette@uniroma2.it Tel.: +39-0672594424
-- Questa email è stata esaminata alla ricerca di virus dal software antivirus Avast. www.avast.com
_______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users
-- Dr Marco Sette, PhD. Department of Chemical Sciences and Technology University of Rome, "Tor Vergata" via della Ricerca Scientifica, 00133, Rome, Italy e-mail: sette@uniroma2.it Tel.: +39-0672594424
participants (3)
-
Eric Pettersen
-
Hernando J Sosa
-
Marco Sette