[Bioperl-l] acceptable PDB/structure formats

Gary gvd at redpoll.pharmacy.ualberta.ca
Thu Oct 14 13:00:15 EDT 2004


Hey Guys,

I had this problem as well.  I used the same workaround as you (prepending
the file with a HEADER line).  My recollection is that the header line
needs to be pretty strictly formatted.  This header string works for me:
    my $header = "HEADER    DEFAULT CLASSIFICATION                  24-JAN-70   XXXX\n";

Perhaps it will serve your purposes as well.

Regards,

g.
-- 
Gary Van Domselaar, PhD.
Postdoctoral Fellow, Computing Science 
and Biological Sciences
University of Alberta
Edmonton, AB, Canada
Phone: 780-492-5969



On Thu, 14 Oct 2004, Douglas Kojetin wrote:

> Hi Brian-
> 
> Good suggestion on creating a new module-- I think this may be 
> long-term goal, but in the immediate future (I need to do some analysis 
> quickly) I'll probably use a work around.  I tried to created a dummy 
> header in my CNS/XPLOR structure file, but I'm seeing the following 
> error after trying to read it:
> 
> % ./read_pdb.pl
> Use of uninitialized value in pattern match (m//) at 
> /sw/lib/perl5/Bio/Structure/IO/pdb.pm line 453, <GEN0> line 4268.
> 
> ... and I'm not sure what's going on there.  Any clues?
> 
> I think I lean more towards your second notion that the HEADER is not 
> necessarily required for the structure format -- which might be 
> different from the actual PDB (database) format. A structure file, 
> consisting only of coordinates, would represent a 'barebones' file.  
> Many other programs/databases have individual headers:
> 
> - CNS/XPLOR (x-ray and NMR) structure files actually can have a 
> user-defined header with information/statistics about the structure 
> calculation
> - MODELLER, a modeling program, creates structure files with a unique 
> header
> - CYANA/DYANA (NMR structure calculations) also creates structure files 
> with a unique header
> - files written from structural analysis programs such as MOLMOL or 
> PyMOL
> 
> ... and I'm sure the list goes on and on for formats I am unfamiliar 
> with (AMBER, etc.).
> 
> What all of these formats do have in common, although their headers 
> differ, is the coordinate lines (I believe) all start with 'ATOM' -- so 
> it shouldn't be a problem to write a structure module to first be 
> compatible with all structure files, and second add 
> specificity/complexity/additional features for individual formats (such 
> as the 'PDB' format, so that information in the header if present can 
> be extracted).
> 
> Thanks again for the input,
> Doug
> 
> 
> On Oct 14, 2004, at 10:25 AM, Brian Osborne wrote:
> 
> > Doug,
> >
> > You could also ask this group if they'd mind your creating a new
> > Structure::IO module for this CNS/XPLOR format and adding it to 
> > Bioperl.
> > There's only 2 ways of looking at this, either the HEADER (or headers) 
> > is
> > required in PDB format, thus CNS/XPLOR format is not PDB format and you
> > could write a new module, or the HEADER (or headers) is not required 
> > in PDB
> > format so the existing module should not be throwing this fatal 
> > exception.
> >
> > BIO
> >
> > -----Original Message-----
> > From: bioperl-l-bounces at portal.open-bio.org
> > [mailto:bioperl-l-bounces at portal.open-bio.org]On Behalf Of Douglas 
> > Kojetin
> > Sent: Wednesday, October 13, 2004 1:05 PM
> > To: bioperl-l at portal.open-bio.org
> > Subject: [Bioperl-l] acceptable PDB/structure formats
> >
> > Howdy All-
> >
> > I wanted to check one more time and see if anyone has any advice about
> > using structure/PDB files that do not contain all the PDB-formatted
> > headers.  See the blurb pasted below (the error is from the following
> > small-liner script, where the PDB/structure file was experimentally
> > calculated from CNS/XPLOR, rather than downloaded from the actual 'PDB'
> > protein data bank):
> >
> > #!/usr/bin/perl -w
> > use Bio::Structure::IO;
> > use strict;
> > my $structio = Bio::Structure::IO->new(-format => 'pdb', -file =>
> > "file.pdb");
> > my $struc = $structio->next_structure;
> >
> > BioPython (using 'from Bio.PDB import *') has no problem reading my
> > CNS/XPLOR structure files ... but I'd prefer to use BioPerl (since I'm
> > more familiar with perl vs. python, although I could look at this as an
> > opportunity to branching out ... but, graduation is close!)
> >
> > Are structure (PDB) files from the protein data bank, with the proper
> > PDB formatting/headers, the only supported structure format?
> >
> > Thanks,
> > Doug
> >
> >
> >> I am seeing an error I believe is associated with the 'format' of my
> >> PDB.  It was created using CNS (format similar to XPLOR).  When I try
> >> to run the below script, I get an error as follows:
> >>
> >> % ./read_pdb.pl > out
> >>
> >> ------------- EXCEPTION  -------------
> >> MSG: PDB stream with no HEADER. Not pdb in my book
> >> STACK Bio::Structure::IO::pdb::next_structure
> >> /sw/lib/perl5/Bio/Structure/IO/pdb.pm:138
> >> STACK toplevel ./read_pdb.pl:6
> >>
> >> --------------------------------------
> >>
> >> 1. Are CNS or XPLOR formats supported?
> >> 2. Is there an easy way of quickly converting to a 'PDB' authentic
> >> format?  It looks like it just wants some header information.
> >
> > _______________________________________________
> > Bioperl-l mailing list
> > Bioperl-l at portal.open-bio.org
> > http://portal.open-bio.org/mailman/listinfo/bioperl-l
> >
> >
> 
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
> 




More information about the Bioperl-l mailing list