[Biopython] Superpose structures... DONE
Eric Talevich
eric.talevich at gmail.com
Tue Dec 29 13:37:43 EST 2009
On Mon, 28 Dec 2009, Michiel de Hoon <mjldehoon at yahoo.com> wrote:
>
> I am not a Bio.PDB user, but from its documentation it looks like it uses
> the file name to open a PDB file instead of a handle. Thomas, how do you
> feel about modifying Bio.PDB so it uses a file handle instead of a file
> name? Then Bio.PDB can parse gzipped and bzipped files.
>
> --Michiel.
>
>
I guess PDB requires a file name because it wants full control over the file
handle -- the handle is passed between PDBParser and parse_pdb_header, for
instance. But control still isn't as crucial as in SeqIO.index (for
example), so I don't think using a handle directly would lead to catastrophe
in general.
In addition, do you think a StructIO module would be worthwhile?
Benefits:
- Accept either a file name or file handle
- Wouldn't necessarily need to specify the structure object's name as a
separate argument (as PDBParser requires)
- No need to instantiate a Parser object before parsing
- PDB, PDBXML and mmCIF parsing would be called the same way
Drawbacks:
- Integrating parse_pdb_headers would become more important/tricky
- Thin wrappers still require effort, and I'm currently tied up with TreeIO
-- I'd get to it some months from now
Cheers,
Eric
More information about the Biopython
mailing list