Skip to contents
0.16.6 documentation

Complete canonical API text; task articles explain the workflows. Tutorials

Site guide · find your task

GRanges coordinates are already one-based inclusive and are not shifted. Strand * is retained as source_strand, while the output uses strand = "." and directionality = "none". Use the returned table in geom_feature(data = ...) to preserve nondirectional intervals; geom_gene() requires directional gene input. No unknown strand is invented as +.

Usage

Code
as_ggchord_feature(x, mapping = NULL)

Arguments

x

A data frame or GRanges object.

mapping

Optional named character vector mapping output roles to source columns, as in as_ggchord_seq().

Value

An ordinary feature data frame with accver, start, end, strand, directionality, retained metadata and conversion provenance. Conflicting metadata names receive a metadata_ prefix; the attribute's column_map records the output name.

Examples

Code
library(dplyr)
data(seq_data_example)
seqs <- seq_data_example |>
  select(accver, length)
data(gene_data_example)
genes <- gene_data_example |>
  transmute(accver, start, end, strand = source_strand)
renamed <- genes |>
  rename(chrom = accver, left = start, right = end)
features <- as_ggchord_feature(renamed,
  mapping = c(accver = "chrom", start = "left", end = "right")
)
ggchord(seq_data = seqs) +
  geom_seq() +
  geom_feature(data = features)