diff --git a/R/simulationreport.R b/R/simulationreport.R index 3200568615d7ae2e116249152ba31f9004c6c36f..b15cb24f8a3f1f8157e202c53c2da5843cb2f8f2 100644 --- a/R/simulationreport.R +++ b/R/simulationreport.R @@ -68,15 +68,15 @@ getGrobTable <- function(df){ #' #' @param mock_obj A list containing simulation data and ground truth. #' @param list_tmb A list of model results. -#' @param dds_obj a DESeq2 object #' @param coeff_threshold A threshold for comparing estimates. #' @param alt_hypothesis The alternative hypothesis for comparisons ("greater", "less", "greaterAbs"). #' @param report_file File name to save the generated report. If NULL, the report will not be exported. +#' @param dds_obj a DESeq2 object #' @importFrom ggplot2 aes geom_point geom_abline facet_wrap theme_bw ggtitle #' @return A list containing settings, plots, and evaluation results. #' @export -simulationReport <- function(mock_obj, list_tmb = NULL, dds_obj = NULL , - coeff_threshold = 0, alt_hypothesis = "greaterAbs", report_file = NULL){ +simulationReport <- function(mock_obj, list_tmb = NULL, + coeff_threshold = 0, alt_hypothesis = "greaterAbs", report_file = NULL, dds_obj = NULL ){ #-- init TMB_comparison_df <- data.frame() @@ -111,12 +111,13 @@ simulationReport <- function(mock_obj, list_tmb = NULL, dds_obj = NULL , comparison_df <- rbind( DESEQ_comparison_df, TMB_comparison_df ) - color2use <- c("#D2B4DE", "#A2D9CE") - color2use <- color2use[c(!is.null(list_tmb), !is.null(dds_obj))] + #color2use <- c("#D2B4DE", "#A2D9CE") + color2use <- c("#500472", "#79cbb8") + color2use <- color2use[c(!is.null(dds_obj), !is.null(list_tmb))] # -- plotting roc_curve <- roc_plot(comparison_df, col = "from" ) + ggplot2::scale_color_manual(values = color2use) - id_plot <- identity_plot(comparison_df, col = "from") + ggplot2::scale_color_manual(values = color2use) + id_plot <- identity_plot(comparison_df, col = "from", pch = "from") + ggplot2::scale_color_manual(values = color2use) #metrics_plot <- metrics_plot(list_tmb) evalDisp <- evaluateDispersion(TMB_dispersion_df, DESEQ_dispersion_df, color2use ) dispersion_plot <- evalDisp$disp_plot