https://github.com/dhslab/covfast

Small c program to calculate coverage from a bam/cram over bed intervals

https://github.com/dhslab/covfast

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.9%) to scientific vocabulary
Last synced: 4 months ago · JSON representation

Repository

Small c program to calculate coverage from a bam/cram over bed intervals

Basic Info
  • Host: GitHub
  • Owner: dhslab
  • License: mit
  • Language: C
  • Default Branch: main
  • Size: 43.4 MB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 5
Created 10 months ago · Last pushed 7 months ago
Metadata Files
Readme License

README.md

covfast

A fast, C-based utility for calculating template-based coverage from CRAM/BAM files. covfast calculates depth of coverage statistics for specified genomic regions. It is designed to calculate template coverage, meaning that for a given read pair, any overlapping bases between the two reads are counted only once. This provides a measure of unique fragment coverage, which can be more accurate for certain applications than the standard alignment-based coverage. The program's logic and filtering are designed to closely match the output of samtools mpileup.

Key Features: - Template-Based Coverage: Avoids double-counting overlapping regions of read pairs. - High Performance: Written in C with htslib for efficient CRAM/BAM processing. - Comparable to samtools: Mimics the filtering logic of samtools depth -s for comparable results. - Flexible Filtering: Allows for custom setting of minimum mapping quality (MAPQ) and base quality.

Build Instructions:

Requirements: gcc make wget Standard htslib dependencies: zlib, bzip2, lzma, curl, openssl. Compiling: The included Makefile will automatically download and compile the required version of htslib before building the covfast executable. Build the executable: make

This will create the covfast binary in the current directory.

Install to system (Optional):

To install the covfast executable to /usr/local/bin for system-wide access, run: sudo make install Usage

Usage: ./covfast [OPTIONS]

Positional Arguments: A standard BED file defining regions of interest (0-based). An indexed CRAM or BAM file with read alignments.

Options: -r, --reference The reference genome FASTA file, required for CRAM. -o, --outfile Output file for statistics. [Default: stdout] -q, --minmapqual Minimum mapping quality. [Default: 1] -Q, --minbasequal Minimum base quality. [Default: 13] -c, --coverage_values Comma-separated coverage thresholds for summary stats. -h, --help Show this help message and exit.

Example:

covfast --reference /path/to/hg38.fa \ --outfile coverageresults.tsv \ /path/to/myregions.bed \ /path/to/sample.cram

Docker:

For a fully containerized and reproducible environment, you can use the provided Dockerfile. See the Docker README for detailed instructions.

Owner

  • Name: Code and Software from David Spencer's lab
  • Login: dhslab
  • Kind: organization
  • Email: dspencerlab@gmail.com
  • Location: United States of America

GitHub Events

Total
  • Release event: 5
  • Push event: 2
  • Create event: 5
Last Year
  • Release event: 5
  • Push event: 2
  • Create event: 5