M.A.Q. Viewer

1 ... install
2 ... zrio
3 ... maqindex
4 ... maqindex_socks
5 ... maqview

1, install maqview

MAQViewer has been successly installed in linux and cygwin.
$> tar -xzf maqview-XXX.tar.gz
$> cd maqview
$> ./autogen.sh
$> ./configure
$> make

Or you can try:
$> cd maqview
$> make -f Makefile.generic

2, zrio Random Access GZ File

Store points in every span of uncompressed source file, point contains 32k previous context, 
offsets in compressed and uncompressed file.

Usage: ./zrio make | use
        make <gz-file> [<index level>]  make index for gz-file,index filename will be <gz-file>.idx
                                                each level increasing the time for search whist decreasing the size of index
                                                level: default 1024, 1/1024 of source file
                                                level:         512, 1/512 of source file
                                                level: ...
        use  <gz-file> <offset>[ <offlen>]      use index <gz-file>.idx, exact from offset(source position) to stdout

3, mapindex Make Index for .map File for maq

Uses BTREE index for reads in map-file, it writes an .vm file to store index

Usage:   maqindex <-i|-v|-b> [-l level] [-c cns] <in.map> [chr[:begin[-end]] [...]]

Options: -l INT     level for indexing [1024]
		-c STR     .cns file for this .map file
		-i         index the map file
		-v         display the alignment in the mapview format
		-b         dump in the .map format
e.g.
 1, $> maqindex -i all.map
 2, $> maqindex -i -c all.cns all.map
 3, $> maqindex -i -c all.cns
 4, $> maqindex -v all.map chrI:1-200

4, maqindex_socks Distribute MAQ-Data visa Networking

When maq products huge result files, sharing those files among computers is required,
maqindex_socks may help you. We had used it in our web-site to display alignment of HUMAN
solexa reads.

Usage:
Setup Server: ./maqindex_socks -s  <port> <map file> [<cns file> [<width> [<height>]]]
Run Client  : ./maqindex_socks -c  <host> <port> [<ref_id> <start> <end>]

e.g.
 1, $> maqindex_socks -s 1768 all.map >maqindex_server.log 2>&1 &
 2, $> maqindex_socks -c locahost 1768 chrI 1 200

5, maqview Viewer For MAQ map File

maqview is based on OpenGL, it requires gl, glx, glu and glut

Usage: maqview [-c cns_file] [-w width:800] [-h height:600] map_file [ref_name:start_pos]

Before uses maqview, you must run zrio and map_index on map-file, e.g.
	./maqindex test.map
	./maqview test.map
If you have ref seq files named as in map-file, you can put them in working directory
maqview will automatic treat them as ref seqs, those files must be plain text files contain
only sequences without any additional format or characters, '\n' is also excluded


It supports those keys in window:
---------------------------------------------------------------------
?                 : Display this help
<F1>              : Draw bases as characters
<F2>              : Draw bases as squares
<F3>              : Draw read as line
p                 : Switch to the previous reference sequence
n                 : Switch to the next reference sequence
r                 : Show/Hide the menu of ref list
a / h /     [LEFT]: Move left by one base
d / l /    [RIGHT]: Move right by one base
w / k /       [UP]: Move view window down
s / j /     [DOWN]: Move view window up
>                 : Move to next read
<                 : Move to previous read
g /         [HOME]: Goto begin
G /          [END]: Goto end
u        [PAGE UP]: Move left one page
<space>[PAGE DOWN]: Move right one page
+                 : Zoom in
-                 : Zoom out
<ctrl> +          : Duplicate current view
<ctrl> -          : Close current view
c                 : Input command
0                 : Restore default scale
q                 : Toggle display/undisplay mapping qualities
e                 : Toggle display single-end/paired-end mapping qualities
o                 : Open a new view file
<esc>             : exit
hold [SHIFT]      : Speed move 100 times
hold [CTRL]       : Speed move 1000 times
<enter>           : Toogle on/off automatic rolling on
^b                : Toogle on/off automatic rolling back
Enter an integer then press <enter> key to goto the position
Enter an integer then press other key than <enter> can speed the integer times
Mouse:
     left button to select;
	 middle button temporarily drags the scene;
     right button sets marker
Mouse: move over an entity to show description

Press <enter> to exit help mode
---------------------------------------------------------------------

Command:
q|exit			: close current view(euals <ctrl> -)
c|clone			: clone a copy of current view, and add it in the window
					(equals <ctrl> +)
b|bind <n>		: binding current view to n'th view, n is 1 based
B|unbind <n>	: unbinding
r|ref <str>		: Move view to a new ref
g|goto <n>		: goto a position, 1 based
s|set			: a list of commands
	i|interval <n>	: set the interval to n, interval is used in rooling
	s|step <n>		: set step to n, step is used in rolling
