Home

Awesome

bam-toolbox

Installation

pip install https://github.com/AndersenLab/bam-toolbox/archive/1.0.0.tar.gz

Usage

bam-toolbox 1.0

usage:
  bam <command> [<args>...]
  bam -h | --help
  bam --version

commands:
  coverage

Commands

Coverage

Calculate depth of coverage! There are several ways to do so:

  1. Calculate coverage for the whole genome, nuclear genome, and individual chromosomes. Also calculated the mtDNA:nuclear ratio which acts as a proxy for mitochondrial content.

usage:
  bam coverage <bam> [options] [--mtchr=<mtchr>]
  bam coverage <bam> [options] <chrom:start-end>...
  bam coverage <bam> [options] --window=<size>
  bam coverage <bam> [options] --regions=<gff/bed>
Parameters
Example
bam coverage test.bam --tsv --header

Result:

Output is in --tsv format.

ENTITY  chrom   start   end ATTR    VALUE   DATE
CB4853  I   1   15072434    bases_mapped    1688210 2015-11-08 23:22:39.498133
CB4853  I   1   15072434    depth_of_coverage   0.112006461597  2015-11-08 23:22:39.498242
CB4853  I   1   15072434    breadth_of_coverage 0.0918075342045 2015-11-08 23:22:39.498328
CB4853  I   1   15072434    length  15072434    2015-11-08 23:22:39.498372
CB4853  I   1   15072434    pos_mapped  1383763 2015-11-08 23:22:39.498413
CB4853  II  1   15279421    bases_mapped    1605336 2015-11-08 23:22:39.923802
CB4853  II  1   15279421    depth_of_coverage   0.105065237747  2015-11-08 23:22:39.923880
...
CB4853  mt_nuclear_ratio    51.7503772943   2015-11-08 23:22:41.949819

Formatted Result:

ENTITYchromstartendATTRVALUEDATE
CB4853I115072434bases_mapped1.68821e+062015-11-08 23:26:41.891988
CB4853I115072434depth_of_coverage0.1120062015-11-08 23:26:41.892087
CB4853I115072434breadth_of_coverage0.09180752015-11-08 23:26:41.892155
CB4853I115072434length1.50724e+072015-11-08 23:26:41.892198
CB4853I115072434pos_mapped1.38376e+062015-11-08 23:26:41.892239
CB4853II115279421bases_mapped1.60534e+062015-11-08 23:26:42.319937