Skip to main content

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.

Metadata

Release files for CoverageCalculatorPy 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for CoverageCalculatorPy 1.0.1
File Interpreter ABI Platform
CoverageCalculatorPy-1.0.1-py3.7.egg Legacy Egg format - - Details
CoverageCalculatorPy-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 11.5 kB

Release files / CoverageCalculatorPy-1.0.1-py3.7.egg

Download URL CoverageCalculatorPy-1.0.1-py3.7.egg
Size 5.6 kB
Tags Egg
SHA-256 checksum
How to use checksums
498913f2ab7853b654a9f2c9de14ea3d6902bcd7e119dae7676cad5bb3022244
BLAKE2b-256 checksum
How to use checksums
64293afbde540f1ec7fe55a45f2e661d5cb8629b90d4392b809d1492736b9985
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / CoverageCalculatorPy-1.0.1-py3-none-any.whl

Download URL CoverageCalculatorPy-1.0.1-py3-none-any.whl
Size 5.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eedcaa17446cfa418be4df55714ac32b655d52b912917a09f0c8fdc0073e0784
BLAKE2b-256 checksum
How to use checksums
cfe689d7628d0b6eee8843e3a681f1b880b0690d45a8c379caa14318b2302982
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page