Difference between revisions of "Using Modeller for TASK 4"
Line 5: | Line 5: | ||
Modeller needs pairwise sequence alignments of the target and template in PIR format in order to predict the structure. Modeller provides two different methods to calculate pairwise sequence alignments. <code> alignment.malign() </code> uses classical dynamic programming to align two sequences. <code> alignment.alig2dn() </code> also uses a dynamic programming approach, but includes structural information from the template to optimize the alignment (e.g. tries to place gaps outside of secondary structure elements). To create the alignment, you first need to store your target sequence in PIR format. Just copy-paste your protein identifier and sequence in the corresponiding regions of the following example: |
Modeller needs pairwise sequence alignments of the target and template in PIR format in order to predict the structure. Modeller provides two different methods to calculate pairwise sequence alignments. <code> alignment.malign() </code> uses classical dynamic programming to align two sequences. <code> alignment.alig2dn() </code> also uses a dynamic programming approach, but includes structural information from the template to optimize the alignment (e.g. tries to place gaps outside of secondary structure elements). To create the alignment, you first need to store your target sequence in PIR format. Just copy-paste your protein identifier and sequence in the corresponiding regions of the following example: |
||
− | >P1;protein_id |
+ | >P1;protein_id |
− | sequence:protein_id:::::::0.00: 0.00 |
+ | sequence:protein_id:::::::0.00: 0.00 |
− | your_amino_acid_sequence_needs_to_be_here* |
+ | your_amino_acid_sequence_needs_to_be_here* |
Having done this you should be able to calculate the pairwise alignment. An example script, which executes both alignment methods described above, is shown below. Just reoplace "target" and "template_name" with your protein identifier. Also note, that we installed modeller locally on our home computers. After installation, you need to get a license code from (http://salilab.org/modeller/registration.html). Before the program is not licensed, it won't run. If you run the program using the VirtualBox you need to set the paths in <code> env.io.atom_files_directory </code> correctly. |
Having done this you should be able to calculate the pairwise alignment. An example script, which executes both alignment methods described above, is shown below. Just reoplace "target" and "template_name" with your protein identifier. Also note, that we installed modeller locally on our home computers. After installation, you need to get a license code from (http://salilab.org/modeller/registration.html). Before the program is not licensed, it won't run. If you run the program using the VirtualBox you need to set the paths in <code> env.io.atom_files_directory </code> correctly. |
Revision as of 11:15, 10 June 2011
This tutorial basically relies on the official modeller tutorial. Please read it for further information.
Pairwise Alignments
Modeller needs pairwise sequence alignments of the target and template in PIR format in order to predict the structure. Modeller provides two different methods to calculate pairwise sequence alignments. alignment.malign()
uses classical dynamic programming to align two sequences. alignment.alig2dn()
also uses a dynamic programming approach, but includes structural information from the template to optimize the alignment (e.g. tries to place gaps outside of secondary structure elements). To create the alignment, you first need to store your target sequence in PIR format. Just copy-paste your protein identifier and sequence in the corresponiding regions of the following example:
>P1;protein_id sequence:protein_id:::::::0.00: 0.00 your_amino_acid_sequence_needs_to_be_here*
Having done this you should be able to calculate the pairwise alignment. An example script, which executes both alignment methods described above, is shown below. Just reoplace "target" and "template_name" with your protein identifier. Also note, that we installed modeller locally on our home computers. After installation, you need to get a license code from (http://salilab.org/modeller/registration.html). Before the program is not licensed, it won't run. If you run the program using the VirtualBox you need to set the paths in env.io.atom_files_directory
correctly.
from modeller import *
env = environ()
# env.io.atom_files_directory = ["/apps/modeller9.9/bin/examples/commands/", "/path/to/your/files/"] ## only needed in the VirtualBox
aln = alignment(env)
mdl = model(env, file='template_name', model_segment=('FIRST:@', 'END:'))
aln.append_model(mdl, align_codes='template_name', atom_files='template_name')
aln.append(file='target.pir', align_codes='target_name')
aln.align2d()
aln.check()
aln.write(file='target-template-2d.ali', alignment_format='PIR')
aln.malign()
aln.check()
aln.write(file='target-template.ali', alignment_format='PIR')
Single template modeling
To run the actual modeling of your protein using default parameters you can use the following script:
from modeller import *
from modeller.automodel import *
log.verbose()
env = environ()
# env.io.atom_files_directory = ["/apps/modeller9.9/bin/examples/commands/", "/path/to/your/files/"] ## only needed in the VirtualBox
a = automodel(env,
alnfile = 'my_alignment.ali',
knowns = 'name_of_template',
sequence = 'name_of_target',
assess_methods=(assess.DOPE, assess.GA341))
a.starting_model= 1
a.ending_model = 1
a.make()