Skip to content

CLI Reference

RustQC provides a single rna subcommand that runs all RNA-Seq QC analyses in one pass over the BAM file.

RustQC CLI output

RNA-seq quality control: duplicate rate analysis (dupRadar equivalent), featureCounts-compatible read counting with biotype summaries, 8 RSeQC-equivalent tools (bam_stat, infer_experiment, read_duplication, read_distribution, junction_annotation, junction_saturation, inner_distance, TIN), Qualimap RNA-seq QC, preseq library complexity, and samtools-compatible outputs.

rustqc rna <INPUT>... --gtf <GTF> [OPTIONS]

One or more paths to coordinate-sorted, duplicate-marked alignment files. Accepted formats are SAM, BAM, and CRAM. A BAM/CRAM index (.bai / .csi) enables multi-threaded processing; without one, RustQC falls back to a single counting thread.

Multiple files can be passed and will be processed in parallel, with each file producing its own set of output files. Threads are divided evenly among concurrent jobs.

# Single file
rustqc rna sample.bam --gtf genes.gtf
# Multiple files
rustqc rna sample1.bam sample2.bam sample3.bam --gtf genes.gtf

Path to a GTF gene annotation file (plain or gzip-compressed). Required. The GTF must contain exon features with a gene_id attribute. Transcript-level structure (exon blocks, CDS features) is extracted automatically and used by all analyses: dupRadar, featureCounts, all 8 RSeQC tools (including TIN), Qualimap, preseq, and samtools.

Gzip compression is detected automatically by inspecting the file header (magic bytes), so the .gz extension is not required.

Individual tools can be disabled via the configuration file.

Output directory for all result files. Created if it does not exist.

Default: . (current working directory)

-s, --stranded <unstranded|forward|reverse>

Section titled “-s, --stranded <unstranded|forward|reverse>”

Library strandedness for strand-aware read counting:

ValueMeaning
unstrandedCount reads on either strand
forwardForward stranded (read 1 maps to the transcript strand)
reverseReverse stranded (read 2 maps to the transcript strand)

Default: unstranded

Enable paired-end mode. When set, read pairs are counted as a single fragment. Both mates must overlap the gene for the pair to be assigned.

Default: single-end mode

Number of threads for parallel processing. Parallelism is applied across chromosomes within each BAM file, so the effective speedup depends on the number of chromosomes with mapped reads.

Default: 1

Minimum mapping quality (MAPQ) threshold used by all RSeQC tools. Reads below this threshold are excluded from the “uniquely mapped” counts.

Default: 30

Path to a reference FASTA file. Required when using CRAM input files, as CRAM files store sequences relative to a reference.

Skip the pre-flight validation that checks for duplicate-marking tool signatures in the BAM header. By default, RustQC inspects @PG header lines for known duplicate-marking tools (Picard MarkDuplicates, samblaster, sambamba, biobambam, etc.) and exits with an error if none are found.

Use this flag if your BAM was marked by an unrecognized tool, or if you want to run on a file without duplicate marking for testing purposes.

GTF attribute name to use for biotype grouping in the featureCounts biotype output files.

  • Ensembl GTFs typically use gene_biotype
  • GENCODE GTFs typically use gene_type

If not specified, RustQC defaults to gene_biotype and auto-detects the attribute. If the specified attribute is not found in the GTF, a warning is printed and biotype counting is skipped.

Override the sample name used for output filenames. By default, the sample name is derived from the BAM file stem (e.g., sample.markdup.sorted.bam produces output files named sample.markdup.sorted.*).

When this flag is set, the provided name is used instead, so output files are named <NAME>.*. This is useful when a pipeline already knows the clean sample ID and wants output filenames to match, without relying on BAM filename conventions.

rustqc rna sample.markdup.sorted.bam --gtf genes.gtf --sample-name sample

Write all output files directly into the output directory instead of organizing them into subdirectories. By default, RustQC creates dupradar/, featurecounts/, rseqc/<tool>/, qualimap/, preseq/, and samtools/ subdirectories under the output directory. With --flat-output, all files are written to the top-level output directory.

This can also be set in the configuration file under the rna: section as flat_output: true.

Default: false (nested subdirectories)

Write a JSON summary of all QC results to the specified path. If no path is given, the summary is written to stdout. Use "-" explicitly for stdout.

Path to a YAML configuration file for advanced settings such as chromosome name mapping, per-output-file toggles, and enabling/disabling individual tools. See the Configuration page for the full reference.

Suppress all output except warnings and errors.

Show additional detail during processing.

These flags control parameters for specific RSeQC-equivalent analyses. Each tool runs by default as part of rustqc rna and can be disabled via the configuration file.

OptionDefaultDescription
--skip-tinfalseSkip the TIN (Transcript Integrity Number) analysis
--tin-seed <N>randomRandom seed for reproducible TIN results
--skip-read-duplicationfalseSkip the read duplication analysis
OptionDefaultDescription
--infer-experiment-sample-size <N>200000Maximum number of reads to sample
OptionDefaultDescription
--min-intron <N>50Minimum intron size to consider (shared by both tools)
OptionDefaultDescription
--junction-saturation-seed <N>42Random seed for reproducible sampling
--junction-saturation-min-coverage <N>1Minimum reads for a junction to count as detected
--junction-saturation-percentile-floor <N>5Sampling start percentage
--junction-saturation-percentile-ceiling <N>100Sampling end percentage
--junction-saturation-percentile-step <N>5Sampling step percentage
OptionDefaultDescription
--inner-distance-sample-size <N>1000000Maximum read pairs to sample
--inner-distance-lower-bound <N>-250Histogram lower bound
--inner-distance-upper-bound <N>250Histogram upper bound
--inner-distance-step <N>5Histogram bin width

These flags control parameters for the preseq library complexity extrapolation. Preseq runs by default and can be skipped entirely with --skip-preseq.

OptionDefaultDescription
--skip-preseqfalseSkip the preseq library complexity analysis entirely
--preseq-max-extrap <N>1e10Maximum extrapolation depth in total reads
--preseq-step-size <N>1e6Step size between extrapolation points
--preseq-n-bootstraps <N>100Number of bootstrap replicates for confidence intervals
--preseq-seed <N>408Random seed for bootstrap reproducibility
--preseq-seg-len <N>100000000Maximum merged PE fragment length in bp

CodeMeaning
0Success
1Error (missing input, invalid arguments, BAM processing failure, etc.)

Error messages are printed to stderr with context about the failure.