Renders read alignments from an indexed BAM file as chevron polygons (pointing right for + strand reads, left for −). Mate pairs are optionally connected by a thin horizontal line. Reads are loaded once at construction time and cached on the element; only the requested windows are pulled.
Arguments
- bam
Character. Path to an indexed BAM file.
- region
GRangesof windows to load. Every window must be ≤max_widthbp.- min_mapq
Integer. Minimum mapping quality. Default
0.- max_reads
Integer. Maximum total reads to load (qname-aware downsampling preserves mate pairs). Default
20000.- max_width
Integer. Maximum allowed window width in bp. Default
100000. Prevents accidental loading of entire chromosomes.- sort_by
Character. Row-packing sort order:
"insert_length"(default — longest inserts at the top) or"start"(leftmost reads at the top).- link_mates
Logical. Draw a horizontal line connecting each mated pair's outer extent. Default
TRUE.- show_strand
Logical. Draw chevron arrowheads indicating strand. Default
TRUE.- aesthetics
Named list. Supported keys:
fill_plus,fill_minus,fill_unstranded,col,lwd,row_gap,tip_mm,tip_min_body_mm,link_col,link_lwd,link_lty.