Skip to content

Command-line interface

Installing the package puts one command on your PATH, splicescope, with three subcommands. The help text below is generated from the parser when the site is built, so it always matches the installed version.

subcommand what it does
simulate write a synthetic dataset with known ground truth
run the whole pipeline on a directory of STAR junction tables
consequence protein-consequence prediction for events produced by any tool

splicescope

usage: splicescope [-h] [--version] {simulate,run,consequence} ...

Command-line interface for splicescope.

positional arguments:
  {simulate,run,consequence}
    simulate            write a synthetic ground-truth dataset
    run                 end-to-end: annotate -> quantify -> diff -> cryptic ML
    consequence         predict frame / PTC / NMD effects for cassette exons or
                        splice-site shifts

options:
  -h, --help            show this help message and exit
  --version             show program's version number and exit

splicescope simulate

Writes STAR SJ.out.tab files, a GTF annotation with coding sequences, groups.tsv, an indexed genome FASTA and truth.tsv, which lists the injected events so that recall can be measured. Nothing is downloaded.

usage: splicescope simulate [-h] --outdir OUTDIR [--genes GENES]
                            [--replicates REPLICATES] [--alt-ss ALT_SS] [--mxe MXE]
                            [--seed SEED]

options:
  -h, --help            show this help message and exit
  --outdir OUTDIR
  --genes GENES
  --replicates REPLICATES
  --alt-ss ALT_SS       fraction of genes with an A5SS/A3SS event
  --mxe MXE             fraction of genes with an MXE event
  --seed SEED

splicescope run

Annotates, quantifies, detects events, tests for differential splicing and, when --genome is given, predicts protein consequences. See Quick start for the files it writes.

usage: splicescope run [-h] --sj-dir SJ_DIR --gtf GTF --groups GROUPS --outdir OUTDIR
                       [--gene-sets GENE_SETS] [--labels LABELS] [--genome GENOME]
                       [--min-reads MIN_READS] [--max-exon MAX_EXON]
                       [--max-mxe-candidates MAX_MXE_CANDIDATES] [--seed SEED]

options:
  -h, --help            show this help message and exit
  --sj-dir SJ_DIR       directory of STAR *.SJ.out.tab files
  --gtf GTF
  --groups GROUPS       TSV with columns sample,condition
  --outdir OUTDIR
  --gene-sets GENE_SETS
                        optional GMT file for pathway enrichment
  --labels LABELS       optional TSV of curated cryptic labels, to train and score the
                        classifier: columns chrom, start, end, strand,
                        is_cryptic_truth (0/1)
  --genome GENOME       indexed genome FASTA (.fai required); enables protein-
                        consequence prediction
  --min-reads MIN_READS
  --max-exon MAX_EXON   longest candidate exon considered for mutually-exclusive-exon
                        events
  --max-mxe-candidates MAX_MXE_CANDIDATES
                        most candidate exons one donor/acceptor anchor may hold before
                        it is treated as noise and skipped (pair enumeration is
                        quadratic in this)
  --seed SEED

The groups file is a tab-separated table with the columns sample and condition, and exactly two conditions. Sample names come from the junction file names with a trailing SJ.out removed: A1_SJ.out.tab, A1.SJ.out.tab, A1SJ.out.tab and A1.tab all give A1. The run stops with an error if no sample name is shared between the two.

splicescope consequence

Runs only the consequence layer, on candidates produced elsewhere (for example an rMATS or LeafCutter run). Cassette exons are given as exon intervals (exon_start, exon_end); novel donors and acceptors as junctions (start, end). The genome needs its samtools faidx index next to it.

usage: splicescope consequence [-h] --events EVENTS --gtf GTF --genome GENOME --out
                               OUT [--mode {auto,exon,junction}]

options:
  -h, --help            show this help message and exit
  --events EVENTS       TSV of cassette exons (chrom, strand, exon_start, exon_end) or
                        of junctions (chrom, strand, start, end)
  --gtf GTF
  --genome GENOME       indexed genome FASTA (.fai required)
  --out OUT
  --mode {auto,exon,junction}
                        'exon' reads exon_start/exon_end as a cassette exon;
                        'junction' reads start/end as an intron and resolves its novel
                        splice site against the annotation; 'auto' (default) picks by
                        which columns are present

The consequence classes, the frame arithmetic and the NMD rule are defined in Methods, section 8b.