Esempio n. 1
0
 def clean_all(pdb_input, pdb_output):
     print(pdb_input, pdb_output)
     total = len(os.listdir(pdb_input))
     count = 0
     for i in os.listdir(pdb_input):
         cleaning.cleanATOM(pdb_input + '/' + i,
                            out_file=pdb_output + '/' + i,
                            ext='.pdb')
         count += 1
         print(str(count) + ' out of ' + str(total) + ' completed',
               end='\r')
Esempio n. 2
0
def find_max(length):
    global seq, file, seq_to_pdb, pdb_to_seq
    seq = 'W' * length
    out = Bio.PDB.PDBIO()
    i = pb.make_structure(seq, [180] * len(seq), [180] * len(seq))
    out.set_structure(i)
    out.save("ignore.pdb")
    cleaning.cleanATOM("ignore.pdb", out_file=d + "\\ignore", ext='.pdb')
    file = pd.parsePDB("ignore.pdb")
    seq, seq_to_pdb, pdb_to_seq = find_seq(file)
    final = main_calc(seq)
    atom_length = len(final['primary'])
    eucl_length = final['secondary'].max()
    return atom_length, eucl_length
Esempio n. 3
0
def make_structure(pdb1, length, maxValues):
    global seq, file, seq_to_pdb, pdb, mV
    mV = maxValues
    pdb = pdb1
    cleaning.cleanATOM(d + '\\pdb\\' + pdb,
                       out_file=d + '\\cleaned\\' + pdb,
                       ext='.pdb')
    file = pd.parsePDB(d + '\\cleaned\\' + pdb)
    seq, seq_to_pdb, pdb_to_seq = find_seq(file)
    info = m.pep_parser(seq, length)
    peps = []
    if not os.path.exists(d + '\\made_adj\\' + pdb.replace('.pdb', '')):
        os.mkdir(d + '\\made_adj\\' + pdb.replace('.pdb', ''))

    completed = []
    for motif in info:
        if motif == 'full':
            continue
        for pep in info[motif]:
            peps.append(pep)
            completed.append(main_calc(pep))
    return completed
Esempio n. 4
0
# -*- coding: utf-8 -*-
"""
Created on Thu Jun 27 17:26:55 2019

@author: jtfl2
"""

import cleaning
import os
d = os.getcwd()

for i in os.listdir(d + '/pdb'):
    cleaning.cleanATOM(d + '/pdb/' + i, out_file= d + '/cleaned/' + i, ext = '.pdb')
 def cleanPDB():
     d = os.getcwd()
     filepath = easygui.fileopenbox('Choose a file', filetypes=["*.pdb"])
     if filepath is not None:
         cleaning.cleanATOM(filepath)