[Chimera-users] compressed versus gzipped Re: Read compressed PDB files -question, suggestion
pett at cgl.ucsf.edu
Tue Dec 12 16:51:40 PST 2006
On Dec 11, 2006, at 3:54 AM, Moo Cow wrote:
> A thousand pardons. You are right.
> I phrased the question wrongly.
> Chimera does open gzip'd files ( xx.gz).
> It does not open compress'd files (xx.Z).
Right. This is because Python's built-in gzip module can only
uncompress '.gz' files and not '.Z' files. Since the gzip/uncompress
programs aren't available on all platforms (and since .gz compression
is considerably more popular than .Z compression) we hadn't bothered
offering .Z decompression.
>> You can also open gzipped files with Chimera's "open" command or as
>> an argument as you start Chimera.
>>> You can use the Chimera File / Open... dialog to directly open
>>> a gzip
>>> PDB file. This was added to Chimera about one year ago. It
>>> does not work
> Why, you may ask, would anyone use compress these days ?
> If you mirror or rsync the protein data bank, they are still
> files that have been squashed with compress and have a ".Z" extension.
> gunzip will happily eat and uncompress these files.
> I do not know how chimera handles compressed files. If it reads
> from a pipe,
> it might be nice to persuade it to feed .Z files to gunzip.
> I think it might be more difficult if chimera uses the python/zlib
The underlying C++ code that handles PDB files needs a filename (this
limitation is being worked on), so .Z decompression would have to go
into a temporary file -- which is another reason we weren't motivated
to offer it.
Here in our lab, we mirror the uncompressed PDB hierarchy, which
obviously works fine with Chimera. It uses more bandwidth (though
the biggest hit is when you initially set it up) and disk space, but
is easier to work with for tools like 'grep' and custom programs.
I've added .Z decompression support to Chimera now. It is only
enabled if Chimera can find a 'gzip' executable on your execution
path (if it can't, it will say so in the Reply Log). I'll be sending
you 3 files in a separate mail that should allow you to use your
compressed PDB mirror. You will have to edit the pdbDir file to
point to the mirror location as mentioned here:
UCSF Computer Graphics Lab
pett at cgl.ucsf.edu
More information about the Chimera-users