Get started

This page covers installation and basic usage of Bamtocov.

Installation

You can install bamtocov from BioConda, if you have conda installed:

conda install -c conda-forge -c bioconda bamtocov

Compiling from source

  1. Install nim and nimble.
  2. Install hts-lib
  3. Compile with nimble build

Quick start

bamtocov alignment.bam > coverage.bed

will produce a coverage BED file from the alignment file.

File formats

BED files

A BED file (.bed) is a tab-delimited text file that defines a feature track. In this context the magnitude refers to the nucleotide coverage of the interval.

The columns are chromosome name, start position (inclusive, zero-based), end position (non-inclusive, zero-based) and coverage. An example is:

seq1    0       9       0
seq1    9       109     5
seq1    109     189     0
seq1    189     200     2

Target statistics

:warning: this format is not final.

For each sample, 5 columns are printed:

  • bam_bases
  • bam_mean
  • bam_min
  • bam_max
  • bam_length
interval bam_bases bam_mean bam_min bam_max bam_length
target1_8X 699 3.495 1 6 200
target2_0X 0 0.0 0 0 50
target3_1X . . . . .
for_rev_10Xa 100 10.0 10 10 10
for_rev_10Xb 100 10.0 10 10 10
for_rev_10Xc . . . . .