diff --git a/R/plots.R b/R/plots.R
index f71d715..fa31d3b 100644
--- a/R/plots.R
+++ b/R/plots.R
@@ -410,6 +410,13 @@ plot_scores_by_position <- function(ranking,
by = "gene"
)
+ data <- merge(
+ data,
+ geposan::genes,
+ by.x = "gene",
+ by.y = "id"
+ )
+
data[, `:=`(gene_set = "All genes", color = base_color())]
index <- 1
@@ -432,7 +439,13 @@ plot_scores_by_position <- function(ranking,
x = ~start_position,
y = ~score,
name = ~gene_set,
- hoverinfo = "skip"
+ text = ~name,
+ hovertemplate = paste0(
+ "%{text}
",
+ "Position: %{x:.0} Bp
",
+ "Score: %{y:.3}
",
+ ""
+ )
) |>
plotly::layout(
xaxis = list(title = "Position (Bp)"),