Commit 96910f1f by Mustafa Tekpinar

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

parent 594c5761
...@@ -54,24 +54,24 @@ import numpy as np ...@@ -54,24 +54,24 @@ import numpy as np
# else: # else:
# return 0 # return 0
def createPDB(prot,seq): # def createPDB(prot,seq):
""" # """
If there is not a real PDB file for a given sequence, # If there is not a real PDB file for a given sequence,
create a fake PDB containing only dummy CA atoms. # create a fake PDB containing only dummy CA atoms.
""" # """
d = {'C': 'CYS', 'D': 'ASP', 'S': 'SER', 'Q': 'GLN', 'K': 'LYS', # d = {'C': 'CYS', 'D': 'ASP', 'S': 'SER', 'Q': 'GLN', 'K': 'LYS',
'I': 'ILE', 'P': 'PRO', 'T': 'THR', 'F': 'PHE', 'N': 'ASN', # 'I': 'ILE', 'P': 'PRO', 'T': 'THR', 'F': 'PHE', 'N': 'ASN',
'G': 'GLY', 'H': 'HIS', 'L': 'LEU', 'R': 'ARG', 'W': 'TRP', # 'G': 'GLY', 'H': 'HIS', 'L': 'LEU', 'R': 'ARG', 'W': 'TRP',
'A': 'ALA', 'V': 'VAL', 'E': 'GLU', 'Y': 'TYR', 'M': 'MET'} # 'A': 'ALA', 'V': 'VAL', 'E': 'GLU', 'Y': 'TYR', 'M': 'MET'}
fOUT = open(prot+'.pdb','w') # fOUT = open(prot+'.pdb','w')
i = 1 # i = 1
for let in seq: # for let in seq:
if(let != '-'): # 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)) # 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 # i += 1
fOUT.close() # fOUT.close()
def editConfJET(N): def editConfJET(N):
""" """
...@@ -121,7 +121,7 @@ def launchJET(prot, retMet, bFile, fFile, pdbfile, chains, n, N, nl): ...@@ -121,7 +121,7 @@ def launchJET(prot, retMet, bFile, fFile, pdbfile, chains, n, N, nl):
n: int n: int
Number of JET2 iterations. Number of JET2 iterations.
N: int N: int
Default 20000 Default 40000
nl: int nl: int
Number of lines after > character in the query sequences file. Number of lines after > character in the query sequences file.
It is obtained in extractQuerySeq() function. It is obtained in extractQuerySeq() function.
......
...@@ -59,6 +59,26 @@ def getNbSeq(filename): ...@@ -59,6 +59,26 @@ def getNbSeq(filename):
return int(proc.stdout.read()) return int(proc.stdout.read())
else: else:
return 0 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): 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