mirror of
https://github.com/johrpan/geposan.git
synced 2025-10-26 10:47:25 +01:00
plots: Add more information to scores plot hover
This commit is contained in:
parent
a02f22c218
commit
2e27fbb95c
1 changed files with 9 additions and 1 deletions
10
R/plots.R
10
R/plots.R
|
|
@ -193,8 +193,16 @@ plot_scores <- function(ranking, gene_sets = NULL, max_rank = NULL) {
|
||||||
data = gene_set_data[gene %chin% gene_set],
|
data = gene_set_data[gene %chin% gene_set],
|
||||||
x = ~percentile,
|
x = ~percentile,
|
||||||
y = ~score,
|
y = ~score,
|
||||||
text = ~name,
|
|
||||||
color = gene_set_name,
|
color = gene_set_name,
|
||||||
|
text = ~name,
|
||||||
|
customdata = ~rank,
|
||||||
|
hovertemplate = paste0(
|
||||||
|
"<b>%{text}</b><br>",
|
||||||
|
"Score: %{y:.3}<br>",
|
||||||
|
"Rank: %{customdata}<br>",
|
||||||
|
"Percentile: %{x:.2%}",
|
||||||
|
"<extra></extra>"
|
||||||
|
),
|
||||||
marker = list(size = 20, opacity = 0.66)
|
marker = list(size = 20, opacity = 0.66)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue