.\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . .TH "MAF_BGZIP" "1" "August 2012" "BioRuby" "BioRuby Manual" . .SH "NAME" \fBmaf_bgzip\fR \- optimally BGZF\-compresses and indexes MAF files . .SH "SYNOPSIS" \fBmaf_bgzip\fR [\-d dir] \fImaf\fR \.\.\. . .br \fBmaf_bgzip\fR [\-d dir] \-\-index [\-\-all] \fImaf\fR \.\.\. . .br . .SH "DESCRIPTION" \fBmaf_bgzip\fR is part of the bioruby\-maf library and compresses Multiple Alignment Format (MAF) files in the Blocked GZip Format (BGZF), enabling efficient random access\. It can optionally index these files as well\. . .P \fBmaf_bgzip\fR can be used as an import tool to prepare MAF files from an external source such as UCSC for use by the other bioruby\-maf tools\. Such MAF files are often gzipped; these can be handled transparently by \fBmaf_bgzip\fR, without a separate gunzip(1) step\. . .P This is a MAF\-specific replacement for the bgzip(1) tool shipped with samtools\. Unlike the output of bgzip(1), each BGZF block (which can be up to 64 KB of uncompressed data) will contain an integer number of MAF blocks, except in the case of MAF blocks larger than 64 KB\. This means that except in unusual cases, a MAF block will be able to be read without having to read more than one BGZF block\. . .SH "EXAMPLES" Compress \fBmm8\.chrM\.maf\fR, creating \fBmm8\.chrM\.maf\.bgz\fR in the current directory: . .IP "" 4 . .nf $ maf_bgzip mm8\.chrM\.maf . .fi . .IP "" 0 . .P Re\-compress and index \fBmm8\.chrM\.maf\.gz\fR (on all sequences) into the \fB/data/maf/\fR directory, creating \fB/data/maf/mm8\.chrM\.maf\.bgz\fR and \fB/data/maf/mm8\.chrM\.kct\fR: . .IP "" 4 . .nf $ maf_bgzip \-\-dir /data/maf \-\-index \-\-all mm8\.chrM\.maf\.gz . .fi . .IP "" 0 . .P As above, but with all \fB\.maf\.gz\fR files in the current directory: . .IP "" 4 . .nf $ maf_bgzip \-\-dir /data/maf \-\-index \-\-all *\.maf\.gz . .fi . .IP "" 0 . .SH "OPTIONS" . .TP \fB\-d\fR, \fB\-\-dir DIR\fR The directory to write the compressed MAF files and indexes to\. . .TP \fB\-i\fR, \fB\-\-index\fR Index the compressed MAF files as by maf_index(1)\. . .TP \fB\-a\fR, \fB\-\-all\fR When \fB\-\-index\fR is specified, index all sequences, not just the reference sequence\. . .SH "FILES" The MAF files must be valid and have names ending in \fB\.maf\fR\. They may be gzip\-compressed, in which case their names should end with \fB\.maf\.gz\fR\. . .P The BGZF\-compressed MAF files will be optimally compressed for random access and named with a \fB\.maf\.bgz\fR suffix\. . .P Indexes created will be Kyoto Cabinet databases as created by maf_index(1) and have the \fB\.maf[\.gz]\fR suffix replaced with \fB\.kct\fR\. . .SH "ENVIRONMENT" \fBmaf_bgzip\fR is a Ruby program and relies on ordinary Ruby environment variables\. . .SH "BUGS" None known\. . .SH "COPYRIGHT" \fBmaf_index\fR is copyright (C) 2012 Clayton Wheeler\. . .SH "SEE ALSO" ruby(1), maf_index(1), bgzip(1) . .P BGZF is specified in the SAM/BAM specification: \fIhttp://samtools\.sourceforge\.net/SAM1\.pdf\fR