mirror of
https://github.com/johrpan/geposanui.git
synced 2025-10-26 11:17:24 +01:00
Fix issue in rank plot
This commit is contained in:
parent
7800cc09b4
commit
529f4a553b
1 changed files with 16 additions and 9 deletions
25
rank_plot.R
25
rank_plot.R
|
|
@ -34,16 +34,23 @@ rank_plot <- function(results, reference_gene_ids, cutoff) {
|
|||
width = 10,
|
||||
type = "bar"
|
||||
) |> layout(
|
||||
shapes = list(
|
||||
type = "rect",
|
||||
fillcolor = "black",
|
||||
opacity = 0.1,
|
||||
x0 = first_not_included_rank,
|
||||
x1 = last_rank,
|
||||
y0 = 0.0,
|
||||
y1 = 1.0
|
||||
),
|
||||
xaxis = list(title = "Ranks"),
|
||||
yaxis = list(title = "Score")
|
||||
)
|
||||
|
||||
if (first_not_included_rank <= last_rank) {
|
||||
plot <- plot |> layout(
|
||||
shapes = list(
|
||||
type = "rect",
|
||||
fillcolor = "black",
|
||||
opacity = 0.1,
|
||||
x0 = first_not_included_rank,
|
||||
x1 = last_rank,
|
||||
y0 = 0.0,
|
||||
y1 = 1.0
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
plot
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue