Chapters and reference
Complete canonical API text; task articles explain the workflows. Usage guide

Draw HSP alignment segments
Source:R/geom-alignment-segment.R
geom_alignment_segment.RdProjects each standard ribbon-data row from (qstart, sstart) to
(qend, send) in coord_dotplot(). All four endpoints are retained;
reverse alignments must have normalized descending endpoints, as returned
by read_paf(). Explicit unknown direction or strand values are omitted
with a warning and recorded in the layout connection report.
This is an HSP-level view, not a reconstruction of mismatches or gaps.
Usage
R · Example code
geom_alignment_segment(
mapping = NULL,
data = NULL,
colour = "#59636D",
alpha = 0.6,
linewidth = 0.4,
linetype = 1,
position = "identity",
show.legend = NA,
inherit.aes = FALSE,
allow_repeated = FALSE,
...
)Arguments
- mapping, data
Standard ggplot2 mapping and layer data. Data defaults to the constructor's
ribbon_data. Geometry roles areqaccver,saccver,qstart,qend,sstart, andsend.- colour, alpha, linewidth, linetype
Fixed styles. Mapped styles use
link_colour,link_alpha,link_linewidthandlink_linetype, with the corresponding scale_link functions. Explicit fixed styles win.- position
Only
"identity"is supported: data adjustment would change the alignment endpoints.- show.legend, inherit.aes
Standard ggplot2 layer arguments.
- allow_repeated
Allow explicitly identified
source_hsp_idrecords to be displayed more than once. All participating layers must opt in. Rows without declared IDs are never deduplicated by their values.- ...
Additional arguments passed to ggplot2's segment geometry.
Examples
R · Example code
data(seq_data_example)
data(ribbon_data_example)
ggchord(seq_data_example, ribbon_data_example) +
geom_alignment_segment(aes(link_colour = pident)) +
coord_dotplot()