stack_genomic()
constructs a stack layout specifically for genomic
data. It is a specialized variant of stack_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.
stack_genomic(direction, data = NULL, ..., theme = NULL, sizes = NA)stack_genomicv(data = NULL, ...)
stack_genomich(data = NULL, ...)
A stack_layout
object representing the genomic layout.
A string indicating the direction of the stack layout,
either "h"
(horizontal
) or "v"
(vertical
).
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
, and
end
positions.
A genomic object convertible via fortify_data_frame()
.
Additional arguments passed to specific methods or
fortify_data_frame()
.
A theme()
object used to customize various
elements of the layout, including guides
, title
, subtitle
, caption
,
margins
, panel.border
, and background
. By default, the theme will
inherit from the parent layout
. It also controls the panel spacing for all
plots in the layout.
A numeric value or a unit
object. When used for
the quad_layout()
annotation, it must be of length 1
. When used in the
stack_layout()
with a nested quad_layout()
, it should be of length
3
, specifying the relative heights (for direction = "h"
) or widths (for
direction = "v"
) to be applied to the layout.