]> git.donarmstrong.com Git - bamtools.git/blob - README
Reorganization of toolkit. Split subtools out to own headers. Added custom getopt...
[bamtools.git] / README
1 ------------------------------------------------------------
2 README : BAMTOOLS
3 ------------------------------------------------------------
4
5 BamTools: a C++ API & toolkit for reading/writing/manipulating BAM files.
6
7 I. Introduction
8     a. The API
9     b. The Toolkit
10
11 II. Usage
12     a. The API
13     b. The Toolkit
14
15 III. Contact
16
17 ------------------------------------------------------------
18
19 I. Introduction:
20 BamTools provides both a programmer's API and an end-user's toolkit for handling 
21 BAM files.  
22
23 Ia. The API
24 The API consists of 2 main modules - BamReader and BamWriter. As you would expect, 
25 BamReader provides read-access to BAM files, while BamWriter does the writing of BAM
26 files. BamReader provides an interface for random-access (jumping) in a BAM file,
27 as well as generating BAM index files.
28  
29 BamMultiReader is an extra module that allows you to manage multiple open BAM file
30 for reading. It provides some validation & bookkeeping under the hood to keep all 
31 files sync'ed for 
32
33 An additional file, BamAux.h, is included as well.  
34 This file contains the common data structures and typedefs used throught the API.
35
36 BGZF.h & BGZF.cpp contain our implementation of the Broad Institute's 
37 BGZF compression format.
38
39
40 Ib. The Toolkit
41 If you've been using BamTools since the early days, you'll notice that our 'toy' API 
42 examples (BamConversion, BamDump, and BamTrim) are now gone.  In their place is a set 
43 of features we hope you find useful.
44
45 ** More explanation here **
46
47 usage: bamtools [--help] COMMAND [ARGS]
48
49 Available bamtools commands:
50         coverage        Prints coverage statistics from the input BAM file      
51         dump            Dump BAM file contents to text output
52         header          Prints BAM header information
53         index           Generates index for BAM file
54         merge           Merge multiple BAM files into single file
55         sort            Sorts the BAM file according to some criteria
56         stats           Prints some basic statistics from the input BAM file
57
58 See 'bamtools help COMMAND' for more information on a specific command.
59
60 ** Follow-up explanation here **
61
62 ------------------------------------------------------------
63
64 II. Usage : 
65
66 ** General usage information - perhaps explain common terms, point to SAM/BAM spec, etc **
67
68
69 IIa. The API
70
71 To use this API, you simply need to do 3 things:
72
73     1 - Drop the BamTools files somewhere the compiler can find them.
74         (i.e. in your source tree, or somewhere else in your include path)
75
76     2 - Import BamTools API with the following lines of code
77         #include "BamReader.h"     // as needed
78         #include "BamWriter.h"     // as needed
79         using namespace BamTools;
80         
81     3 - Compile with '-lz' ('l' as in Lima) to access ZLIB compression library
82             (For VS users, I can provide you zlib headers - just contact me).
83
84 See any included programs and Makefile for more specific compiling/usage examples.
85 See comments in the header files for more detailed API documentation. 
86
87
88 IIb. The Toolkit
89
90 ** More indepth overview for the toolkit commands **
91
92 ------------------------------------------------------------
93
94 III. Contact :
95
96 Feel free to contact me with any questions, comments, suggestions, bug reports, etc.
97   - Derek Barnett
98
99 Marth Lab
100 Biology Dept., Boston College
101
102 Email: barnetde@bc.edu  
103 Project Websites: http://github.com/pezmaster31/bamtools   (ACTIVE SUPPORT)
104                   http://sourceforge.net/projects/bamtools (major updates only)