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)
" 'half-cv+pc' or max-trace-half-cv+pc!")
sys.exit(-1)
structure = parsePDB(pdbfile)
structure = parsePDB(prot+".pdb")
calphas = structure.select('name CA')
chains = list(set(calphas.getChids()))
......
......@@ -62,8 +62,10 @@ def createPDB(prot,seq):
fOUT = open(prot+'.pdb','w')
i = 1
for let in seq:
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
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))
i += 1
fOUT.close()
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