Skip to content

Commit

Permalink
move to simulated data in ContrastPlotter
Browse files Browse the repository at this point in the history
  • Loading branch information
wolski committed Jan 22, 2024
1 parent 2cebc11 commit ee10513
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 22 deletions.
19 changes: 8 additions & 11 deletions R/ContrastsPlotter.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@
#' @family plotting
#' @examples
#'
#' istar <- prolfqua_data('data_ionstar')$normalized()
#' istar$config <- old2new(istar$config )
#' istar_data <- dplyr::filter(istar$data ,protein_Id %in% sample(protein_Id, 100))
#' istar <- sim_lfq_data_peptide_config()
#' modelName <- "Model"
#' head(istar$data)
#' modelFunction <-
#' strategy_lmer("transformedIntensity ~ dilution. + (1 | peptide_Id)",
#' strategy_lmer("abundance ~ group_ + (1 | peptide_Id)",
#' model_name = modelName)
#' pepIntensity <- istar_data
#' pepIntensity <- istar$data
#' config <- istar$config
#' config$table$hierarchy_keys_depth()
#' mod <- build_model(
Expand All @@ -23,10 +22,8 @@
#'
#' #mod$get_coefficients()
#'
#' Contr <- c("dil.b_vs_a" = "dilution.b - dilution.a",
#' "dil.e_vs_a" = "dilution.e - dilution.a"
#' ,"dil.e_vs_b" = "dilution.e - dilution.b",
#' "dil.c_vs_b" = "dilution.c - dilution.b"
#' Contr <- c("group_A_vs_Ctrl" = "group_A - group_Ctrl",
#' "group_B_vs_Ctrl" = "group_B - group_Ctrl"
#' )
#' contrast <- prolfqua::Contrasts$new(mod,
#' Contr)
Expand All @@ -44,15 +41,14 @@
#' volcano = list(list(score = "FDR", thresh = 0.1)),
#' histogram = list(list(score = "p.value", xlim = c(0,1,0.05)),
#' list(score = "FDR", xlim = c(0,1,0.05))),
#' fcthresh = NULL,
#' fcthresh = c(-1,1),
#' score =list(list(score = "statistic", thresh = 5)))
#' cp$fcthresh
#' cp$volcano_plotly()
#' p <- cp$score_plot(legend=FALSE)
#' cp$score_plotly()
#' p <- cp$histogram()
#' p <- cp$histogram_estimate()
#'
#' res <- cp$volcano()
#' respltly <- cp$volcano_plotly()
#'
Expand All @@ -62,6 +58,7 @@
#' names(res)
#' cp$histogram_diff()
#' cp$volcano()
#'
ContrastsPlotter <- R6::R6Class(
"ContrastsPlotter",
public = list(
Expand Down
19 changes: 8 additions & 11 deletions man/ContrastsPlotter.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ee10513

Please sign in to comment.