circle_genomic()
constructs a circular layout specifically for genomic
data. It is a specialized variant of circle_continuous()
that applies
default axis limits and coerces the first column of each plot's data to use
chromosome (seqname
) identifiers-matching those in the layout data-as
factor levels.
Usage
circle_genomic(
data,
...,
radial = NULL,
direction = "outward",
sector_spacing = NULL,
theme = NULL
)
Arguments
- data
The input data, which can be:
A
character
string ("hg19" or "hg38") to load a predefined cytoband reference.A
data.frame
with at least three columns:chromosome
,start
, andend
positions.A genomic object convertible via
fortify_data_frame()
.
- ...
Additional arguments passed to specific methods or
fortify_data_frame()
.- radial
A
coord_circle()
/coord_radial()
object that defines the global parameters for coordinate across all plots in the layout. The parametersstart
,end
,direction
, andexpand
will be inherited and applied uniformly to all plots within the layout. The parameterstheta
andr.axis.inside
will always be ignored and will be set to"x"
andTRUE
, respectively, for all plots.- direction
A single string of
"inward"
or"outward"
, indicating the direction in which the plot is added.outward
: The plot is added from the inner to the outer.inward
: The plot is added from the outer to the inner.
- sector_spacing
The size of spacing between different panel. A numeric of the radians or a
rel()
object.- theme
A
theme()
object used to customize various elements of the layout, includingguides
,title
,subtitle
,caption
,margins
,panel.border
, andbackground
. By default, the theme will inherit from the parentlayout
. It also controls the panel spacing for all plots in the layout.