Skip to content

Qualimap

Qualimap is a platform-independent application for quality control of sequencing alignment data. RustQC reimplements the rnaseq mode of Qualimap, producing identical output that is directly parseable by MultiQC.

The Qualimap analysis runs automatically as part of rustqc rna in the same single-pass BAM scan as all other analyses – no extra BAM pass is needed.

RustQC’s Qualimap module computes:

  • Gene body coverage profiles: coverage distribution along normalized transcript positions from 5’ to 3’, revealing systematic biases such as 3’ degradation or incomplete reverse transcription
  • 5’/3’ bias metrics: quantitative measures of coverage uniformity across gene bodies, used for sample QC and batch-effect detection
  • Read origin classification: counts reads as exonic, intronic, intergenic, or overlapping multiple genes’ exons
  • Strand-specificity estimation: validates whether the observed strand distribution matches the expected library protocol
  • Splice junction motif analysis: counts canonical and non-canonical donor/acceptor junction motifs across all uniquely-mapped reads
  • Alignment statistics: primary/secondary alignments, multi-mappers, proper pairs, and supplementary read counts

All Qualimap output files are written to a qualimap/ subdirectory under the output directory, matching the directory structure that MultiQC expects.

  • Directoryqualimap/
    • qualimapReport.html Self-contained HTML report
    • rnaseq_qc_results.txt Qualimap-compatible QC report
    • Directoryraw_data_qualimapReport/
      • coverage_profile_along_genes_(total).txt Coverage profile (all genes)
      • coverage_profile_along_genes_(high).txt Coverage profile (highly expressed genes)
      • coverage_profile_along_genes_(low).txt Coverage profile (lowly expressed genes)
    • Directoryimages_qualimapReport/
      • Coverage Profile Along Genes (Total).png Gene body coverage chart
      • Coverage Profile Along Genes (High).png Coverage chart (highly expressed genes)
      • Coverage Profile Along Genes (Low).png Coverage chart (lowly expressed genes)
      • Transcript coverage histogram.png Coverage depth histogram (0-50X)
      • Reads Genomic Origin.png Exonic/intronic/intergenic pie chart
      • Junction Analysis.png Known/novel junction pie chart

File: rnaseq_qc_results.txt

The main QC report, formatted identically to Qualimap’s rnaseq output. This file is the primary input for MultiQC’s Qualimap rnaseq module. It contains four sections:

>>>>>>> Input
bam file = sample

Alignment-level statistics for all primary reads:

>>>>>>> Reads alignment
reads aligned (left/right) = 86,909,417 / 86,888,892
read pairs aligned = 86,778,882
total alignments = 189,114,475
secondary alignments = 15,316,166
non-unique alignments = 26,451,119
aligned to genes = 122,500,822
ambiguous alignments = 2,422,409
no feature assigned = 37,740,125
not aligned = 12,490,977
SSP estimation (fwd/rev) = 0.04 / 0.96
Field Description
reads aligned Primary alignments: mapped records not flagged secondary (SE)
total alignments All mapped reads (primary + secondary)
secondary alignments Alignments flagged as secondary (0x100)
non-unique alignments Multi-mappers (NH tag > 1)
aligned to genes Reads assigned to exactly one gene (exonic)
ambiguous alignments Reads enclosed by multiple genes
no feature assigned Reads with no enclosing gene annotation
not aligned Unmapped reads encountered in the BAM
SSP estimation Strand-specificity proportions (forward / reverse)

Per-base classification of read origin, counting each read’s aligned bases against the annotation:

>>>>>>> Reads genomic origin
exonic = 122,500,822 (76.45%)
intronic = 29,504,572 (18.37%)
intergenic = 8,344,022 (5.19%)
overlapping exon = 6,754,726 (4.2%)
Field Description
exonic Reads fully enclosed by a single gene’s exons
intronic Reads overlapping introns but not exons
intergenic Reads in regions with no gene annotation
overlapping exon Reads partially overlapping exons (not fully enclosed)

Coverage bias metrics computed from the gene body coverage profile:

>>>>>>> Transcript coverage profile
5' bias = 0.87
3' bias = 0.77
5'-3' bias = 1.11
Metric Description
5’ bias Median over transcripts of mean coverage of the first 100 bases / mean coverage
3’ bias Median over transcripts of mean coverage of the last 100 bases / mean coverage
5’-3’ bias Median over transcripts of mean coverage of the first 100 / of the last 100 bases

As in Qualimap, the transcripts are the best-covered transcript of each gene (at least 500 bp long, mean coverage at least 1), limited to those at or above the 1001st highest mean coverage. The medians are Commons Math 2.0 percentiles: a transcript with no coverage at either end gives a 5’/3’ ratio of NaN, which is kept and sorted last, so it raises the 5’-3’ bias median rather than being dropped.

Bias values close to 1.0 indicate uniform coverage. Values significantly above 1.0 for 5’ bias or below 1.0 for 3’ bias suggest degradation or protocol issues.

Files: coverage_profile_along_genes_(total|high|low).txt

Tab-separated files with 100 rows, one per percentile bin (0-99), showing the normalized coverage depth at each position along the gene body:

Column Description
Position Percentile position along gene body (0.0 to 99.0)
Coverage Normalized coverage depth at this position

Three tiers are produced:

Tier File Description
Total coverage_profile_along_genes_(total).txt All expressed genes
High coverage_profile_along_genes_(high).txt Top 500 genes by mean coverage
Low coverage_profile_along_genes_(low).txt Bottom 500 genes by mean coverage

The total profile is the one parsed by MultiQC for the gene body coverage plot.

Chart images are generated in images_qualimapReport/, matching the plots produced by Qualimap’s HTML report:

Qualimap (Java)
RustQC
Qualimap coverage profile (total)
RustQC coverage profile (total)
Qualimap (Java)
RustQC
Qualimap coverage profile (high)
RustQC coverage profile (high)
Qualimap (Java)
RustQC
Qualimap coverage profile (low)
RustQC coverage profile (low)
Qualimap (Java)
RustQC
Qualimap transcript coverage histogram
RustQC transcript coverage histogram
Qualimap (Java)
RustQC
Qualimap reads genomic origin
RustQC reads genomic origin
Qualimap (Java)
RustQC
Qualimap junction analysis
RustQC junction analysis

File: qualimapReport.html

A self-contained HTML report matching Qualimap’s layout and styling, including all six chart images, summary tables, and a sidebar table of contents. The report uses embedded CSS and base64-encoded assets so it can be viewed in any browser without external dependencies.

View an example HTML report

Pattern Interpretation
Flat/uniform Good library quality – even coverage across transcripts
3’ bias (rising right) RNA degradation or oligo-dT priming bias
5’ bias (rising left) Incomplete reverse transcription or random-priming protocol
Both-end dropout Short fragment library or size-selection issue
Metric Good Problematic
5’-3’ bias 0.8 - 1.2 < 0.5 or > 2.0
5’ bias 0.8 - 1.2 > 2.0 (enrichment) or < 0.5 (depletion)
3’ bias 0.8 - 1.2 > 2.0 (enrichment) or < 0.5 (depletion)

For strand-specific libraries, one of the SSP values should be close to 1.0 and the other close to 0.0. Common patterns:

Library type Expected fwd Expected rev
Unstranded ~0.5 ~0.5
dUTP / Illumina TruSeq Stranded ~0.02-0.05 ~0.95-0.98
Ligation (e.g. SMARTer) ~0.95-0.98 ~0.02-0.05

RustQC’s Qualimap analysis runs in the same single-pass BAM scan as all other tools, eliminating the separate name-sort and Qualimap run required by the original Java implementation.

Large dataset (~186M reads, GM12878)
Tool Runtime Peak RSS Notes
samtools sort -n 12m 16s 5.2 GB Name-sort required by Qualimap Java (not needed by RustQC)
Qualimap rnaseq (Java) 49m 58s 4.9 GB Separate BAM pass, single-threaded, requires name-sorted input
Total upstream pipeline ~1h 2m 14s Name-sort + Qualimap combined
RustQC (all tools) 14m 54s 11.4 GB Single pass, all analyses combined, coordinate-sorted input

Counts, ratios and percentages are printed with at most two decimals and trailing zeros dropped, so a whole percentage is 60% and a ratio of exactly one half is 0.5. Counts are grouped with commas. The coverage profile files hold plain decimal numbers (0, 0.0001). Reads on a sequence with no annotated exon are left out of the counts, as in Qualimap, and reported in the HTML report as “Missing chromosome in annotation”.

Reads are selected as Qualimap selects them. Secondary, supplementary and QC-fail records are not skipped: every mapped record with an NH tag of at most 1 (or none) is counted. Proper pairs are grouped by read name, as Qualimap does with its name-sorted input. A group of exactly two records is one fragment, and Qualimap skips any other group, for example a pair plus a supplementary record.

Small dataset (~52K reads, chr6)
Tool Runtime Peak RSS Notes
Qualimap rnaseq (Java) 5.0s 704.6 MB Separate BAM pass, requires name-sorted input
RustQC (all tools) 25.9s 182.1 MB Single pass, all analyses combined

Note: RustQC runtime shown is for all tools combined in a single pass. See Benchmark Details for a full breakdown.

On the small dataset, RustQC uses 182 MB of memory vs Qualimap’s 705 MB.

RustQC produces output effectively identical to Qualimap Java. Both tools were run on the same BAM file with matching parameters (--stranded reverse / strand-specific-reverse, same GENCODE GTF). Results below are from the AWS benchmark run (2026-03-09).

Small dataset (~52K reads, chr6)
Metric Qualimap (Java) RustQC Match?
reads aligned (left) 24,797 24,797 Yes
reads aligned (right) 24,776 24,776 Yes
read pairs aligned 24,773 24,773 Yes
total alignments 52,839 52,839 Yes
secondary alignments 3,266 3,266 Yes
non-unique alignments 5,496 5,496 Yes
aligned to genes 31,654 31,654 Yes
ambiguous alignments 1,054 1,054 Yes
no feature assigned 14,635 14,635 Yes
not aligned 0 0 Yes
Metric Qualimap (Java) RustQC Match?
exonic fraction 68.38% 68.38% Yes
intronic fraction 29.57% 29.57% Yes
intergenic fraction 2.04% 2.04% Yes
Metric Qualimap (Java) RustQC Match?
5’ bias 0.71 0.71 Yes
3’ bias 0.57 0.57 Yes
5’-3’ bias 1.3 1.3 Yes

All values are identical (rnaseq_qc_results.txt matches apart from the input paths).

Large dataset (~186M reads, GM12878)
Metric Qualimap (Java) RustQC Match?
reads aligned (left) 86,909,417 86,909,417 Yes
reads aligned (right) 86,888,892 86,888,892 Yes
read pairs aligned 86,778,882 86,778,882 Yes
total alignments 189,114,475 189,114,475 Yes
secondary alignments 15,316,166 15,316,166 Yes
non-unique alignments 26,451,119 26,451,119 Yes
aligned to genes 122,500,822 122,500,822 Yes
ambiguous alignments 2,422,409 2,422,409 Yes
no feature assigned 37,740,125 37,740,125 Yes
not aligned 12,490,977 12,490,977 Yes
Metric Qualimap (Java) RustQC Match?
exonic fraction 76.45% 76.45% Yes
intronic fraction 18.37% 18.37% Yes
intergenic fraction 5.19% 5.19% Yes
overlapping exon 4.2% 4.2% Yes
Metric Qualimap (Java) RustQC Match?
5’ bias 0.87 0.87 Yes
3’ bias 0.77 0.77 Yes
5’-3’ bias 1.11 1.11 Yes
Metric Qualimap (Java) RustQC Match?
reads at junctions 56,119,719 56,119,719 Yes

Junction motif counts and percentages are identical. Motifs with the same count are listed alphabetically, which can differ from Qualimap’s order (see the note on junction motifs above).

Both tools produce an HTML report with embedded charts and summary tables. View the full reports from the large benchmark run:

Note that RustQC base64-encodes all assets within the HTML file, so it can be shared stand-alone.

Gene body coverage can be enabled or disabled in the config. See the Configuration page for details.

  • Qualimap: Garcia-Alcalde F, Okonechnikov K, Carbonell J, et al. Qualimap: evaluating next-generation sequencing alignment data. Bioinformatics. 2012;28(20):2678-2679. Qualimap website