View source: R/GeneHighlights.R
gene_highlights | R Documentation |
This function enhances a 'ggtree' plot by adding highlights for specific genes. It adds both a semi-transparent fan-shaped highlight and a point at the node corresponding to each gene. Colors for each gene can be customized.
gene_highlights(ggtree_obj, genes_to_highlight, hilight_extend = 18)
ggtree_obj |
A ggtree object to which the highlights will be added. |
genes_to_highlight |
A data frame containing genes and their corresponding colors. |
hilight_extend |
Integer, the extension of the highlight fan in degrees. |
A ggtree object with added gene highlights.
data("gtree", package = "TransProR")
# Define genes and their colors
genes_df <- data.frame(Symble = c("t5", "t9"),
color = c("#FF0000", "#0000FF"))
# Add highlights
gtree <- gene_highlights(gtree, genes_to_highlight = genes_df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.