hello
I want to know that if I have, say about 10 target sequences that I want to model, each with a corresponding template structure, what is the sript that I will have to follow in order to model all of them in one run? Instead of 10 different scripts which make things cumbersome, I want to combine the result of all in one script in one run.
please let me know if there is such a script and if there is none,could you assisst me to write one. thank you.
navkaran
navkaranj wrote: > I want to know that if I have, say about 10 target sequences that I want > to model, each with a corresponding template structure, what is the > sript that I will have to follow in order to model all of them in one > run? Instead of 10 different scripts which make things cumbersome, I > want to combine the result of all in one script in one run.
Sure, you could do something like that very easily in Python. Most simply, you could just concatenate your scripts:
from modeller import * from modeller.automodel import *
env = environ()
a = automodel(env, alnfile='align1.ali', knowns='known1', sequence='seq1) a.make()
a = automodel(env, alnfile='align2.ali', knowns='known2', sequence='seq2') a.make()
Alternatively, you could write a simple Python wrapper function to call for each model, e.g.
from modeller import * from modeller.automodel import *
def build_model(env, alnfile, knowns, sequence): a = automodel(env, alnfile=alnfile, knowns=knows, sequence=sequence) a.make()
env = environ() for (aln, knowns, sequence) in (('align1.ali', 'known1', 'seq1'), ('align2.ali', 'known2', 'seq2')): build_model(env, aln, knowns, sequence)
Or... you could use sys.argv to populate alnfile, knowns, sequence, and then use the same Python script to build different models, specifying the parameters on the command line.
As regards your other question, you can put in an os.chdir call before each automodel run, to build models in different directories.
Ben Webb, Modeller Caretaker