<?xml version="1.0" encoding="windows-1252"?>
<node id="948843" title="Re^3: (OT) help reading a bgzip file" created="2012-01-19 15:14:04" updated="2012-01-19 15:14:04">
<type id="11">
note</type>
<author id="405545">
barvin</author>
<data>
<field name="doctext">
&lt;p&gt;
Just thought I'd add a note here since this is popping up fairly high on Google searches for bgzip.  Bgzip uses the the BGZF format which is a fully backward compliant but application specific extension of gzip.  In other words you can unzip a bgzipped file with gunzip, but you can't create one with gzip.
&lt;/p&gt;

&lt;p&gt;
The addition that bgzip adds is block level compression.  You can use the library to compress and uncompress input data in blocks which provides for a level of random access to the compressed file.  The format was developed by Bob Handsaker of the Broad Institute for use in genomics/bioinformatics applications.  It has been modified and used by Bob and Heng Li (also currently at the Broad) in next-generation sequence alignment and sequence variant analysis tools developed as part of the 1,000 genomes project.  Application such as the BAM file format, samtools, and tabix use bgzip/BGZF to compress sequence alignment and sequence variant files and allow rapid random access to the data compressed within those files.
&lt;/p&gt;

&lt;p&gt;
There are perl libraries that provide an API to files compressed in BAM and to the tabix library.
&lt;/p&gt;

http://search.cpan.org/~lds/Bio-SamTools-1.33/lib/Bio/DB/Bam/Alignment.pm
&lt;br /&gt;
http://samtools.sourceforge.net/tabix.shtml
&lt;br /&gt;

&lt;p&gt;
For more information see:
&lt;/p&gt;

http://samtools.sourceforge.net/
&lt;br /&gt;
http://samtools.sourceforge.net/SAM1.pdf
&lt;br /&gt;

&lt;p&gt;
The SeqAnswers.com forum would be a good place for questions about the format and it's applications as the authors and many users are active there.
&lt;/p&gt;</field>
<field name="root_node">
902713</field>
<field name="parent_node">
902720</field>
</data>
</node>
