[BioPython] DSSP parser in Biopython

Robert Campbell rlc1 at post.queensu.ca
Wed Feb 18 12:31:28 EST 2004


Catherine,

On 2004-02-16 10:43 you wrote:
> 
> Is there any biopython module under development for DSSP?
> Does someone have a DSSP parser in python (or biopython)?

I guess that would depend on how much of the DSSP output you need to
parse. Kristian Rother has a DSSP parser as part of his rTools for
PyMOL:

   http://www.rubor.de/bioinf/pymol_rubor.html

I'm not sure if it does all that you need, but if you look at the
function calcDSSP in the file rtools/rModel.py in that distribution 
you'll have one.  It simply steps over the output file of DSSP and
appends the secondary structure information to an array.


    inl=inf.readlines()
    residues=0
    sec=[]
    # parse all the lines and collect secondary structures in sec[]
    for l in inl:
        if residues and len(l)>50:
            resno=l[6:10]
            chain=l[11]           
            sstype=l[16]
            sec.append((resno,chain,sstype))
        if re.search("\A  #  RESIDUE AA STRUCTURE BP1 BP2",l):
            residues=1
        

I wouldn't be too difficult to add to the same loop the necessary code
for extracting the other information in the DSSP output file.

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.                         <rlc1 at post.queensu.ca>
Senior Research Associate                            phone: 613-533-6821
Dept. of Biochemistry, Queen's University,             fax: 613-533-2497
Kingston, ON K7L 3N6  Canada       http://adelie.biochem.queensu.ca/~rlc
    PGP Fingerprint: 9B49 3D3F A489 05DC B35C  8E33 F238 A8F5 F635 C0E2


More information about the BioPython mailing list