Commit 96910f1f by Mustafa Tekpinar

Moved createPDB function in gemmeAnal.py to sgemme.py.

parent 594c5761
......@@ -54,24 +54,24 @@ import numpy as np
# else:
# return 0
def createPDB(prot,seq):
"""
If there is not a real PDB file for a given sequence,
create a fake PDB containing only dummy CA atoms.
"""
d = {'C': 'CYS', 'D': 'ASP', 'S': 'SER', 'Q': 'GLN', 'K': 'LYS',
'I': 'ILE', 'P': 'PRO', 'T': 'THR', 'F': 'PHE', 'N': 'ASN',
'G': 'GLY', 'H': 'HIS', 'L': 'LEU', 'R': 'ARG', 'W': 'TRP',
'A': 'ALA', 'V': 'VAL', 'E': 'GLU', 'Y': 'TYR', 'M': 'MET'}
# def createPDB(prot,seq):
# """
# If there is not a real PDB file for a given sequence,
# create a fake PDB containing only dummy CA atoms.
# """
# d = {'C': 'CYS', 'D': 'ASP', 'S': 'SER', 'Q': 'GLN', 'K': 'LYS',
# 'I': 'ILE', 'P': 'PRO', 'T': 'THR', 'F': 'PHE', 'N': 'ASN',
# 'G': 'GLY', 'H': 'HIS', 'L': 'LEU', 'R': 'ARG', 'W': 'TRP',
# 'A': 'ALA', 'V': 'VAL', 'E': 'GLU', 'Y': 'TYR', 'M': 'MET'}
fOUT = open(prot+'.pdb','w')
i = 1
for let in seq:
if(let != '-'):
fOUT.write('ATOM%7d CA %s A%4d 43.524 70.381 46.465 1.00 0.0\n'%(i,d[let.upper()],i))
i += 1
# fOUT = open(prot+'.pdb','w')
# i = 1
# for let in seq:
# if(let != '-'):
# fOUT.write('ATOM%7d CA %s A%4d 43.524 70.381 46.465 1.00 0.0\n'%(i,d[let.upper()],i))
# i += 1
fOUT.close()
# fOUT.close()
def editConfJET(N):
"""
......@@ -121,7 +121,7 @@ def launchJET(prot, retMet, bFile, fFile, pdbfile, chains, n, N, nl):
n: int
Number of JET2 iterations.
N: int
Default 20000
Default 40000
nl: int
Number of lines after > character in the query sequences file.
It is obtained in extractQuerySeq() function.
......
......@@ -59,6 +59,26 @@ def getNbSeq(filename):
return int(proc.stdout.read())
else:
return 0
def createPDB(prot,seq):
"""
If there is not a real PDB file for a given sequence,
create a fake PDB containing only dummy CA atoms.
"""
d = {'C': 'CYS', 'D': 'ASP', 'S': 'SER', 'Q': 'GLN', 'K': 'LYS',
'I': 'ILE', 'P': 'PRO', 'T': 'THR', 'F': 'PHE', 'N': 'ASN',
'G': 'GLY', 'H': 'HIS', 'L': 'LEU', 'R': 'ARG', 'W': 'TRP',
'A': 'ALA', 'V': 'VAL', 'E': 'GLU', 'Y': 'TYR', 'M': 'MET'}
fOUT = open(prot+'.pdb','w')
i = 1
for let in seq:
if(let != '-'):
fOUT.write('ATOM%7d CA %s A%4d 43.524 70.381 46.465 1.00 0.0\n'%(i,d[let.upper()],i))
i += 1
fOUT.close()
###############################################################################
def rankSortProteinData(dataArray, inverted=True):
"""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment