Commit 49d39490 by Mustafa Tekpinar

Corrected a bug in createPDB()

If the query sequence contains a gap, createPDB() was blowing up.
This bug was corrected!
parent 4eaa0f37
...@@ -430,7 +430,7 @@ def doit(inAli,mutFile,retMet,bFile,fFile,n,N, jetfile, pdbfile, normWeightMode) ...@@ -430,7 +430,7 @@ def doit(inAli,mutFile,retMet,bFile,fFile,n,N, jetfile, pdbfile, normWeightMode)
" 'half-cv+pc' or max-trace-half-cv+pc!") " 'half-cv+pc' or max-trace-half-cv+pc!")
sys.exit(-1) sys.exit(-1)
structure = parsePDB(pdbfile) structure = parsePDB(prot+".pdb")
calphas = structure.select('name CA') calphas = structure.select('name CA')
chains = list(set(calphas.getChids())) chains = list(set(calphas.getChids()))
......
...@@ -62,8 +62,10 @@ def createPDB(prot,seq): ...@@ -62,8 +62,10 @@ def createPDB(prot,seq):
fOUT = open(prot+'.pdb','w') fOUT = open(prot+'.pdb','w')
i = 1 i = 1
for let in seq: 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],i)) fOUT.write('ATOM%7d CA %s A%4d 43.524 70.381 46.465 1.00 0.0\n'%(i,d[let],i))
i += 1 i += 1
fOUT.close() fOUT.close()
def editConfJET(N): def editConfJET(N):
......
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