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