[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[modeller_usage] Building a model from Fasta file



​Dear Ben,


I'm trying to run this script.


import time

from modeller import *

from modeller.automodel import *

from modeller.scripts import complete_pdb


#log.level(output=1, notes=1, warnings=1, errors=1, memory=0)

log.verbose()

env = environ()

env.io.atom_files_directory = ['../atom_files']


aln = alignment(env)

aln.append(file='5fd1_1fdx_sequence.fasta', align_codes=('5fd1', '1fdx'), alignment_format='FASTA')


#aln.append(file='alignment.ali', align_codes=('5fd1', '1fdx'))


aln.align()


aln.write(file='5fd1_1fdx_output.fasta', alignment_format='FASTA')

#aln.write(file='alignment_output.ali')

#aln.check()


a = automodel(env,

alnfile = '5fd1_1fdx_output.fasta', # alignment filename

knowns = '5fd1', # codes of the templates

sequence = '1fdx') # code of the target

a.starting_model= 10 # index of the first model

a.ending_model = 10 # index of the last model


a.very_fast() # prepare for extremely fast optimization

start_time = time.time()

a.make()

print("duration for model building is: ", time.time()-start_time)​baci


basically I'm taking as input from 5fd1_1fdx_sequence.fasta​ file (please find attached) two input protein sequences in FASTA format, and then aligning them with the aln.align() function and writing the output in 

5fd1_1fdx_output.fasta then eventually use it to build a model using the automodel function. whenever I call the model.make() function I'm getting this error.



Traceback (most recent call last):
  File "/home/mossig/anaconda/scripts/modeller/automodel/align_fasta.py", line 43, in <module>
    a.make()
  File "/usr/lib/modeller9.14/modlib/modeller/automodel/automodel.py", line 110, in make
    self.homcsr(exit_stage)
  File "/usr/lib/modeller9.14/modlib/modeller/automodel/automodel.py", line 475, in homcsr
    aln = self.read_alignment()
  File "/usr/lib/modeller9.14/modlib/modeller/automodel/automodel.py", line 465, in read_alignment
    aln.append(file=self.alnfile, align_codes=codes)
  File "/usr/lib/modeller9.14/modlib/modeller/alignment.py", line 79, in append
    allow_alternates)
_modeller.ModellerError: read_al_373E> Protein specified in ALIGN_CODES(i) was not found in the alignment file; ALIGN_CODES(       1) =  5fd1

​Can't I build a model from a pairwise fasta alignment? Thank you.




Attachment: 2CCY_1BBH_output.ali
Description: 2CCY_1BBH_output.ali