A python script to do just that is below.

Cheers,

Stephen

== Start of script ==
#!/usr/bin/python

import os
import string
import sys

if len(sys.argv) != 3:
 print 'Set the B factor column to reflect sequence conservation from CLUSTALX'
 print 'Usage:  colour_sequence <PDB file protein> <Q scores file>'
 sys.exit(1)

PDB_file = open( sys.argv[1], "r" )
q_scores = open( sys.argv[2], "r" )

# Read all of the scores
lines = q_scores.readlines()
bfactors = []
for ln in lines:
 bfactors.append( ln.split()[1] )

# Go through the PDB file and update the B Factors
for atom in PDB_file.readlines():
 if atom[0:4] == "ATOM":
   resid = int(atom[22:26])
   new_atom = atom[:60]+"%3s.00"%(bfactors[resid-1])+atom[66:]
   print new_atom,
 else:
   print atom,

== End of script ==

On 1/31/07, Tim Gruene <[EMAIL PROTECTED]> wrote:
As far as I know clustalw/x can provide you with a list of scores per
residue. You can easily feed the score into the B-value column with perl
or other command line tools. I did this a couple of years ago, not being a
scripting guru it took maybe one hour and was fun.

--
Tim Gruene
Institut fuer anorganische Chemie
Tammannstr. 4
D-37077 Goettingen

GPG Key ID = A46BEE1A


On Tue, 30 Jan 2007, Iain Kerr wrote:

> Of course, should have tried that BUT, it appears PROTSKIN has problems
> everytime it encounters a gap. It now complains about res. 296 in the same
> fashion (287-295 are missing from the coordinates....)
>
> There must be a way around this...I could split all the different parts (ie.
> those separated by gaps) into different files but I expect the smaller parts
> will align poorly with the sequences or I'll get a similar error again....
>
> ( P.S. sorry !,  posted to COOT again by accident, have fixed my address
> book..)
>
> Charlie Bond wrote:
>> Iain, I've never used protskin, but can you not just mutate the offending
>> residue in your PDB file to get protskin to run (eg in coot or pdb-mode).
>> Then afterwards you can manually alter the B-factor for that residue to
>> what it should actually be and then run grasp etc.
>>
>> Cheers,
>> Charlie
>>
>> Iain Kerr wrote:
>>> I tried that. My protein has a mutation at res. 141, so it said:
>>>
>>> *Error at residue 141 :
>>> The sequence in your PDB file does not match your BLAST query sequence.
>>> *Here is the plain sequence alignment
>>> <http://www.mcgnmr.ca/ProtSkin/tmp/01232-sequence_alignment> derived from
>>> it.
>>>
>>> I deleted res. 141 and re-ran but:
>>>
>>> *Error at residue 142 :
>>> The sequence in your PDB file does not match your BLAST query sequence.
>>> *Here is the plain sequence alignment
>>> <http://www.mcgnmr.ca/ProtSkin/tmp/01232-sequence_alignment> derived from
>>> it.
>>>
>>> and 142 is correctly assigned !
>>>
>>> This looked like it was going to work !
>>>
>>> Iain
>>>
>>>
>>> Mark Brooks wrote:
>>>> Hi,
>>>>
>>>> did you try Protskin? (http://www.mcgnmr.ca/ProtSkin/)
>>>> Its a lot less hassle than Espript, and makes Grasp input files as
>>>> well as for Pymol
>>>>
>>>> Good luck,
>>>>
>>>> Mark
>>>>
>>>> On 31/01/07, Iain Kerr <[EMAIL PROTECTED]> wrote:
>>>>> I'm trying to colour a molecular surface by sequence
>>>>> conservation...(sorry,
>>>>> I think I incorrectly posted this to COOTBB the other day)
>>>>>
>>>>> I've figured out how to do it in GRASP - modify the B-factor column in
>>>>> the
>>>>> PDB file to represent the percentage conservation and then colour the
>>>>> surface by B-factor. I know ESPRIPT will make the modified file, but I'm
>>>>> having trouble generating the correct one..
>>>>>
>>>>> I am providing ESPRIPT (expert mode, %Equivalent' scoring function) with
>>>>> a
>>>>> CLUSTALW alignment (Aligned sequences > Main alignment file) and a PDB
>>>>> file
>>>>> ('Aligned sequences' > 'Supplementary pdb' file). I get the error:
>>>>>
>>>>> 'Fatal error: wrong format in PDB file.'
>>>>>
>>>>> ..and the values in the B-factor (%Equivalent) column are all either 99
>>>>> or
>>>>> 100 which is nonsense according to the alignment.
>>>>>
>>>>> Has anyone come across this. I don't see anything wrong with my PDB
>>>>> file..
>>>>>
>>>>> Thanks,
>>>>> Iain
>>>>>
>>>>
>>>>
>>>
>>
>



--
Dr Stephen Graham
Nuffield Medical Fellow
Division of Structural Biology
Wellcome Trust Centre for Human Genetics
Roosevelt Drive
Oxford OX3 7BN
United Kingdom
Phone: +44 1865 287 549

Reply via email to