=head1 NAME

Maqview - Maq alignment indexer and viewer

=head1 SYNOPSIS

B<maqindex> B<-i>|B<-v>|B<-b> [B<-c> F<in.cns>] F<in.map>
[I<chr>[:I<start>[-I<end>]] [...]]

B<maqview> [B<-c> F<in.cns>] I<in.map>

=head1 DESCRIPTION

B<Maqview> is a set of programs that achieves fast random access to the
alignment file generated by `B<maq> map', and displays the alignment
with a nice GUI (Graphical User Interface). It is highly efficient in
speed, memory and disk usage. B<Maqview> is based on OpenGL and is known
to work on both Mac OS X and Linux. Porting to Windows is in principle
easy.

=head2 B<maqindex>

B<maqindex> B<-i>|B<-v>|B<-b> [B<-c> F<in.cns>] F<in.map>
[I<chr>[:I<start>[-I<end>]] [...]]

=over 9

=item B<-i>

Index the alignment file

=item B<-v>

Print the alignment in the specified region in the `maq mapview' format

=item B<-b>

Dump the alignment in the specified region in the binary .map format

=item B<-c> F<FILE>

Index the Maq consensus file for viewing in maqview at the same time

=back

Program B<maqindex> indexes a maq alignment file F<in.map> or quickly
retrieves all the reads in one or multiple regions. One of B<-i>, B<-v>
and B<-b> must be used. For B<-v> or B<-b>, at least one region like
`chrX', `chrX:1000' or `chrX:1,000-2,000' must be specified. Multiple
regions are allowed.

=head2 B<maqview>

B<maqview> [B<-c> F<in.cns>] I<in.map>

=over 9

=item B<-c> F<FILE>

The Maq consensus file

=back

Program B<maqview> displays the read alignment in a graphical
window. When F<in.cns> is specified, the top sequence is the reference,
followed by the Maq consensus sequence; otherwise, the majority-rule
consensus will be calculated.

Maqview has two views: sequence view and box view. In the sequence view,
read sequences will be printed on the screen. Darker bases indicate
lower base qualities and red ones show the differences in comparison to
the reference if F<in.cns> is speficied or to the majority-rule
consensus if not. In the box view, different types of nucleotides are
represented as colour boxes with green for A, cyan for C, orange for G,
red for T and dark gray for N. The saturation of colours indicates the
base qualities and the thickness lines of reads shows the mapping
qualities of read alignments. Zooming in/out is supported only in the
box view. In both views, the status bar at the bottom of the window will
show some information about the key touches, and read names and base
qualities pointed by the mouse.

Navigating the alignment is accomplished by vaious key bindings.

=over 2

=item

Key bindings:

 ?                Display help
 <Esc>            Exit
 <F1>             Sequence view
 <F2>             Box view
 p                Switch to the previous reference sequence
 n                Switch to the next reference sequence
 r                Refresh

 <digits> <Enter> Move to the position pointed by <digits>
 h / <Left>       Move left by one base
 l / <Right>      Move right by one base
 k / <Up>         Move up by one line
 j / <Down>       Move down by one line
 >                Move to the next read
 <                Move to the previous read
 g / <Home>       Move to the begining of the current reference
 G / <End>        Move to the end of the current reference
 u / <PageUp>     Move left by one page
 <Space>/<PageDn> Move right by one page
 <Shift> <Arrow>  Move by 100 bases
 <Ctrl> <Arrow>   Move by 1000 bases

 <Ctrl> +         Add a new view
 <Ctrl> -         Remove the current view

 <Enter>          Toggle on/off right auto-scrolling
 ^b               Toggle on/off left auto-scrolling
 +                Zoom in
 -                Zoom out
 0                Zoom to the default scale
 q                Toggle show/hide mapping qualities
 e                Toggle display SE/PE mapping qualities
 o                Open a new alignment file

=item

Enter an integer and then press <Enter> to jump to the required
position.

=item

Enter an integer and then press a key other than <Enter> to speed up
scrolling by the specified factor.

=item

Left click and drag the yellow cross in the square to move along the
sequence. Right click the reference to highlight a column.

=back

=head1 LICENSE

GNU General Public License (GPL)

=head1 AVAILABILITY

L<http://maq.sourceforge.net>

=head1 AUTHORS

Jue Ruan <ruanjue@genomics.org.cn> for writing and maintaining the
whole software.

Heng Li <lh3@sanger.ac.uk> for testing the program and drafting the
documentations.

Mengyao Zhao <zhaomengyao@gmail.com> for designing the color schemes.

=cut
