Hello,
I would like to build protein models in which the CA coordinates of certain residues are identical to those of the (single) template.
If I have understood it correctly, the following should do precisely that:
class MyModel(automodel): def select_atoms(self): # Refine all atoms except the CAs of residues20-40 and 70-80 : return selection(self) - selection(self.residue_range('20', '40')).only_atom_types('CA') return selection(self) - selection(self.residue_range('70', '80')).only_atom_types('CA')
Where the residue numbers correspond to those of the model. Is this correct?
Or, if it makes more sense restricting the full backbone of the selected residues, would the following work?
class MyModel(automodel): def select_atoms(self): # Refine all atoms except the backbone atoms of residue 20-40 and 70-80: return selection(self) - selection(self.residue_range('20', '40')).only_mainchain() return selection(self) - selection(self.residue_range('70', '80')).only_mainchain()
Best regards,
Miro
On 1/23/15 7:24 PM, Edelmiro Moman wrote: > I would like to build protein models in which the CA coordinates of > certain residues are identical to those of the (single) template. > > If I have understood it correctly, the following should do precisely that: > > class MyModel(automodel): > def select_atoms(self): > # Refine all atoms except the CAs of residues20-40 and 70-80 : > return selection(self) - selection(self.residue_range('20', > '40')).only_atom_types('CA') > return selection(self) - selection(self.residue_range('70', > '80')).only_atom_types('CA')
You're close, but the first return statement will, er, return, so the second one will never get called ;) You want something like
return selection(self) - selection(self.residue_range('20', '40')).only_atom_types('CA') - selection(self.residue_range('70', '80')).only_atom_types('CA')
instead. (Also note that technically this restricts the CA coordinates to those in the initial model, not the template. But since the default initial model construction simply copies the coordinates of identically named atoms from the template when you only have a single template - and every residue type contains a CA atom - this works out to be the same thing.)
Ben Webb, Modeller Caretaker
Hello,
I am in this situation (last script in the page):
http://salilab.org/modeller/wiki/Missing%20residues
In summary: I have PDB files with short gaps and want to produce gap-less models just from one template each. The models should be identical to the templates except, obviously in the missing regions. I do not care much about the accuracy of the predictions for those regions.
The aforementioned script does exactly that. The problem is that I need to define all the gaps manually.
The question is: can Modeller identify and/or report those gaps (position and length) in order to help us to automatise the task?
If not, are you aware or another tool that does that or should I write an ad hoc script?
Best regards,
On 2/4/15 7:35 AM, Edelmiro Moman wrote: > The question is: can Modeller identify and/or report those gaps > (position and length) in order to help us to automatise the task?
Of course! See model.get_insertions() http://salilab.org/modeller/9.14/manual/node174.html
Given an alignment object, you can also step through its 'positions' member: http://salilab.org/modeller/9.14/manual/node290.html
Insertions relative to a given sequence are simply those where aln.positions[x].get_residue(seq) returns None (i.e. sequence seq has a gap at position x).
Ben Webb, Modeller Caretaker
Great!
But can I insert that directly within the selection like this?
class MyModel(automodel): def select_atoms(self): return selection(self.get_insertions(aln, minlength=1, maxlength=30, extension=0, include_termini=True))
On 02/04/2015 05:21 PM, Modeller Caretaker wrote: > On 2/4/15 7:35 AM, Edelmiro Moman wrote: >> The question is: can Modeller identify and/or report those gaps >> (position and length) in order to help us to automatise the task? > > Of course! See model.get_insertions() > http://salilab.org/modeller/9.14/manual/node174.html > > Given an alignment object, you can also step through its 'positions' > member: > http://salilab.org/modeller/9.14/manual/node290.html > > Insertions relative to a given sequence are simply those where > aln.positions[x].get_residue(seq) returns None (i.e. sequence seq has a > gap at position x). > > Ben Webb, Modeller Caretaker
On 2/4/15 8:35 AM, Edelmiro Moman wrote: > Great! > > But can I insert that directly within the selection like this? > > class MyModel(automodel): > def select_atoms(self): > return selection(self.get_insertions(aln, minlength=1, > maxlength=30, extension=0, include_termini=True))
Yes - although you'll need to read the alignment first. There's a method read_alignment() which returns it. (Note that this is basically what the default loopmodel.select_loop_atoms() method does, except that it includes deletions too.)
Ben Webb, Modeller Caretaker
This is what I get:
_modeller.ModellerError: chk_aln_340E> Number of residues in model ( 248) does not match that in alignment ( 221).
Please, see the attached files. The alignment file and the structure files work fine with other inputs.
On 02/04/2015 05:40 PM, Modeller Caretaker wrote: > On 2/4/15 8:35 AM, Edelmiro Moman wrote: >> Great! >> >> But can I insert that directly within the selection like this? >> >> class MyModel(automodel): >> def select_atoms(self): >> return selection(self.get_insertions(aln, minlength=1, >> maxlength=30, extension=0, include_termini=True)) > > Yes - although you'll need to read the alignment first. There's a method > read_alignment() which returns it. (Note that this is basically what the > default loopmodel.select_loop_atoms() method does, except that it > includes deletions too.) > > Ben Webb, Modeller Caretaker
OK, the attached file works. It seems that Modeller is sensitive to the order in which the sequence of the alignment are read.
On 02/04/2015 05:52 PM, Edelmiro Moman wrote: > This is what I get: > > _modeller.ModellerError: chk_aln_340E> Number of residues in model ( > 248) does not match that in alignment ( 221). > > Please, see the attached files. The alignment file and the structure > files work fine with other inputs. > > > On 02/04/2015 05:40 PM, Modeller Caretaker wrote: >> On 2/4/15 8:35 AM, Edelmiro Moman wrote: >>> Great! >>> >>> But can I insert that directly within the selection like this? >>> >>> class MyModel(automodel): >>> def select_atoms(self): >>> return selection(self.get_insertions(aln, minlength=1, >>> maxlength=30, extension=0, include_termini=True)) >> >> Yes - although you'll need to read the alignment first. There's a method >> read_alignment() which returns it. (Note that this is basically what the >> default loopmodel.select_loop_atoms() method does, except that it >> includes deletions too.) >> >> Ben Webb, Modeller Caretaker > >
On 2/4/15 9:11 AM, Edelmiro Moman wrote: > OK, the attached file works. It seems that Modeller is sensitive to the > order in which the sequence of the alignment are read.
Well yes, that's why I said to use automodel's read_alignment() method to do this, which handles that...
Ben Webb, Modeller Caretaker
And I searched for it in the manual but could not find it...
On 02/04/2015 06:51 PM, Modeller Caretaker wrote: > On 2/4/15 9:11 AM, Edelmiro Moman wrote: >> OK, the attached file works. It seems that Modeller is sensitive to the >> order in which the sequence of the alignment are read. > > Well yes, that's why I said to use automodel's read_alignment() method > to do this, which handles that... > > Ben Webb, Modeller Caretaker
Sorry, I'm intruding in the conversation. But modeller can not automatically detect those gaps without the alignment? or can it? (I mean, for example, comparing the SEQRES with the sequence of each CA ATOM)
thank you very much and sorry again
OCS
Oscar Conchillo Solé Group of Computational Biology and Proteomics IBB Data Center Manager and Linux Sysadmin Institut de Biotecnologia I Biomedicina (UAB) mail: txino@bioinf.uab.es telf: 0034 93581 4431; 0034 93586 8939
On 02/04/2015 05:40 PM, Modeller Caretaker wrote: > On 2/4/15 8:35 AM, Edelmiro Moman wrote: >> Great! >> >> But can I insert that directly within the selection like this? >> >> class MyModel(automodel): >> def select_atoms(self): >> return selection(self.get_insertions(aln, minlength=1, >> maxlength=30, extension=0, include_termini=True)) > > Yes - although you'll need to read the alignment first. There's a > method read_alignment() which returns it. (Note that this is basically > what the default loopmodel.select_loop_atoms() method does, except > that it includes deletions too.) > > Ben Webb, Modeller Caretaker
On 2/4/15 8:54 AM, Oscar Conchillo Solé wrote: > Sorry, I'm intruding in the conversation. > But modeller can not automatically detect those gaps without the > alignment? or can it? (I mean, for example, comparing the SEQRES with > the sequence of each CA ATOM)
No, Modeller does not read SEQRES fields.
Ben Webb, Modeller Caretaker
participants (3)
-
Edelmiro Moman
-
Modeller Caretaker
-
Oscar Conchillo Solé