jvarkit

WesCnvSvg

Last commit

SVG visualization of bam DEPTH for multiple regions

Usage

Usage: wescnvsvg [options] Files
  Options:
    -cap, --cap
      Cap coverage to this value. Negative=don't set any limit
      Default: -1
    -css, --css
      custom svg css stylesheet
    -x, --extend
      Extend each region in the bed by 'x' bases. If the argument ends with 
      '%' it is interpreted as a percentage.
    --filter
      A filter expression. Reads matching the expression will be filtered-out. 
      Empty String means 'filter out nothing/Accept all'. See https://github.com/lindenb/jvarkit/blob/master/src/main/resources/javacc/com/github/lindenb/jvarkit/util/bio/samfilter/SamFilterParser.jj 
      for a complete syntax.
      Default: Accept All/ Filter out nothing
    -height, --height
      Sample Track height
      Default: 100
    -h, --help
      print help and exit
    --helpFormat
      What kind of help. One of [usage,markdown,xml].
    -u, --url, --hyperlink
      creates a hyperlink when 'click' in an area. The URL must contains 
      __CHROM__, __START__ and __END__ that will be replaced by their values. 
      IGV : "http://localhost:60151/goto?locus=__CHROM__%3A__START__-__END__" 
      , UCSC: "http://genome.ucsc.edu/cgi-bin/hgTracks?org=Human&db=hg19&position=__CHROM__%3A__START__-__END__"
      Default: none
    -B, --bed, -b, --capture, -r, -rgn, --region, --interval
      A source of intervals. The following suffixes are recognized: vcf, 
      vcf.gz bed, bed.gz, gtf, gff, gff.gz, gtf.gz.Otherwise it could be an 
      empty string (no interval) or a list of plain interval separated by '[ 
      \t\n;,]' 
      Default: (unspecified)
    -o, --output
      Output file. Optional . Default: stdout
    -p, -percentile, --percentile
      How to compute the percentil of a region
      Default: AVERAGE
      Possible Values: [MIN, MAX, MEDIAN, AVERAGE, RANDOM, SUM]
  * -R, --ref, --reference
      Indexed fasta Reference file. This file must be indexed with samtools 
      faidx and with picard CreateSequenceDictionary
    -smooth, --smooth
      Smoothing pixel window size. Negative=don't smooth
      Default: 100
    --title
      document title
      Default: WesCnvSvg
    --version
      print version and exit
    -w, --width
      Page width
      Default: 1000

Keywords

Compilation

Requirements / Dependencies

Download and Compile

$ git clone "https://github.com/lindenb/jvarkit.git"
$ cd jvarkit
$ ./gradlew wescnvsvg

The java jar file will be installed in the dist directory.

Source code

https://github.com/lindenb/jvarkit/tree/master/src/main/java/com/github/lindenb/jvarkit/tools/bam2svg/WesCnvSvg.java

Unit Tests

https://github.com/lindenb/jvarkit/tree/master/src/test/java/com/github/lindenb/jvarkit/tools/bam2svg/WesCnvSvgTest.java

Contribute

License

The project is licensed under the MIT license.

Citing

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

The current reference is:

http://dx.doi.org/10.6084/m9.figshare.1425030

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

Input

input is a set of bam file or a file with the ‘*.list’ suffix containing the path to the bam files.

Example

$ find dir -name "*.bam"  > bam.list
$ java -jar dist/wescnvsvg.jar -R ref.fasta -B cnv.bed bam.list > cnv.svg 

Screenshots

https://twitter.com/yokofakun/status/1022503372669300738 :

ScreenShot

https://twitter.com/yokofakun/status/1022805656905150464

ScreenShot

https://twitter.com/yokofakun/status/1023953180927963137

ScreenShot

https://twitter.com/yokofakun/status/1024315948847849472

ScreenShot

https://twitter.com/yokofakun/status/1024315948847849472

ScreenShot

https://twitter.com/yokofakun/status/1025330308193779712

ScreenShot

https://twitter.com/yokofakun/status/1040592885786263554

ScreenShot

https://twitter.com/yokofakun/status/1040577235856580608

ScreenShot

https://twitter.com/yokofakun/status/1057625407913111557

ScreenShot

https://twitter.com/yokofakun/status/1180046139502059521

ScreenShot