Skip to main content

Standalone command line tool to visualize coverage from a BAM file

Project description

tinycov

Build Status codecov

Tinycov is a small standalone command line utility written in python to plot the coverage of a BAM file quickly. This software was inspired by Matt Edwards' genome coverage plotter.

Installation

git clone https://github.com/cmdoret/tinycov.git

TODO: Distribute as a package on Pypi

Input

Only a BAM file alignment is required as input. If it is not coordinate-sorted, tinycov will make a sorted copy named input.sorted.bam if the file is named input.bam.

Output

If no output is provided, the coverage plot will be displayed interactively using matplotlib. If --out is used, the plot will be saved in a format determined by the output file's extension.

Additionally, if --text is provided, an output text file will be saved in the bedgraph format with overlapping windows (depending on the values of --res and --skip).

Usage

Usage: tinycov.py [OPTIONS] BAM

Options:
  -r, --res INTEGER     Size of windows in which to compute coverage, in
                        basepairs.  [default: 10000]
  -s, --skip INTEGER    Stride between windows, in basepairs.  [default: 1000]
  -n, --name TEXT       Name of the sample (plot title). Base name of input
                        file by default
  -b, --blacklist TEXT  Exclude those chromosomes from the plot. List of
                        comma-separated chromosome names.
  -w, --whitelist TEXT  Only include those chromosomes in the plot. List of
                        comma-separated chromosome names.
  -o, --out PATH        Output file where to write the plot. If not provided,
                        the plot is shown interactively
  -t, --text PATH       Output file where to write the raw data table.
  -p, --ploidy INTEGER  Ploidy of input sample, used to estimate coverage
                        threshold for aneuploidies
  --help                Show this message and exit.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tinycov-0.0.5.tar.gz (6.4 kB view hashes)

Uploaded Source

Built Distribution

tinycov-0.0.5-py3-none-any.whl (7.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page