View source: R/geom_subgene_arrow.R
| geom_subgene_arrow | R Documentation |
geom_subgene_arrow() draws subgenes segments within gene arrows drawn with
geom_gene_arrow().
geom_subgene_arrow(
mapping = NULL,
data = NULL,
stat = "identity",
position = "identity",
na.rm = FALSE,
show.legend = NA,
inherit.aes = TRUE,
arrowhead_width = grid::unit(4, "mm"),
arrowhead_height = grid::unit(4, "mm"),
arrow_body_height = grid::unit(3, "mm"),
...
)
mapping, data, stat, position, na.rm, show.legend, inherit.aes, ... |
As standard for 'ggplot2'. |
arrowhead_width |
|
arrowhead_height |
|
arrow_body_height |
|
The start and end locations of the subgene are given with the xsubmin and
xsubmax aesthetics. geom_subgene_arrow() requires some information about
the 'parent' gene, provided with the same aesthetics used for
geom_gene_arrow(): start and end locations of the 'parent' gene with the
xmin and xmax aesthetics, the molecule with the y aesthetic, and
optionally the direction with the forward aesthetic. If the geometry of
the parent gene has been changed with arrowhead_width, arrowhead_height
or arrow_body_height, identical parameters should be given to
geom_subgene_arrow().
xmin,xmax (start and end of the gene; will be used to determine gene orientation)
xsubmin,xsubmax (start and end of subgene segment). Should be consistent
with xmin/xmax
y (molecule)
forward (if FALSE, or coercible to FALSE, the gene arrow will be drawn in
the opposite direction to that determined by xmin and xmax)
alpha
colour
fill
linetype
linewidth (the former size aesthetic has been deprecated and will be removed in future versions)
geom_gene_arrow(), geom_subgene_label()
ggplot2::ggplot(example_genes, ggplot2::aes(xmin = start, xmax = end,
y = molecule)) +
geom_gene_arrow() +
geom_subgene_arrow(data = example_subgenes,
ggplot2::aes(xmin = start, xmax = end, xsubmin = from, xsubmax = to,
y = molecule, fill = gene)) +
ggplot2::facet_wrap(~ molecule, scales = "free")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.