Last commit

Print Sashimi plots from Bam


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

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

Usage: plotsashimi [options] Files
      Custom CSS stylesheet
      Force the maximum coverage to this value. ignored if <=0
      Default: 0
    -g, --gtf
      A GTF (General Transfer Format) file. See 
      https://www.ensembl.org/info/website/upload/gff.html . Please note that 
      CDS are only detected if a start and stop codons are defined.
      Generate gzipped compressed svg files.
      Default: false
    -h, --help
      print help and exit
      What kind of help. One of [usage,markdown,xml].
    -u, --url, --hyperlink
      creates a hyperlink an area is clicked. creates a hyperlink when 'click' 
      in an area. The URL must contains __CHROM__, __START__ and __END__ that 
      will be replaced by their values. Predefined values are 
      'hg19','hg38','igv'. 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: <empty string>
  * -r, --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 '[ 
      Default: (empty)
    -m, --manifest
      Manifest Bed file output containing chrom/start/end of each gene
      Min mapping quality
      Default: 0
  * -o, --out
      An existing directory or a filename ending with the '.zip' or '.tar' or 
      '.tar.gz' suffix.
      Data partitioning using the SAM Read Group (see 
      https://gatkforums.broadinstitute.org/gatk/discussion/6472/ ) . It can 
      be any combination of sample, library....
      Default: sample
      Possible Values: [readgroup, sample, library, platform, center, sample_by_platform, sample_by_center, sample_by_platform_by_center, any]
    -R, --reference
      For Reading CRAM. Indexed fasta Reference file. This file must be 
      indexed with samtools faidx and with picard/gatk 
      CreateSequenceDictionary or samtools dict
      Do not generate a SVG file if there is no read in the interval
      Default: false
    -D, --use-deletion
      also use the D operator in the cigar string (default is use only 'N').
      Default: false
      print version and exit
    -w, --width
      image width.
      Default: 1000


See also in Biostars

Creation Date


Source code


Unit Tests




The project is licensed under the MIT license.


Should you cite plotsashimi ? 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 is a set of indexed BAM files or a file with the ‘.list’ suffix containing the path to the bams.


 java -jar dist/plotsashimi.jar -r "chr3:38597400-38599300" -m jeter.mf --gtf jeter.gtf ENCFF331CGL.rnaseq.bam -o TMP

$ find TMP/ -name "*.svg"

$ cat jeter.mf 
#chrom	start	end	bam	Sample	Genes	svg
chr3	38597399	38599300	ENCFF331CGL.rnaseq.bam	SCN5A	.	86/f9362065ddce1af4b31b47be80fff6/chr3_38599300_38599300.svg

$ cat jeter.list

$ cat jeter.bed 
chr3	38595150	38599347
chr3	38595350	38599500

$ java -jar dist/plotsashimi.jar -r jeter.bed -m jeter.mf --gtf jeter.gtf jeter.list -o jeter.zip

$ unzip -l jeter.zip 
Archive:  jeter.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
    36566  2019-12-05 15:52   f6/d0bf04098aa24eb3111666ed171a11/chr3_38599347_38599347.svg
    36364  2019-12-05 15:52   82/fd0c7ad61ecc0fa22eda93e75a6943/chr3_38599500_38599500.svg
---------                     -------
    72930                     2 files

$ cat jeter.mf | column -t
#chrom  start     end       bam                     Genes   Samples  svg
chr3    38595150  38599347  ENCFF331CGL.rnaseq.bam  SCN5A   .        f6/d0bf04098aa24eb3111666ed171a11/chr3_38599347_38599347.svg
chr3    38595350  38599500  ENCFF331CGL.rnaseq.bam  SCN5A   .        82/fd0c7ad61ecc0fa22eda93e75a6943/chr3_38599500_38599500.svg