Skip to content

Commit

Permalink
rewrite examples to use simulated data
Browse files Browse the repository at this point in the history
  • Loading branch information
wolski committed May 22, 2024
1 parent 5815f46 commit 0db6a4c
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 34 deletions.
24 changes: 7 additions & 17 deletions R/AnalysisConfiguration.R
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,7 @@ setup_analysis <- function(data, configuration, cc = TRUE, from_factors = FALSE
#' @examples
#'
#'
#' bb <- prolfqua_data('data_ionstar')$filtered()
#' bb$config <- old2new(bb$config)
#' bb <- sim_lfq_data_protein_config()
#' dt <- separate_hierarchy(bb$data, bb$config)
#' base::setdiff(colnames(dt) ,colnames(bb$data))
#' stopifnot(ncol(dt) >= ncol(bb$data))
Expand All @@ -244,8 +243,7 @@ separate_hierarchy <- function(data, config){
#' @keywords internal
#' @family configuration
#' @examples
#' bb <- prolfqua_data('data_ionstar')$filtered()
#' bb$config <- old2new(bb$config)
#' bb <- sim_lfq_data_protein_config()
#' dt <- separate_factors(bb$data, bb$config)
#' base::setdiff(colnames(dt), colnames(bb$data))
#' stopifnot(ncol(bb$data) < ncol(dt))
Expand All @@ -270,15 +268,10 @@ separate_factors <- function(data, config) {
#' @family configuration
#' @examples
#'
#' bb <- prolfqua_data('data_ionstar')$filtered()
#' bb$config <- old2new(bb$config)
#' bb <- sim_lfq_data_protein_config()
#'
#' stopifnot(nrow(bb$data) == 25780)
#' config <- bb$config$clone(deep=TRUE)
#' data <- bb$data
#'
#' xx <- complete_cases(data, config)
#' stopifnot(nrow(data) <= nrow(xx))
#' xx <- complete_cases(bb$data, bb$config)
#' stopifnot(nrow(bb$data) <= nrow(xx))
#'
complete_cases <- function(pdata, config) {
message("completing cases")
Expand Down Expand Up @@ -462,12 +455,9 @@ hierarchy_counts_sample <- function(
#'
#'
#'
#' bb <- prolfqua_data('data_ionstar')$filtered()
#' bb$config <- old2new(bb$config)
#' stopifnot(nrow(bb$data) == 25780)
#' configur <- bb$config$clone(deep=TRUE)
#' bb <- sim_lfq_data_peptide_config()
#' data <- bb$data
#'
#' configur <- bb$config
#' summarize_hierarchy(data, configur)
#' summarize_hierarchy(data, configur, factors = character())
#'
Expand Down
11 changes: 3 additions & 8 deletions man/complete_cases.Rd

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

3 changes: 1 addition & 2 deletions man/separate_factors.Rd

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

3 changes: 1 addition & 2 deletions man/separate_hierarchy.Rd

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

7 changes: 2 additions & 5 deletions man/summarize_hierarchy.Rd

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

0 comments on commit 0db6a4c

Please sign in to comment.