A thin, backwards-compatible convenience layer for CDS, tRNA, rRNA, repeat,
CRISPR, promoter or user-defined features. It prepares a gene-compatible
table from a type / category / label specification and
reuses the proven geom_gene() geometry and scales.
Usage
geom_feature(
data,
type = "type",
category = NULL,
label = "label",
feature_colors = NULL,
feature_width = NULL,
feature_offset = NULL,
feature_order = NULL,
show_legend = TRUE,
legend_position = "right",
...
)Arguments
- data
data.frame with
seq_id,start,endandstrand; optionaltype,categoryandlabel.- type
Column name used as the feature type, default
"type".- category
Optional column name used for colour grouping; defaults to
type.- label
Optional column name used for annotation text; defaults to
labelwhen present, otherwisetype.- feature_colors
Optional named color vector by feature value; unnamed vectors are recycled positionally.
- feature_width
Optional numeric or named vector controlling feature width; passed to
geom_gene(gene_width = ...).- feature_offset
Optional numeric or named vector controlling feature offset; passed to
geom_gene(gene_offset = ...).- feature_order
Optional feature order for the legend.
- show_legend
Logical. Show the feature legend, default TRUE.
- legend_position
Position of the feature legend:
"left","right","top","bottom"or"inside".- ...
Additional arguments passed to
geom_gene().
