Skip to main content

Calculated coverage metrics from a GATK3 Depth Of Coverage file and a bedfile

Project description

CoverageCalculatorPy

Given i) a tabix indexed per-base 'depth of coverage' file (similar to generated in GATK3) and , ii) a bed file CoverageCalculatorPy will generate four text reports:

  • .coverage file containing the mean depth of coverage across each interval in the bedfile, and the percentage of bases which meet a given depth (default is 100x) across each interval.
  • .totalcoverage file containing the the same metrics above summerised over all intervals in the given bedfile. Summeries of adittional subsets of the input bedfile can be included using --groups (see below)
  • .gaps file contains intervals which do not meet the given depth of coverage threshold
  • .missing file contains intervals which do not have a corresponding coordinate in the 'depth of coverage' file, and therefore cannot be evaluated.

Input Arguments

-D/--depthfile
path to tabix indexed depth-of-coverage file

-B/--bedfile
path to bedfile. Chromosomes must not be prefixed with 'chr'

-d/--depth
depth threshold for precentage horizontal coverage calculation (default: 100)

-o/--outname
output name to prefix on text reports (default: output)

-O/--outdir
directory to save output files to (default: current)

-g/--groupfile
path to groupfile (see below)

Tabix indexing a GATK3 DepthOfCoverage file

The 'depth of coverage' file must be tabix indexed. The first three columns of the depthfile must be; chromosome, coordinate and depth. A file generated in GATK3 can be indexed as follows:

sed 's/:/\t/g' <GATK depthOfCoverage file> | grep -v 'Locus' | sort -k1,1 -k2,2n | bgzip > <filename.gz>

(on macOS)
sed "s/:/$(printf '\t')/g" <GATK depthOfCoverage file>  |  grep -v 'Locus' | sort -k1,1 -k2,2n | bgzip > <filename.gz>

tabix -b 2 -e 2 -s 1 <filename.gz> 

Adding a groupfile

The groupfile is a way of generating combined metrics across a number of intervals (i.e. combined across all exons in a gene). These metrics will appear in the .totalcoverage file. The groupfile must have a header (this will be included in the output), be a single column containing the same number of rows as the bedfile it will be analysed with.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

CoverageCalculatorPy-1.0.0-py3.7.egg (5.6 kB view details)

Uploaded Source

CoverageCalculatorPy-1.0.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file CoverageCalculatorPy-1.0.0-py3.7.egg.

File metadata

  • Download URL: CoverageCalculatorPy-1.0.0-py3.7.egg
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for CoverageCalculatorPy-1.0.0-py3.7.egg
Algorithm Hash digest
SHA256 952817cee36330a72194bf5608de7e1849f103d93b43893185561258f645f814
MD5 ea76eeb817df74ad74cf0828cd49ad6f
BLAKE2b-256 d879225c81bf75f0b01d55730aec2292344893d076e7b95df1e1873aa5e9c037

See more details on using hashes here.

File details

Details for the file CoverageCalculatorPy-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: CoverageCalculatorPy-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for CoverageCalculatorPy-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0124e65ed823c0727b4832f29cd91bbbd32d30b9b382f480f08143d9ab0d3464
MD5 ec27b5ab9045c9590b58993e228c0fbd
BLAKE2b-256 e5662040547e289113aced04e459f89e908a7d944299067f6391952724e63fd5

See more details on using hashes here.

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