[Biopython] Bio.PDB local MMCIF files

Michiel de Hoon mjldehoon at yahoo.com
Sat Dec 28 02:10:24 UTC 2013


Various issues of the MMCIF parser also came up previously, see for example the thread starting here:

http://lists.open-bio.org/pipermail/biopython-dev/2013-March/010452.html

I'd like to propose to make the MMCIF parser a bit more Pythonic and more consistent with other Biopython modules.
This is a description of how the MMCIF parser would work:

http://biopython.org/DIST/docs/tutorial/Tutorial.mmcif_proposal.html#htoc149

This uses a new Bio.PDB.mmcif module that has a read() function (taking both file names and file handles) which stores the information in an MMCIF file in a mmcif.Record object, which is a Python dictionary.

Please have a look if you agree or have any comments or suggestions. If this looks OK, I can upload the new code.

Best,
-Michiel.

--------------------------------------------
On Thu, 12/5/13, Peter Cock <p.j.a.cock at googlemail.com> wrote:

 Subject: Re: [Biopython] Bio.PDB local MMCIF files
 To: "João Rodrigues" <anaryin at gmail.com>
 Cc: "Biopython Mailing List" <biopython at lists.open-bio.org>
 Date: Thursday, December 5, 2013, 12:35 PM
 
 On Thu, Dec 5, 2013 at 4:53 PM, João
 Rodrigues <anaryin at gmail.com>
 wrote:
 > Hi Dave,
 >
 > I understand your concern. Python has the gzip module
 that can decompress
 > the files on the file and provide a handle for the
 content. This will not
 > work for the parsers since they except a filename. I
 will have a look at
 > the parsers code and if it's simple, I'll add a layer
 to do this exactly.
 >
 > Cheers,
 >
 > João
 
 Yeah, most of Biopython's parsers take a handle only, some
 like the top level functions in Bio.SeqIO, AlignIO,
 SearchIO
 will take a filename or a handle for convenience.
 
 I agree that is is unfortunate that Bio.PDB currently only
 takes
 a filename (historical design choice). If we can tweak it to
 take
 either a filename or a handle that would be much better :)
 
 Regards,
 
 Peter
 
 _______________________________________________
 Biopython mailing list  -  Biopython at lists.open-bio.org
 http://lists.open-bio.org/mailman/listinfo/biopython
 




More information about the Biopython mailing list