Skip to content

lisosome/hypercov

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HyperCov Logo

HyperCov is a high-performance coverage calculator. It supports sorted and unsorted BAM files as well as CRAM files. Hypercov provides several coverage calculation modes supporting BED/GFF regions, fixed windows, whole-genome mode, GC calculation and per-base output.

Installation

Clone the repository and build from source, or use a provided precompiled binary.

  • Precompiled binary:
    • A precompiled hypercov binary is provided in repository Releases.
wget https://github.com/lisosome/hypercov/releases/download/v1.0/hypercov ./hypercov --help
  • Alternatively, build the code from source:
git clone https://github.com/lisosome/hypercov.git cd hypercov make

Usage

Basic:

./hypercov -i sample.bam -o results

Common options

  • -i <file> Input alignment file (BAM/CRAM)
  • -o <prefix> Output file prefix (creates <prefix>.coverage.gz)
  • -r <file> Reference FASTA (required for CRAM and GC)
  • -t <int> Threads (default: 4)
  • -q <int> Minimum mapping quality
  • -F <int> Exclude reads with these flags (default: 1796)
  • -b <file> BED file (region list)
  • -g <file> GFF/GTF file (gene/features)
  • -w <size> Fixed window size (bp)
  • -a Produce per-base output (large)
  • -c Compute GC content (requires -r)
  • --unsorted Sort BAM on-the-fly if not sorted
  • --feature Feature type for GFF mode (Examples: gene, CDS, exon, mRNA) [default: gene]
  • --min-depth <int> minimum depth to consider a base covered (default: 1)

Examples

Whole-genome with 8 threads:

./hypercov -i sample.bam -o results -t 8

BED regions:

./hypercov -i sample.bam -o results -b regions.bed -t 8

GFF gene coverage:

./hypercov -i sample.bam -o results -g genes.gff -t 8

1Mb windows:

./hypercov -i sample.bam -o results -w 1000000 -t 8

With GC content (requires reference):

./hypercov -i sample.bam -o results -r genome.fa -c -t 8

Output

  • <prefix>.coverage.gz — main coverage summary (gzip)
  • <prefix>.per-base.bed.gz — per-base depths (when -a)