]> git.donarmstrong.com Git - bamtools.git/blob - README
Added creation of include/ folder in bamtools root directory at build time.
[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.  Installation
12
13 III. Usage
14      a. The API
15      b. The Toolkit
16
17 IV.  License
18
19 V.   Acknowledgements
20
21 VI.  Contact
22
23 --------------------------------------------------------------------------------
24 I. Introduction:
25 --------------------------------------------------------------------------------
26
27 BamTools provides both a programmer's API and an end-user's toolkit for handling
28 BAM files.
29
30 ----------------------------------------
31 Ia. The API:
32 ----------------------------------------
33
34 The API consists of 2 main modules: BamReader and BamWriter. As you would
35 expect, BamReader provides read-access to BAM files, while BamWriter handles
36 writing data to BAM files. BamReader provides the interface for random-access
37 (jumping) in a BAM file, as well as generating BAM index files.
38
39 BamMultiReader is an extra module that allows you to manage multiple open BAM
40 files for reading. It provides some validation & bookkeeping under the hood to
41 keep all files sync'ed up for you.
42
43 Additional files used by the API:
44
45  - BamAlignment.* : implements the BamAlignment data structure
46
47  - BamAux.h       : contains various constants, data structures and utility
48                     methods used throught the API.
49
50  - BamIndex.*     : implements both the standard BAM format index (".bai") as
51                     well as a new BamTools-specific index (".bti").
52
53  - BGZF.*         : contains our implementation of the Broad Institute's BGZF
54                     compression format.
55
56 ----------------------------------------
57 Ib. The Toolkit:
58 ----------------------------------------
59
60 If you've been using the BamTools since the early days, you'll notice that our
61 'toy' API examples (BamConversion, BamDump, BamTrim,...) are now gone.  We have
62 dumped these in favor of a suite of small utilities that we hope both
63 developers and end-users find useful:
64
65 usage: bamtools [--help] COMMAND [ARGS]
66
67 Available bamtools commands:
68
69         convert         Converts between BAM and a number of other formats
70         count           Prints number of alignments in BAM file(s)
71         coverage        Prints coverage statistics from the input BAM file
72         filter          Filters BAM file(s) by user-specified criteria
73         header          Prints BAM header information
74         index           Generates index for BAM file
75         merge           Merge multiple BAM files into single file
76         random          Select random alignments from existing BAM file(s)
77         sort            Sorts the BAM file according to some criteria
78         split           Splits a BAM file on user-specifed property, creating a
79                             new BAM output file for each value found
80         stats           Prints some basic statistics from input BAM file(s)
81
82 See 'bamtools help COMMAND' for more information on a specific command.
83
84 --------------------------------------------------------------------------------
85 II. Installation :
86 --------------------------------------------------------------------------------
87
88 ----------------------------------------
89 IIa. Get CMake
90 ----------------------------------------
91
92 BamTools has been migrated to a CMake-based build system.  We believe that this 
93 should simplify the build process across all platforms, especially as the 
94 BamTools API moves into a shared library (that you link to instead of compiling 
95 lots of source files directly into your application). CMake is available on all 
96 major platforms, and indeed comes *out-of-the-box* with many Linux distributions.
97
98 To see if you have CMake (and which version), try this command:
99
100   $ cmake --version
101
102 BamTools requires CMake version >= 2.6.4. If you are missing CMake or have an 
103 older version, check your OS package manager (for Linux) or download it here:
104 http://www.cmake.org/cmake/resources/software.html .
105
106 ----------------------------------------
107 IIb. Build BamTools 
108 ----------------------------------------
109
110 Ok, now that you have CMake ready to go, let's build BamTools.  A good
111 practice in building applications is to do an out-of-source build, meaning
112 that we're going to set up an isolated place to hold all the intermediate 
113 installation steps.
114
115 In the top-level directory of BamTools, type the following commands:
116
117   $ mkdir build
118   $ cd build
119   $ cmake ..
120
121 Windows users:
122 This creates a Visual Studio solution file, which can then be built to create 
123 the toolkit executable and API DLL's.
124
125 Everybody else:
126 After running cmake, just run:
127
128   $ make
129
130 Then go back up to the BamTools root directory.
131
132   $ cd ..
133
134 ----------------------------------------
135 IIIb. Check It 
136 ----------------------------------------
137
138 Assuming the build process finished correctly, you should be able to find the 
139 toolkit executable here:
140
141   ./bin/
142
143 The BamTools-associated libraries will be found here:
144
145   ./lib/
146
147 The BamTools API headers will be found here:
148  
149   ./include/*
150
151 --------------------------------------------------------------------------------
152 III. Usage :
153 --------------------------------------------------------------------------------
154
155 ** General usage information - perhaps explain common terms, point to SAM/BAM
156 spec, etc **
157
158 ----------------------------------------
159 IIIa. The API
160 ----------------------------------------
161
162 The API, as noted above, contains 2 main modules - BamReader & BamWriter - for
163 dealing with BAM files. Alignment data is made available through the
164 BamAlignment data structure.
165
166 A simple (read-only) scenario for accessing BAM data would look like the
167 following:
168
169         // open our BamReader
170         BamReader reader;
171         reader.Open("someData.bam", "someData.bam.bai");
172
173         // define our region of interest
174         // in this example: bases 0-500 on the reference "chrX"
175         int id = reader.GetReferenceID("chrX");
176         BamRegion region(id, 0, id, 500);
177         reader.SetRegion(region);
178
179         // iterate through alignments in this region,
180         // ignoring alignments with a MQ below some cutoff
181         BamAlignment al;
182         while ( reader.GetNextAlignment(al) ) {
183             if ( al.MapQuality >= 50 )
184                 // do something
185         }
186
187         // close the reader
188         reader.Close();
189
190 To use this API in your application, you simply need to do the following:
191
192     1 - Build the BamTools library (see Installation steps above). 
193
194     2 - Import BamTools API functionality as needed, for example:
195
196         #include "api/BamReader.h"     
197         #include "api/BamWriter.h"     
198         using namespace BamTools;  // all BamTools classes/methods live within
199                                    // this namespace
200
201     3 - In your own build step, point your include path to the 
202         (BAMTOOLS_ROOT)/include directory. Link your app with '-lbamtools' ('l'
203         as in Lima).
204
205 * You may need to modify the -L flag (library path) as well to help your linker 
206 find the (BAMTOOLS_ROOT)/lib directory.
207
208 * Depending on your platform and where you install the BamTools API library, you 
209 may also need to adjust how your app locates the library at runtime. For
210 Windows users, this can be as simple as dropping the DLL in the same folder as
211 your executable.  For *nix users (using gcc at least), you can add the following
212 to your app's CXXFLAGS:
213
214   -Wl,-rpath,$(BAMTOOLS_LIB_DIR)
215
216 where BAMTOOLS_LIB_DIR is, as you would guess, the directory containing the libs.
217 An alternative is to set your local LD_LIBRARY_PATH environment variable.
218
219 See any included programs for more detailed usage examples. See comments in the 
220 header files for more detailed API documentation.
221
222 Note - For users that don't want to bother with the new BamTools shared library
223 scheme: you are certainly free to just compile the API source code directly into 
224 your application, but be aware that the files involved are subject to change.  
225 Meaning that filenames, number of files, etc. are not fixed.  You will also need 
226 to be sure to link with '-lz' for ZLIB functionality (linking with '-lbamtools' 
227 gives you this automatically).
228
229 ----------------------------------------
230 IIIb. The Toolkit
231 ----------------------------------------
232
233 BamTools provides a small, but powerful suite of command-line utility programs
234 for manipulating and querying BAM files for data.
235
236 --------------------
237 Input/Output
238 --------------------
239
240 All BamTools utilities handle I/O operations using a common set of arguments.
241 These include:
242
243  -in <BAM file>
244
245 The input BAM files(s).
246
247     If a tool accepts multiple BAM files as input, each file gets its own "-in"
248     option on the command line. If no "-in" is provided, the tool will attempt
249     to read BAM data from stdin.
250
251     To read a single BAM file, use a single "-in" option:
252     > bamtools *tool* -in myData1.bam ...ARGS...
253
254     To read multiple BAM files, use multiple "-in" options:
255     > bamtools *tool* -in myData1.bam -in myData2.bam ...ARGS...
256
257     To read from stdin (if supported), omit the "-in" option:
258     > bamtools *tool* ...ARGS...
259
260   -out <BAM file>
261
262 The output BAM file.
263
264     If a tool outputs a result BAM file, specify the filename using this option.
265     If none is provided, the tool will typically write to stdout.
266
267     *Note: Not all tools output BAM data (e.g. count, header, etc.)
268
269  -region <REGION>
270
271 A region of interest. See below for accepted 'REGION string' formats.
272
273     Many of the tools accept this option, which allows a user to only consider
274     alignments that overlap this region (whether counting, filtering, merging,
275     etc.).
276
277     An alignment is considered to overlap a region if any part of the alignments
278     intersects the left/right boundaries. Thus, a 50bp alignment at position 70
279     will overlap a region beginning at position 100.
280
281     REGION string format
282     ----------------------
283     A proper REGION string can be formatted like any of the following examples:
284         where 'chr1' is the name of a reference (not its ID)and '' is any valid
285         integer position within that reference.
286
287     To read
288     chr1               - only alignments on (entire) reference 'chr1'
289     chr1:500           - only alignments overlapping the region starting at
290                          chr1:500 and continuing to the end of chr1
291     chr1:500..1000     - only alignments overlapping the region starting at
292                          chr1:500 and continuing to chr1:1000
293     chr1:500..chr3:750 - only alignments overlapping the region starting at
294                          chr1:500 and continuing to chr3:750. This 'spanning'
295                          region assumes that the reference specified as the
296                          right boundary will occur somewhere in the file after
297                          the left boundary. On a sorted BAM, a REGION of
298                          'chr4:500..chr2:1500' will produce undefined
299                          (incorrect) results.  So don't do it. :)
300
301     *Note: Most of the tools that accept a REGION string will perform without an
302            index file, but typically at great cost to performance (having to
303            plow through the entire file until the region of interest is found).
304            For optimum speed, be sure that index files are available for your
305            data.
306
307  -forceCompression
308
309 Force compression of BAM output.
310
311     When tools are piped together (see details below), the default behavior is
312     to turn off compression. This can greatly increase performance when the data
313     does not have to be constantly decompressed and recompressed. This is
314     ignored any time an output BAM file is specified using "-out".
315
316 --------------------
317 Piping
318 --------------------
319
320 Many of the tools in BamTools can be chained together by piping.  Any tool that
321 accepts stdin can be piped into, and any that can output stdout can be piped
322 from. For example:
323
324 > bamtools filter -in data1.bam -in data2.bam -mapQuality ">50" | bamtools count
325
326 will give a count of all alignments in your 2 BAM files with a mapQuality of
327 greater than 50. And of course, any tool writing to stdout can be piped into
328 other utilities.
329
330 --------------------
331 The Tools
332 --------------------
333
334     convert         Converts between BAM and a number of other formats
335     count           Prints number of alignments in BAM file(s)
336     coverage        Prints coverage statistics from the input BAM file
337     filter          Filters BAM file(s) by user-specified criteria
338     header          Prints BAM header information
339     index           Generates index for BAM file
340     merge           Merge multiple BAM files into single file
341     random          Select random alignments from existing BAM file(s)
342     sort            Sorts the BAM file according to some criteria
343     split           Splits a BAM file on user-specifed property, creating a new
344                        BAM output file for each value found
345     stats           Prints some basic statistics from input BAM file(s)
346
347 ----------
348 convert
349 ----------
350
351 Description: converts BAM to a number of other formats
352
353 Usage: bamtools convert -format <FORMAT> [-in <filename> -in <filename> ...]
354                         [-out <filename>] [other options]
355
356 Input & Output:
357   -in <BAM filename>               the input BAM file(s) [stdin]
358   -out <BAM filename>              the output BAM file [stdout]
359   -format <FORMAT>                 the output file format - see below for
360                                        supported formats
361
362 Filters:
363   -region <REGION>                 genomic region. Index file is recommended for
364                                        better performance, and is read
365                                        automatically if it exists. See 'bamtools
366                                        help index' for more details on creating
367                                        one.
368
369 Pileup Options:
370   -fasta <FASTA filename>          FASTA reference file
371   -mapqual                         print the mapping qualities
372
373 SAM Options:
374   -noheader                        omit the SAM header from output
375
376 Help:
377   --help, -h                       shows this help text
378
379 ** Notes **
380
381     - Currently supported output formats ( BAM -> X )
382
383         Format type   FORMAT (command-line argument)
384         ------------  -------------------------------
385         BED           bed
386         FASTA         fasta
387         FASTQ         fastq
388         JSON          json
389         Pileup        pileup
390         SAM           sam
391         YAML          yaml
392
393         Usage example:
394         > bamtools convert -format json -in myData.bam -out myData.json
395
396     - Pileup Options have no effect on formats other than "pileup"
397       SAM Options have no effect on formats other than "sam"
398
399 ----------
400 count
401 ----------
402
403 Description: prints number of alignments in BAM file(s).
404
405 Usage: bamtools count [-in <filename> -in <filename> ...] [-region <REGION>]
406
407 Input & Output:
408   -in <BAM filename>                the input BAM file(s) [stdin]
409   -region <REGION>                  genomic region. Index file is recommended
410                                        for better performance, and is used
411                                        automatically if it exists. See
412                                        'bamtools help index' for more details
413                                        on creating one
414
415 Help:
416   --help, -h                        shows this help text
417
418 ----------
419 coverage
420 ----------
421
422 Description: prints coverage data for a single BAM file.
423
424 Usage: bamtools coverage [-in <filename>] [-out <filename>]
425
426 Input & Output:
427   -in <BAM filename>                the input BAM file [stdin]
428   -out <filename>                   the output file [stdout]
429
430 Help:
431   --help, -h                        shows this help text
432
433 ----------
434 filter
435 ----------
436
437 Description: filters BAM file(s).
438
439 Usage: bamtools filter [-in <filename> -in <filename> ...]
440                        [-out <filename> | [-forceCompression]]
441                        [-region <REGION>]
442                        [ [-script <filename] | [filterOptions] ]
443
444 Input & Output:
445   -in <BAM filename>                the input BAM file(s) [stdin]
446   -out <BAM filename>               the output BAM file [stdout]
447   -region <REGION>                  only read data from this genomic region (see
448                                        README for more details)
449   -script <filename>                the filter script file (see README for more
450                                        details)
451   -forceCompression                 if results are sent to stdout (like when
452                                        piping to another tool), default behavior
453                                        is to leave output uncompressed. Use this
454                                        flag to override and force compression
455
456 General Filters:
457   -alignmentFlag <int>              keep reads with this *exact* alignment flag
458                                        (for more detailed queries, see below)
459   -insertSize <int>                 keep reads with insert size that matches
460                                        pattern
461   -mapQuality <[0-255]>             keep reads with map quality that matches
462                                        pattern
463   -name <string>                    keep reads with name that matches pattern
464   -queryBases <string>              keep reads with motif that matches pattern
465   -tag <TAG:VALUE>                  keep reads with this key=>value pair
466
467 Alignment Flag Filters:
468   -isDuplicate <true/false>         keep only alignments that are marked as
469                                        duplicate [true]
470   -isFailedQC <true/false>          keep only alignments that failed QC [true]
471   -isFirstMate <true/false>         keep only alignments marked as first mate
472                                        [true]
473   -isMapped <true/false>            keep only alignments that were mapped [true]
474   -isMateMapped <true/false>        keep only alignments with mates that mapped
475                                        [true]
476   -isMateReverseStrand <true/false> keep only alignments with mate on reverse
477                                        strand [true]
478   -isPaired <true/false>            keep only alignments that were sequenced as
479                                        paired [true]
480   -isPrimaryAlignment <true/false>  keep only alignments marked as primary
481                                        [true]
482   -isProperPair <true/false>        keep only alignments that passed paired-end
483                                        resolution [true]
484   -isReverseStrand <true/false>     keep only alignments on reverse strand
485                                        [true]
486   -isSecondMate <true/false>        keep only alignments marked as second mate
487                                        [true]
488
489 Help:
490   --help, -h                        shows this help text
491
492   *****************
493   * Filter Script *
494   *****************
495
496 The BamTools filter tool allows you to use an external filter script to define
497 complex filtering behavior.  This script uses what I'm calling properties,
498 filters, and a rule - all implemented in a JSON syntax.
499
500   ** Properties **
501
502 A 'property' is a typical JSON entry of the form:
503
504     "propertyName" : "value"
505
506 Here are the property names that BamTools will recognize:
507
508     alignmentFlag
509     cigar
510     insertSize
511     isDuplicate
512     isFailedQC
513     isFirstMate
514     isMapped
515     isMateMapped
516     isMateReverseStrand
517     isPaired
518     isPrimaryAlignment
519     isProperPair
520     isReverseStrand
521     isSecondMate
522     mapQuality
523     matePosition
524     mateReference
525     name
526     position
527     queryBases
528     reference
529     tag
530
531 For properties with boolean values, use the words "true" or "false".
532 For example,
533
534    "isMapped" : "true"
535
536 will keep only alignments that are flagged as 'mapped'.
537
538 For properties with numeric values, use the desired number with optional
539 comparison operators ( >, >=, <, <=, !). For example,
540
541     "mapQuality" : ">=75"
542
543 will keep only alignments with mapQuality greater than or equal to 75.
544
545 If you're familiar with JSON, you know that integers can be bare (without
546 quotes). However, if you a comparison operator, be sure to enclose in quotes.
547
548 For string-based properties, the above operators are available.  In addition,
549  you can also use some basic pattern-matching operators.  For example,
550
551     "reference" : "ALU*"  // reference starts with 'ALU'
552     "name" : "*foo"       // name ends with 'foo'
553     "cigar" : "*D*"       // cigar contains a 'D' anywhere
554
555 Notes -
556 The reference property refers to the reference name, not the BAM reference
557 numeric ID.
558
559 The tag property has an extra layer, so that the syntax will look like this:
560
561     "tag" : "XX:value"
562
563 where XX is the 2-letter SAM/BAM tag and value is, well, the value.
564 Comparison operators can still apply to values, so tag properties of:
565
566     "tag" : "AS:>60"
567     "tag" : "RG:foo*"
568
569 are perfectly valid.
570
571  ** Filters **
572
573 A 'filter' is a JSON container of properties that will be AND-ed together. For
574 example,
575
576 {
577    "reference" : "chr1",
578    "mapQuality" : ">50",
579    "tag" : "NM:<4"
580 }
581
582 would result in an output BAM file containing only alignments from chr1 with a
583 mapQuality >50 and edit distance of less than 4.
584
585 A single, unnamed filter like this is the minimum necessary for a complete
586 filter script.  Save this file and use as the -script parameter and you should
587 be all set.
588
589 Moving on to more potent filtering...
590
591 You can also define multiple filters.
592 To do so, you just need to use the "filters" keyword along with JSON array
593 syntax, like this:
594
595 {
596    "filters" :
597       [
598         {
599           "reference" : "chr1",
600           "mapQuality" : ">50"
601         },
602         {
603           "reference" : "chr1",
604           "isReverseStrand" : "true"
605         }
606       ]
607 }
608
609 These filters will be (inclusive) OR-ed together by default. So you'd get a
610 resulting BAM with only alignments from chr1 that had either mapQuality >50 or
611 on the reverse strand (or both).
612
613  ** Rule **
614
615 Alternatively to anonymous OR-ed filters, you can also provide what I've called
616 a "rule". By giving each filter an "id", using this "rule" keyword you can
617 describe boolean relationships between your filter sets.
618
619 Available rule operators:
620
621     &   // and
622     |   // or
623     !   // not
624
625 This might sound a little fuzzy at this point, so let's get back to an example:
626
627 {
628    "filters" :
629       [
630         {
631           "id" : "filter1",
632           "reference" : "chr1",
633           "mapQuality" : ">50"
634         },
635         {
636           "id" : "filter2",
637           "reference" : "chr1",
638           "isReverseStrand" : "true"
639         },
640         {
641           "id" : "filter3",
642           "reference" : "chr1",
643           "queryBases" : "AGCT*"
644         }
645       ],
646
647    "rule" : " (filter1 | filter2) & !filter3 "
648 }
649
650 In this case, we would only retain aligments that passed filter 1 OR filter 2,
651 AND also NOT filter 3.
652
653 These are dummy examples, and don't make much sense as an actual query case. But
654 hopefully this serves an adequate primer to get you started and discover the
655 potential flexibility here.
656
657 ----------
658 header
659 ----------
660
661 Description: prints header from BAM file(s).
662
663 Usage: bamtools header [-in <filename> -in <filename> ...]
664
665 Input & Output:
666   -in <BAM filename>                the input BAM file(s) [stdin]
667
668 Help:
669   --help, -h                        shows this help text
670
671 ----------
672 index
673 ----------
674
675 Description: creates index for BAM file.
676
677 Usage: bamtools index [-in <filename>] [-bti]
678
679 Input & Output:
680   -in <BAM filename>                the input BAM file [stdin]
681   -bti                              create (non-standard) BamTools index file
682                                        (*.bti). Default behavior is to create
683                                        standard BAM index (*.bai)
684
685 Help:
686   --help, -h                        shows this help tex
687
688 ----------
689 merge
690 ----------
691
692 Description: merges multiple BAM files into one.
693
694 Usage: bamtools merge [-in <filename> -in <filename> ...]
695                       [-out <filename> | [-forceCompression]] [-region <REGION>]
696
697 Input & Output:
698   -in <BAM filename>                the input BAM file(s)
699   -out <BAM filename>               the output BAM file
700   -forceCompression                 if results are sent to stdout (like when
701                                        piping to another tool), default behavior
702                                        is to leave output uncompressed. Use this
703                                        flag to override and force compression
704   -region <REGION>                  genomic region. See README for more details
705
706 Help:
707   --help, -h                        shows this help text
708
709 ----------
710 random
711 ----------
712
713 Description: grab a random subset of alignments.
714
715 Usage: bamtools random [-in <filename> -in <filename> ...]
716                        [-out <filename>] [-forceCompression] [-n]
717                        [-region <REGION>]
718
719 Input & Output:
720   -in <BAM filename>                the input BAM file [stdin]
721   -out <BAM filename>               the output BAM file [stdout]
722   -forceCompression                 if results are sent to stdout (like when
723                                        piping to another tool), default behavior
724                                        is to leave output uncompressed. Use this
725                                        flag to override and force compression
726   -region <REGION>                  only pull random alignments from within this
727                                        genomic region. Index file is
728                                        recommended for better performance, and
729                                        is used automatically if it exists. See
730                                        'bamtools help index' for more details
731                                        on creating one
732
733 Settings:
734   -n <count>                        number of alignments to grab. Note that no
735                                        duplicate checking is performed [10000]
736
737 Help:
738   --help, -h                        shows this help text
739
740 ----------
741 sort
742 ----------
743
744 Description: sorts a BAM file.
745
746 Usage: bamtools sort [-in <filename>] [-out <filename>] [sortOptions]
747
748 Input & Output:
749   -in <BAM filename>                the input BAM file [stdin]
750   -out <BAM filename>               the output BAM file [stdout]
751
752 Sorting Methods:
753   -byname                           sort by alignment name
754
755 Memory Settings:
756   -n <count>                        max number of alignments per tempfile
757                                        [10000]
758   -mem <Mb>                         max memory to use [1024]
759
760 Help:
761   --help, -h                        shows this help text
762
763 ----------
764 split
765 ----------
766
767 Description: splits a BAM file on user-specified property, creating a new BAM
768 output file for each value found.
769
770 Usage: bamtools split [-in <filename>] [-stub <filename stub>]
771                       < -mapped | -paired | -reference | -tag <TAG> >
772
773 Input & Output:
774   -in <BAM filename>                the input BAM file [stdin]
775   -stub <filename stub>             prefix stub for output BAM files (default
776                                        behavior is to use input filename,
777                                        without .bam extension, as stub). If
778                                        input is stdin and no stub provided, a
779                                        timestamp is generated as the stub.
780
781 Split Options:
782   -mapped                           split mapped/unmapped alignments
783   -paired                           split single-end/paired-end alignments
784   -reference                        split alignments by reference
785   -tag <tag name>                   splits alignments based on all values of TAG
786                                        encountered (i.e. -tag RG creates a BAM
787                                        file for each read group in original
788                                        BAM file)
789
790 Help:
791   --help, -h                        shows this help text
792
793 ----------
794 stats
795 ----------
796
797 Description: prints general alignment statistics.
798
799 Usage: bamtools stats [-in <filename> -in <filename> ...] [statsOptions]
800
801 Input & Output:
802   -in <BAM filename>                the input BAM file [stdin]
803
804 Additional Stats:
805   -insert                           summarize insert size data
806
807 Help:
808   --help, -h                        shows this help text
809
810 --------------------------------------------------------------------------------
811 IV. License :
812 --------------------------------------------------------------------------------
813
814 Both the BamTools API and toolkit are released under the MIT License.
815 Copyright (c) 2009-2010 Derek Barnett, Erik Garrison, Gabor Marth,
816     Michael Stromberg
817
818 See included file LICENSE for details.
819
820 --------------------------------------------------------------------------------
821 V. Acknowledgements :
822 --------------------------------------------------------------------------------
823
824  * Aaron Quinlan for several key feature ideas and bug fix contributions
825  * Baptiste Lepilleur for the public-domain JSON parser (JsonCPP)
826  * Heng Li, author of SAMtools - the original C-language BAM API/toolkit.
827
828 --------------------------------------------------------------------------------
829 VI. Contact :
830 --------------------------------------------------------------------------------
831
832 Feel free to contact me with any questions, comments, suggestions, bug reports,
833     etc.
834
835 Derek Barnett
836 Marth Lab
837 Biology Dept., Boston College
838
839 Email: barnetde@bc.edu
840 Project Websites: http://github.com/pezmaster31/bamtools   (ACTIVE SUPPORT)
841                   http://sourceforge.net/projects/bamtools (major updates only)