Last commit

Display an image of depth to display any anomaly an intervals+bams


This program is now part of the main jvarkit tool. See jvarkit for compiling.

Usage: java -jar dist/jvarkit.jar coverageplotter  [options] Files

Usage: coverageplotter [options] Files
      Custom CSS file. format <sample> <css>. One per line. eg. "sample1 
    --dimension, --dim
      Image Dimension. a dimension can be specified as '[integer]x[integer]' 
      or it can be the path to an existing png,jpg,xcf,svg file.
      Default: java.awt.Dimension[width=1000,height=300]
    --extend, -x
      Extending interval. The following syntaxes are supported: 1000; 1kb; 
      1,000; 30%(shrink); 150% (extend); 0.5 (shrink); 1.5 (extend)
      Default: 3.0
    --gff, --gff3
      Optional Tabix indexed GFF3 file. Will be used to retrieve an interval 
      by gene name, or to display gene names in a region.
    -h, --help
      print help and exit
      What kind of help. One of [usage,markdown,xml].
      Ignore known CNV containing the whole region (prevent large known CNV to 
      be displayed)
      Default: false
      When calculating the median depth, also consider the original user's 
      region, not only the extended interval.
      Default: false
  * --region, --interval
      Interval region
      Optional Tabix indexed Bed or VCF file containing known CNV. Both types 
      must be indexed.
      Run Loess smoothing on GC%. Experimental. For now, I find the smooting 
      is too strong.
      Default: false
      min mapping quality
      Default: 1
      ignore position if depth > 'x'
      Default: 500
      Max normalized Y
      Default: 3.0
    -o, --output
      Output file. Optional . Default: stdout
  * -R, --reference
      Indexed fasta Reference file. This file must be indexed with samtools 
      faidx and with picard/gatk CreateSequenceDictionary or samtools dict
      Run median smooth on this number of pixels. (ignore if <=1)
      Default: 10
      Force SVG-only output (default is HTML+SVG).
      Default: false
      Calculating the median depth can be memory consumming for large regions. 
      If the region is larger than 'x', use 'average' instead of 'median'. A 
      distance specified as a positive integer.Commas are removed. The 
      following suffixes are interpreted : b,bp,k,kb,m,mb,g,gb
      Default: 2000000
      print version and exit


See also in Biostars

Creation Date


Source code


Unit Tests




The project is licensed under the MIT license.


Should you cite coverageplotter ? https://github.com/mr-c/shouldacite/blob/master/should-I-cite-this-software.md

The current reference is:


Lindenbaum, Pierre (2015): JVarkit: java-based utilities for Bioinformatics. figshare. http://dx.doi.org/10.6084/m9.figshare.1425030


input a set of bam/cram files or one file with the suffix ‘.list’ containing the path to the bams


output is a HTML+SVG file


java -jar dist/coverageplotter.jar -R src/test/resources/rotavirus_rf.fa --region "RF01:100-200" src/test/resources/*.bam