1. maf_index(1)
  2. BioRuby Manual
  3. maf_index(1)


maf_index - build and examine MAF indexes


maf_index [-t] maf index
maf_index -d|--dump index


maf_index is part of the bioruby-maf library and creates Kyoto Cabinet indexes for Multiple Alignment Format (MAF) files. These indexes enable other MAF tools to selectively extract alignment blocks of interest.

In its default mode, maf_index parses the maf file given as an argument and creates an index in index.

The index data is stored in binary form, so with the --dump argument, maf_index can dump out the index data in human-readable form for debugging.


The maf input file must be a valid MAF file of any length. It can optionally be BGZF-compressed, as produced by bgzip(1) from samtools.

The index created is a Kyoto Cabinet TreeDB (B+ tree) database; index must have a .kct extension.


-a, --all

All sequences, not just the reference sequence, will be indexed for searching.

-d, --dump

Instead of creating an index, dump out the given index in human-readable form. Index records will appear like:

 0 [bin 1195] 80082334:80082368
   offset 16, length 1087
   text size: 54
   sequences in block: 10
   species vector: 00000000000003ff

Print elapsed time for index creation. Mainly useful for measuring performance with different Ruby implementations, I/O subsystems, etc.

-q, --quiet

Run quietly, with warnings suppressed.

-v, --verbose

Run verbosely, with additional informational messages.


Log debugging information.


Build an index on a MAF file:

$ maf_index chr22.maf chr22.kct

Dump out an index:

$ maf_index -d chr22.kct > /tmp/chr22.dump


maf_index is a Ruby program and relies on ordinary Ruby environment variables.


maf_index does not currently allow Kyoto Cabinet database parameters to be set.

maf_index is copyright (C) 2012 Clayton Wheeler.


ruby(1), kctreemgr(1), bgzip(1)

  1. BioRuby
  2. August 2012
  3. maf_index(1)