Exemplo n.º 1
0
 def run(self):
     self.make_build_profilepy()
     processo = modeller_caller()
     processo.run(self.__folder_of_model__() + '/build_profile.py')
     self.profilePIR = os.path.dirname(self.file_format_pir) + '/build_profilePIR.ali'
     self.profilePAP = os.path.dirname(self.file_format_pir) + '/build_profilePAP.ali'
     self.profilePRF = os.path.dirname(self.file_format_pir) + '/build_profile.prf'
Exemplo n.º 2
0
    def convert_seqali_pir_to_fasta_formar(self, file_name):
        script = """\
from modeller import *
import os
os.chdir('""" + self.__folder_of_model__() + """')
env = environ()
env.io.hetatm = env.io.water = False
env.io.atom_files_directory = ['""" + self.__folder_of_model__() + """']
code = '""" + self.strname + """'   #   estrutura a ser lida#
mdl = model(env, file=code, model_segment=('FIRST:A','LAST:A'))

aln = alignment(env)
aln.append_model(mdl, align_codes=code)
aln.write(file='""" + self.__folder_of_model__() + """/template.pir', alignment_format = 'PIR')
aln.write(file='""" + self.__folder_of_model__() + """/template.fasta', alignment_format = 'FASTA')

aln2 = alignment(env)
aln2.append(file='""" + self.__folder_of_model__() + file_name + """', alignment_format = 'PIR')
aln2.write(file='""" + self.__folder_of_model__() + """/seq.fasta', alignment_format='FASTA')

unalinedfasta = file('""" + self.__folder_of_model__() + """/unaligned.fasta', 'w')
templatefasta = file('""" + self.__folder_of_model__() + """/template.fasta', 'r')
seqfasta = file('""" + self.__folder_of_model__() + """/seq.fasta', 'r')

unalinedlist = templatefasta.readlines()
unalinedlist = unalinedlist + seqfasta.readlines()

unalinedfasta.writelines("".join(unalinedlist))
unalinedfasta.close()
"""
        arq = file(self.modeldir + 'get_fasta.py', 'w')
        arq.write(script)
        arq.close()

        self.unaligned_seq = self.__folder_of_model__() + '/unaligned.fasta'
        # self.template_pir = self.__folder_of_model__() + '/template.pir'
        processo = modeller_caller()
        processo.run(self.__folder_of_model__() + 'get_fasta.py')

        self.__get_template_sequence_in_pir_format__()
Exemplo n.º 3
0
    def __get_template_sequence_in_pir_format__(self):
        script = """\
from modeller import *
import os
os.chdir('""" + self.__folder_of_model__() + """')
env = environ()
env.io.hetatm = env.io.water = True
env.io.atom_files_directory = './:../atom_files'

code = '""" + self.strname + """'   #   estrutura a ser lida#
mdl = model(env, file=code, model_segment=('FIRST:A','LAST:A'))

aln = alignment(env)
aln.append_model(mdl, align_codes=code)
aln.write(file='""" + self.__folder_of_model__() + """/str.seq', alignment_format = 'PIR')
"""
        arq = file(self.modeldir + 'get_template.py', 'w')
        arq.write(script)
        arq.close()

        # self.unaligned_seq = self.__folder_of_model__() + '/unaligned.fasta'
        self.template_pir = self.__folder_of_model__() + '/str.seq'
        processo = modeller_caller()
        processo.run(self.__folder_of_model__() + 'get_template.py')
Exemplo n.º 4
0
 def get_model(self):
     processo = modeller_caller()
     processo.run(self.myscript)
Exemplo n.º 5
0
 def model_sequence(self):
     processo = modeller_caller()
     processo.run(self.__folder_of_model__() + 'get_model.py')