- sambamba markdup
Marks (by default) or removes duplicate reads. For determining whether a read is a duplicate or not, the same criteria as in Picard are used.
- sambamba slice
Outputs reads overlapping specified region into new BAM file. (Default destination is STDOUT.) Input file must be coordinate-sorted and indexed. While the same can be done with sambamba-view, that would be much slower due to a lot of compression/decompression work. Instead of naive method, sambamba-slice leverages knowledge about structure of BAM file and recompresses only a few BGZF blocks at the
- sambamba flagstat
Outputs some statistics drawn from read flags. First line contains numbers of QC-passed and QC-failed reads. Then come pairs of numbers, the former for QC-passed reads, the latter for QC-failed ones: duplicates mapped reads (plus percentage relative to the numbers from the first line) reads with 'is_paired' flag set paired reads which are first mates paired reads which are second mates paired read
- sambamba index
sambamba index builds an index for a sorted by coordinate BAM file. This step is required for effective region querying in most tools for working with BAM data. An index is by default written to the file with the same filename except .bai extension added to the end. The user can, however, override this default by providing desired output filename explicitly as an optional command-line argument.
- sambamba merge
sambamba merge is used for merging several sorted BAM files into one. The sorting order of all the files must be the same, and it is maintained in the output file. SAM headers are merged automatically like in Picard merging tool.
- sambamba sort
BAM files can have either 'coordinate' sort order, or 'qname' one. The first one means to sort the file by (integer) reference ID, and for each reference sort corresponding reads by start coordinate. 'qname' sorting order is when reads are sorted lexicographically by their names. sambamba sort does an external sort on input file. That means it reads the source BAM file in chunks that fit into memo
- sambamba view
sambamba view allows to efficiently filter BAM file for alignments satisfying various conditions, as well as access its SAM header and information about reference sequences. In order to make these data readily available for consumption by scripts in Perl/Python/Ruby, JSON output is provided. By default, the tool expects BAM file as an input. In order to work with SAM file, specify -S|--sam-input c
- Pyotr Prins