Complete canonical API text; task articles explain the workflows. Tutorials
Site guide · find your task
Setup and learning paths
HomeInstall and prepare the environmentChoose your learning moduleModule I · Chord
1.1 Tables and field meanings1.2 Produce and import comparisons1.3 Build the layers step by step1.4 Direction, curvature and clearance1.5 Filter and summarize links1.6 Full source-file workflow1.7 Complete chord showcaseModule II · Collinear
2.1 Reuse chord input tables2.2 Switch coordinates and add layers2.3 Routes, clearance and the ruler2.4 Compare CDS neighbourhoods2.5 Focus, anchors and segments2.6 Complete collinear showcaseModule III · Plasmid
3.1 DNA, annotations and 13 references3.2 From a circle to annotation layers3.3 Features, primers and restriction3.4 Thirteen plasmid references3.5 Complete plasmid casesConsult as needed · Data and layers
Prepare tables and coordinatesImport and convert dataImport nucleotide and protein alignmentsProject protein intervals to genomic coordinatesFeatures, stacking and genomic decorationLabels and local placementQuantitative tracksMappings, scales, guides and themesSet values by sequence and strandCommon adjustments and grammarExport, preview and diagnosticsLearning map and reference
Articles and complete workflowsFunction referenceReproducible galleryFrequently asked questionsMigrate to the candidate APITerminology and design sourcesDevelopment status and changes
Stack overlapping genes or features on local lanes
Source:R/position-feature-stack.R
position_feature_stack.RdAssigns overlapping intervals on the same sequence and side to radial lanes.
Explicit display priority is ordered first, then intervals by decreasing
length. Every interval takes the nearest collision-free lane; feature type,
name and colour never choose a lane.
The resulting anchors are shared with gene label layers because stacking is
solved before polygons and labels are generated.
In coord_collinear(), these local lanes become parallel horizontal bands;
they do not represent circular physical tracks or radii.
Usage
Code
position_feature_stack(
spacing = 0.1,
side = c("strand", "outside", "inside"),
base_position = NULL
)Arguments
- spacing
Positive minimum radial distance between adjacent feature lanes. Circular plasmid layout enlarges the first transition into a main label corridor and reserves at least one label track between deeper overlapping feature lanes.
- side
Legacy track-side selector retained for compatibility when
base_positionisNULL. Its historical names retain their existing geometry.- base_position
Optional identity, strand, or plasmid Position applied before interval-overlap detection and lane allocation.
Value
A ggplot2 Position object for geom_gene() or geom_feature().