Add annotations
This commit is contained in:
@@ -281,6 +281,7 @@ calculate_interaction_scores <- function(df, max_conc, variables, group_vars = c
|
|||||||
lm_AUC <- lm(Delta_AUC ~ conc_num_factor, data = stats)
|
lm_AUC <- lm(Delta_AUC ~ conc_num_factor, data = stats)
|
||||||
|
|
||||||
interactions <- stats %>%
|
interactions <- stats %>%
|
||||||
|
group_by(OrfRep, Gene, num) %>%
|
||||||
summarise(
|
summarise(
|
||||||
OrfRep = first(OrfRep),
|
OrfRep = first(OrfRep),
|
||||||
Gene = first(Gene),
|
Gene = first(Gene),
|
||||||
@@ -571,6 +572,13 @@ generate_scatter_plot <- function(plot, config, interactive = FALSE) {
|
|||||||
plot <- plot + scale_y_continuous(limits = config$ylim_vals)
|
plot <- plot + scale_y_continuous(limits = config$ylim_vals)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Add annotations if provided
|
||||||
|
if (!is.null(config$annotations)) {
|
||||||
|
for (annotation in config$annotations) {
|
||||||
|
plot <- plot + annotate("text", x = annotation$x, y = annotation$y, label = annotation$label)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return(plot)
|
return(plot)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user