Fix issue in rank plot

This commit is contained in:
Elias Projahn 2021-10-15 18:33:21 +02:00
parent 7800cc09b4
commit 529f4a553b

View file

@ -34,6 +34,12 @@ rank_plot <- function(results, reference_gene_ids, cutoff) {
width = 10, width = 10,
type = "bar" type = "bar"
) |> layout( ) |> layout(
xaxis = list(title = "Ranks"),
yaxis = list(title = "Score")
)
if (first_not_included_rank <= last_rank) {
plot <- plot |> layout(
shapes = list( shapes = list(
type = "rect", type = "rect",
fillcolor = "black", fillcolor = "black",
@ -42,8 +48,9 @@ rank_plot <- function(results, reference_gene_ids, cutoff) {
x1 = last_rank, x1 = last_rank,
y0 = 0.0, y0 = 0.0,
y1 = 1.0 y1 = 1.0
), )
xaxis = list(title = "Ranks"),
yaxis = list(title = "Score")
) )
} }
plot
}