Skip to content

CLI Reference

./cigar-sashimi [wrapper-options] --bam <BAM> --region <CHR:START-END> [core-options]

The cigar-sashimi wrapper consumes the output/rendering options below itself and forwards everything else to the analysis core. For svg/html output it runs the core and the renderer as a pipeline; for json it runs the core alone.

Wrapper options

Option Default Description
-f, --format <type> svg svg, html, or json.
-o, --output <path> cigar-sashimi.<fmt> Output path. JSON goes to stdout when omitted.
--width <px> 1200 Figure width (svg/html only).
--height <px> 860 Figure height (svg/html only).
--intron-scale <r> 0.05 Intron compression ratio, 0–1 (svg/html only).
--show-novel-exon off Highlight assembly exons absent from the reference GTF.
--include-first-last-exon off Also highlight terminal exons (excluded by default).
--show-novel-intron off Highlight assembly introns absent from the reference GTF.
--merge-insertion-sources off Merge nearby coverage-track and assembly insertions with similar sequence into one gap.
-h, --help Show wrapper help.

For svg/html output the wrapper also writes the intermediate JSON next to your file (plot.svgplot.json).

Analysis options (core)

All of the following are forwarded to cigar-sashimi-core.

Input

Option Default Description
-b, --bam <FILE> required Indexed BAM file.
-r, --region <REGION> required chr:start-end, 1-based inclusive.

Filtering

Option Default Description
--min-mapq <INT> 10 Skip reads below this mapping quality.
--exclude-flags <INT> 0x904 Drop reads matching any of these SAM flag bits (decimal or 0x hex). The default excludes secondary, supplementary, and unmapped reads.
--min-junction <INT> 2 Minimum supporting reads for a junction arc.
--junc-cov-ratio <FLOAT> 0.01 Minimum junction count relative to flanking coverage.
--min-deletion <INT> 2 Minimum supporting reads for a deletion arc.
--min-del-len <INT> 1 Minimum deletion length (bp).
--min-insertion <INT> 2 Minimum supporting reads for an insertion cluster.
--min-ins-len <INT> 5 Minimum insertion length to consider (bp).
--min-softclip <INT> 2 Minimum supporting reads for a soft-clip cluster.
--min-clip-len <INT> 20 Minimum soft-clip length to consider (bp).
--ins-cov-ratio <FLOAT> 0.05 Minimum insertion/soft-clip count relative to local coverage.

Clustering

Insertions and soft clips are grouped by sequence similarity using minimizers. These control that grouping; the defaults rarely need changing.

Option Default Description
-k, --kmer-size <INT> 15 Minimizer k-mer size.
-w, --window-size <INT> 10 Minimizer window size.
--min-jaccard <FLOAT> 0.6 Minimum Jaccard similarity to place two events in the same cluster.

Annotation & intron compression

Option Default Description
--gtf <FILE> Reference GTF for the gene model. Overrides coverage-based exon/intron detection.
--assembly <FILE> Assembly GTF (e.g. assembled insertion/soft-clip transcripts) drawn as a second track.
--intron-cov <FLOAT> 10.0 Coverage-based detection: max average depth for a window to be called intron (used only when no --gtf is given).
--intron-window <INT> 25 Coverage-based detection: window size in bp.
--no-compression off Disable exon/intron detection and intron compression entirely.

Renderer (direct use)

The renderer can be run on its own against core JSON:

node render/src/cli.js --input data.json --format html --output plot.html
Option Default Description
--input <path> - (stdin) Input JSON, or - for stdin.
--format <type> svg svg or html.
--output <path> - (stdout) Output path, or - for stdout.
--width <px> 1200 Figure width.
--height <px> 860 Figure height.
--intron-scale <f> 0.05 Intron compression ratio, 0–1.
--merge-insertion-sources off Merge nearby coverage-track and assembly insertions.
--show-novel-exon off Highlight novel assembly exons.
--include-first-last-exon off Include terminal exons in novel highlighting.
--show-novel-intron off Highlight novel assembly introns.

Filtering thresholds are applied by the core, not the renderer.

Examples

Interactive HTML over a gene with a reference annotation:

./cigar-sashimi \
  --bam sample.bam \
  --region chr7:55019017-55211628 \
  --gtf gencode.gtf \
  --format html \
  --output egfr.html

Inspect raw JSON:

./cigar-sashimi --bam sample.bam --region chr7:55019017-55211628 --format json