[e25014]: / man / highlight_genes.Rd

Download this file

38 lines (31 with data), 1.4 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/HighlightGenes.R
\name{highlight_genes}
\alias{highlight_genes}
\title{Add Highlights for Genes on a Phylogenetic Tree}
\usage{
highlight_genes(ggtree_obj, genes_to_highlight, hilight_extend = 18)
}
\arguments{
\item{ggtree_obj}{A ggtree object representing the phylogenetic tree.}
\item{genes_to_highlight}{A data frame containing gene names and corresponding colors to highlight.}
\item{hilight_extend}{Numeric value indicating the extension length for highlights.}
}
\value{
A `ggtree` object with added highlights for specified genes.
}
\description{
This function adds highlights for specified genes on a phylogenetic tree object.
}
\examples{
plot_file <- system.file("extdata", "tree_plot.rds", package = "TransProR")
p2_plot <- readRDS(plot_file)
selected_genes_deseq2_file <- system.file("extdata",
"selected_genes_deseq2.rds",
package = "TransProR")
selected_genes_deseq2 <- readRDS(selected_genes_deseq2_file)
Diff_deseq2_file <- system.file("extdata", "Diff_deseq2.rds", package = "TransProR")
Diff_deseq2 <- readRDS(Diff_deseq2_file)
result_deseq2 <- gene_color(selected_genes_deseq2, Diff_deseq2, "#0000EE", "#fc4746")
add_gene_highlights_p3 <- highlight_genes(p2_plot, result_deseq2, hilight_extend = 26)
}