WigReader: A ChIP-Seq and RNA-Seq Library for Working with Wiggle Files

by Ron Gejman

I am announcing the release of WigReader, a C++ ChIP-Seq analysis tool and library I developed and refined in the last 2 years.


The idea for WigReader came about as I tried to do something very basic a couple of years ago: take a list of genomic regions (e.g. chr1:xxxxxxxx-yyyyyyyy and, for each of those coordinates, tell me the average RPKM.

Should be simple, right?

In practice, the (free) tools out there don’t do a very good job of performing this task. Where they do work, they don’t let you do more complicated things. For instance:

  • (Easily) calculate average RPKMs in every intergenic region
  • Find co-localized regions of enrichment across multiple ChIP-Seq samples
  • Partition a genome into regions based on enrichment
  • Generate a ChIP-Seq profile from both ends of exons to look for CDS patterns


Obviously, no cookie-cutter tool will work. Instead, I needed a way to easily operate on summary ChIP-Seq data, like TDF or wiggle files. Enter WigReader–a library for working with wiggle files, written in C++ (for speed). Here’s how you use it.

Available at: https://github.com/rgejman/wigreader