From a59315d089f0542afef281821fca24161a5931dd Mon Sep 17 00:00:00 2001 From: Witold Wolski Date: Mon, 22 Jan 2024 21:13:12 +0100 Subject: [PATCH] fix doc --- R/tidyMS_aggregation.R | 19 ++++++++----------- R/tidyMS_missigness.R | 6 +++--- man/missigness_histogram.Rd | 6 +++--- man/plot_estimate.Rd | 19 ++++++++----------- 4 files changed, 22 insertions(+), 28 deletions(-) diff --git a/R/tidyMS_aggregation.R b/R/tidyMS_aggregation.R index a08bb40d9..ee135ad0f 100644 --- a/R/tidyMS_aggregation.R +++ b/R/tidyMS_aggregation.R @@ -637,23 +637,20 @@ estimate_intensity <- function(data, config, .func) #' @export #' @examples #' -#' dd <- prolfqua_data('data_ionstar')$filtered() -#' -#' config <- old2new(dd$config) -#' data <- dd$data +#' istar <- sim_lfq_data_peptide_config() +#' config <- istar$config +#' analysis <- istar$data #' -#' data <- prolfqua::transform_work_intensity(data, config, log2) -#' bbMed <- estimate_intensity(data, config, .func = medpolish_estimate_dfconfig) -#' tmpMed <- plot_estimate(data, config, bbMed$data, bbMed$config) +#' analysis <- prolfqua::transform_work_intensity(analysis, config, log2) +#' bbMed <- estimate_intensity(analysis, config, .func = medpolish_estimate_dfconfig) +#' tmpMed <- plot_estimate(analysis, config, bbMed$data, bbMed$config) #' stopifnot("ggplot" %in% class(tmpMed$plots[[1]])) #' stopifnot("ggplot" %in% class(tmpMed$plots[[2]])) -#' tmpMed$plots[[3]] #' -#' bbRob <- estimate_intensity(data, config, .func = rlm_estimate_dfconfig) -#' tmpRob <- plot_estimate(data, config, bbRob$data, bbRob$config) +#' bbRob <- estimate_intensity(analysis, config, .func = rlm_estimate_dfconfig) +#' tmpRob <- plot_estimate(analysis, config, bbRob$data, bbRob$config) #' stopifnot("ggplot" %in% class(tmpRob$plots[[1]])) #' stopifnot("ggplot" %in% class(tmpRob$plots[[2]])) -#' tmpRob$plots[[3]] #' #' plot_estimate <- function(data, config, data_aggr, config_reduced, show.legend= FALSE ){ diff --git a/R/tidyMS_missigness.R b/R/tidyMS_missigness.R index 76aa9e4dc..820256b65 100644 --- a/R/tidyMS_missigness.R +++ b/R/tidyMS_missigness.R @@ -474,12 +474,12 @@ get_imputed_contrasts <- function(pepIntensity, #' istar <- sim_lfq_data_peptide_config() #' config <- istar$config #' analysis <- istar$data -#' xx <- complete_cases(data, config) +#' xx <- complete_cases(analysis, config) #' pl <- missigness_histogram(xx, config) #' -#' pl <- missigness_histogram(data, config, showempty=FALSE) +#' pl <- missigness_histogram(analysis, config, showempty=FALSE) #' stopifnot("ggplot" %in% class(pl)) -#' pl <- missigness_histogram(data, config, showempty=TRUE) +#' pl <- missigness_histogram(analysis, config, showempty=TRUE) #' stopifnot("ggplot" %in% class(pl)) #' missigness_histogram <- function(x, diff --git a/man/missigness_histogram.Rd b/man/missigness_histogram.Rd index 790d6f051..e2595d09a 100644 --- a/man/missigness_histogram.Rd +++ b/man/missigness_histogram.Rd @@ -20,12 +20,12 @@ Histogram summarizing missigness istar <- sim_lfq_data_peptide_config() config <- istar$config analysis <- istar$data -xx <- complete_cases(data, config) +xx <- complete_cases(analysis, config) pl <- missigness_histogram(xx, config) -pl <- missigness_histogram(data, config, showempty=FALSE) +pl <- missigness_histogram(analysis, config, showempty=FALSE) stopifnot("ggplot" \%in\% class(pl)) -pl <- missigness_histogram(data, config, showempty=TRUE) +pl <- missigness_histogram(analysis, config, showempty=TRUE) stopifnot("ggplot" \%in\% class(pl)) } diff --git a/man/plot_estimate.Rd b/man/plot_estimate.Rd index 5f8fb4153..08c89b9e4 100644 --- a/man/plot_estimate.Rd +++ b/man/plot_estimate.Rd @@ -20,23 +20,20 @@ Plot feature data and result of aggregation } \examples{ -dd <- prolfqua_data('data_ionstar')$filtered() +istar <- sim_lfq_data_peptide_config() +config <- istar$config +analysis <- istar$data -config <- old2new(dd$config) -data <- dd$data - -data <- prolfqua::transform_work_intensity(data, config, log2) -bbMed <- estimate_intensity(data, config, .func = medpolish_estimate_dfconfig) -tmpMed <- plot_estimate(data, config, bbMed$data, bbMed$config) +analysis <- prolfqua::transform_work_intensity(analysis, config, log2) +bbMed <- estimate_intensity(analysis, config, .func = medpolish_estimate_dfconfig) +tmpMed <- plot_estimate(analysis, config, bbMed$data, bbMed$config) stopifnot("ggplot" \%in\% class(tmpMed$plots[[1]])) stopifnot("ggplot" \%in\% class(tmpMed$plots[[2]])) -tmpMed$plots[[3]] -bbRob <- estimate_intensity(data, config, .func = rlm_estimate_dfconfig) -tmpRob <- plot_estimate(data, config, bbRob$data, bbRob$config) +bbRob <- estimate_intensity(analysis, config, .func = rlm_estimate_dfconfig) +tmpRob <- plot_estimate(analysis, config, bbRob$data, bbRob$config) stopifnot("ggplot" \%in\% class(tmpRob$plots[[1]])) stopifnot("ggplot" \%in\% class(tmpRob$plots[[2]])) -tmpRob$plots[[3]] }