Re: [COOT] Macros in COOT--use VB to write python code

2010-01-27 Thread Wes Ozarowski
 
Dear  Andrew,
 
Since I don't have the time to learn python fully  and because there is 
not too many of examples of python scripting  available for Coot, thus I 
use my expertise of VB to help me write the correct  syntax for python script. 
then paste it into notepad and run it as a python  script from Coot's GUI.
 
For example I will paste an amino acid sequence of  homologous proteins 
from ClustalW into an excel spreadsheet, then using VB to  write a program 
that will put each amino acid into it's own spreadsheet cell as  separate 
objects with some fancy colors ( as color codes) to make it  pretty. Now, I 
can do all sorts of analyses of these sequences, like find the  ones that are 
non-homologous between two proteins, put them in a table, let  VB write the  
python syntax for "goto" and "mutate_autofit " of all these  specific amino 
acids, paste it into notepad and "wala !" i have automation.  That is ,I 
can goto  (thus observe visually the mutational changes for  oddballs) and 
mutate_autofit about 300 amino acids in about 10 min, rather  than spending 
hours doing it manually.
 
   Wes

 
 
 
 
 
 
 
In a message dated 1/19/2010 10:56:53 A.M. Central Standard Time,  
and...@mrc-lmb.cam.ac.uk writes:

Having  worked with O for many years I am only now getting serious with   
COOT. There are a couple of things that I would like to do that  don't  
seem to be available (as far as I can tell), but which may  well be  
possible using Macros.

Unfortunately  a quick  Google has not revealed anything about how to  
use macros in COOT,  but a colleague suggested they need to be written  
in Python or  another language that I had not heard of before.

So my first question  is where can I find a low level description of  
how to write macros  with some examples (I know nothing about Python,  
except that it is  fashionable) ?

There are specifically two things I want to be able to  do:

1. Do an LSQ superposition using specified residues in multiple  chains  
(superposing one oligomer on another).

2. To do a LSQ  superposition of a homologous structure onto my working  
structure  using +/- N residues about the current position, where N is  
a  variable (not essential, could be fixed) and the current position is   
the last residue that I clicked  on.

Thanks

Andrew



Re: [COOT] Macros in COOT--use VB to write python code

2010-01-28 Thread Paul Emsley

Goodness, sounds like fun.

Coot does have an align&mutate function of course, but you don't get to 
fiddle with the sequence alignment - Coot uses its own alignment [1].  
My understanding is that should be fine for ~70% sequence identity or 
better.  My feeling though is that it is not widely used. So my question 
to the community is: Is there a need to be able to use an alignment 
rather than simply a target sequence?


Thanks,

Paul.

[1] courtesy  of mmdb


Wes Ozarowski wrote:
 
Dear  Andrew,
 
Since I don't have the time to learn python fully and because 
there is not too many of examples of python scripting available for 
Coot, thus I use my expertise of VB to help me write the correct 
syntax for python script. then paste it into notepad and run it as a 
python script from Coot's GUI.
 
For example I will paste an amino acid sequence of homologous 
proteins from ClustalW into an excel spreadsheet, then using VB to 
write a program that will put each amino acid into it's own 
spreadsheet cell as separate objects with some fancy colors ( as color 
codes) to make it pretty. Now, I can do all sorts of analyses of these 
sequences, like find the ones that are non-homologous between two 
proteins, put them in a table, let VB write the  python syntax for 
"goto" and "mutate_autofit " of all these specific amino acids, paste 
it into notepad and "wala !" i have automation. That is ,I can goto  
(thus observe visually the mutational changes for oddballs) and 
mutate_autofit about 300 amino acids in about 10 min, rather than 
spending hours doing it manually.
 
   Wes
 
 
 
 
 
 
In a message dated 1/19/2010 10:56:53 A.M. Central Standard Time, 
and...@mrc-lmb.cam.ac.uk writes:


Having worked with O for many years I am only now getting serious
with 
COOT. There are a couple of things that I would like to do that
don't 
seem to be available (as far as I can tell), but which may well be 
possible using Macros.


Unfortunately  a quick Google has not revealed anything about how to 
use macros in COOT, but a colleague suggested they need to be
written 
in Python or another language that I had not heard of before.


So my first question is where can I find a low level description of 
how to write macros with some examples (I know nothing about Python, 
except that it is fashionable) ?


There are specifically two things I want to be able to do:

1. Do an LSQ superposition using specified residues in multiple
chains 
(superposing one oligomer on another).


2. To do a LSQ superposition of a homologous structure onto my
working 
structure using +/- N residues about the current position, where N
is 
a variable (not essential, could be fixed) and the current
position is 
the last residue that I clicked on.


Thanks

Andrew



Re: [COOT] Macros in COOT--use VB to write python code

2010-01-28 Thread Ed Pozharski
Is my understanding correct that what Wes describes can be accomplished
in the following three steps:

1. Apply CHAINSAW using sequence alignment
2. fill-partial-residues
3. fit-protein (optional)

Seems to me that moving chainsaw step into coot will not save much time
(if at all).

Cheers,

Ed.

On Thu, 2010-01-28 at 10:10 +, Paul Emsley wrote:
> Goodness, sounds like fun.
> 
> Coot does have an align&mutate function of course, but you don't get to 
> fiddle with the sequence alignment - Coot uses its own alignment [1].  
> My understanding is that should be fine for ~70% sequence identity or 
> better.  My feeling though is that it is not widely used. So my question 
> to the community is: Is there a need to be able to use an alignment 
> rather than simply a target sequence?
> 
> Thanks,
> 
> Paul.
> 
> [1] courtesy  of mmdb
> 
> 
> Wes Ozarowski wrote:
> >  
> > Dear  Andrew,
> >  
> > Since I don't have the time to learn python fully and because 
> > there is not too many of examples of python scripting available for 
> > Coot, thus I use my expertise of VB to help me write the correct 
> > syntax for python script. then paste it into notepad and run it as a 
> > python script from Coot's GUI.
> >  
> > For example I will paste an amino acid sequence of homologous 
> > proteins from ClustalW into an excel spreadsheet, then using VB to 
> > write a program that will put each amino acid into it's own 
> > spreadsheet cell as separate objects with some fancy colors ( as color 
> > codes) to make it pretty. Now, I can do all sorts of analyses of these 
> > sequences, like find the ones that are non-homologous between two 
> > proteins, put them in a table, let VB write the  python syntax for 
> > "goto" and "mutate_autofit " of all these specific amino acids, paste 
> > it into notepad and "wala !" i have automation. That is ,I can goto  
> > (thus observe visually the mutational changes for oddballs) and 
> > mutate_autofit about 300 amino acids in about 10 min, rather than 
> > spending hours doing it manually.
> >  
> >Wes
> >  
> >  
> >  
> >  
> >  
> >  
> > In a message dated 1/19/2010 10:56:53 A.M. Central Standard Time, 
> > and...@mrc-lmb.cam.ac.uk writes:
> >
> > Having worked with O for many years I am only now getting serious
> > with 
> > COOT. There are a couple of things that I would like to do that
> > don't 
> > seem to be available (as far as I can tell), but which may well be 
> > possible using Macros.
> >
> > Unfortunately  a quick Google has not revealed anything about how to 
> > use macros in COOT, but a colleague suggested they need to be
> > written 
> > in Python or another language that I had not heard of before.
> >
> > So my first question is where can I find a low level description of 
> > how to write macros with some examples (I know nothing about Python, 
> > except that it is fashionable) ?
> >
> > There are specifically two things I want to be able to do:
> >
> > 1. Do an LSQ superposition using specified residues in multiple
> > chains 
> > (superposing one oligomer on another).
> >
> > 2. To do a LSQ superposition of a homologous structure onto my
> > working 
> > structure using +/- N residues about the current position, where N
> > is 
> > a variable (not essential, could be fixed) and the current
> > position is 
> > the last residue that I clicked on.
> >
> > Thanks
> >
> > Andrew
> >


-- 
Edwin Pozharski, PhD, Assistant Professor
University of Maryland, Baltimore
--
When the Way is forgotten duty and justice appear;
Then knowledge and wisdom are born along with hypocrisy.
When harmonious relationships dissolve then respect and devotion arise;
When a nation falls to chaos then loyalty and patriotism are born.
--   / Lao Tse /