Skip to content

cigar-sashimi

cigar-sashimi builds sashimi plots directly from BAM alignments by reading the complete CIGAR string of every read, not just its splice junctions. It walks the full alignment, where a single pass surfaces splice junctions, deletions, insertions, and soft clips side by side over a genomic region.

Try it in your browser → — no install, no server, and your data never leaves your machine.

What it shows

From an indexed BAM file and a region you get a single coverage-anchored figure with:

  • Coverage — per-base read depth across the region
  • Junction arcs — spliced reads (CIGAR N), with supporting-read counts
  • Deletion arcs — deletions relative to the reference (CIGAR D)
  • Insertions — inserted sequence (CIGAR I), clustered by sequence similarity
  • Soft clips — clipped read ends (CIGAR S), clustered the same way
  • Gene model — exon/intron structure, either from a GTF annotation you supply or inferred from coverage when no annotation is given
  • Assembled transcripts — an optional second annotation track (e.g. StringTie or FLAIR output) with novel exon / novel intron highlighting against the reference

Two ways to run it

Best for Annotation Output
Web App Quick look at one region, sharing, no setup Choose in browser Interactive plot in the browser
CLI App Batch work, scripting, large regions --gtf / --assembly SVG, or interactive HTML

Both run the exact same analysis engine, so a plot you preview in the browser matches what the CLI produces.

Output modes (CLI)

  • svg — a static figure for reports and figures
  • html — a self-contained interactive view (hover tooltips, zoom, pan)

A first command

./cigar-sashimi \
  --bam test/data/test.bam \
  --region chr1:100-300 \
  --min-junction 1 \
  --min-insertion 1 \
  --min-clip-len 1 \
  --min-ins-len 1 \
  --min-mapq 0 \
  --format html \
  --output plot.html

The bundled test BAM is intentionally tiny, and the default filters are tuned for real data, so this example relaxes them to make every event type visible. See Getting Started for the full walkthrough.