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.
Usage
stack_genomic(direction, data = NULL, ..., theme = NULL, sizes = NA)
stack_genomicv(data = NULL, ...)
stack_genomich(data = NULL, ...)
Arguments
- direction
A string indicating the direction of the stack layout, either
"h"
(horizontal
) or"v"
(vertical
).- 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()
.- 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.- sizes
A numeric value or a
unit
object. When used for thequad_layout()
annotation, it must be of length1
. When used in thestack_layout()
with a nestedquad_layout()
, it should be of length3
, specifying the relative heights (fordirection = "h"
) or widths (fordirection = "v"
) to be applied to the layout.