Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
wolski committed Apr 5, 2024
1 parent e0145fa commit 6ca2903
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 9 deletions.
13 changes: 9 additions & 4 deletions R/LFQDataSummariser.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#' sum$hierarchy_counts_sample("wide")
#' sum$hierarchy_counts_sample("long")
#' sum$plot_hierarchy_counts_sample()
#' sum$plot_hierarchy_counts_sample()
#' tmp <- sum$interaction_missing_stats()
#'
#' sum$missingness_per_group()
Expand Down Expand Up @@ -44,16 +45,20 @@ LFQDataSummariser <- R6::R6Class(
#' @description
#' number of elements at each level in every sample
#' @param value wide - wide format, long - long format, plot - ggplot
hierarchy_counts_sample = function(value=c("wide","long")){
#' @param nr_children get summary for 1,2 or more number of children
hierarchy_counts_sample = function(value=c("wide","long"), nr_children = 1){
value <- match.arg(value)
fun <- prolfqua::hierarchy_counts_sample(self$lfq$data, self$lfq$config)
fun <- prolfqua::hierarchy_counts_sample(self$lfq$data, self$lfq$config,
nr_children = nr_children)
return(fun(value))
},
#' @description
#' barplot showing number of elements at each level in every sample
#' @param value wide - wide format, long - long format, plot - ggplot
plot_hierarchy_counts_sample = function(){
fun <- prolfqua::hierarchy_counts_sample(self$lfq$data, self$lfq$config)
#' @param nr_children get summary for 1,2 or more number of children
plot_hierarchy_counts_sample = function(nr_children = 1){
fun <- prolfqua::hierarchy_counts_sample(self$lfq$data, self$lfq$config,
nr_children = nr_children)
return(fun("plot"))
},
#' @description
Expand Down
2 changes: 1 addition & 1 deletion R/tidyMS_R6_TransitionCorrelations.R
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ tidy_to_wide <- function(data,
#' testthat::expect_equal(nrow(res$rowdata), nrow(res$data))
#' testthat::expect_equal(ncol(res$data) - ncol(res$rowdata) , nrow(res$annotation))
#' res <- tidy_to_wide_config(data, config, as.matrix = TRUE)
#' stopifnot(all(dim(res$data) == c(28, 12))
#' stopifnot(all(dim(res$data) == c(28, 12)))
#' stopifnot(all(dim(res$annotation) == c(12, 4)))
#' stopifnot(all(dim(res$rowdata) == c(28, 3)))
#'
Expand Down
12 changes: 10 additions & 2 deletions man/LFQDataSummariser.Rd

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

2 changes: 1 addition & 1 deletion man/tidy_to_wide_config.Rd

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

2 changes: 1 addition & 1 deletion vignettes/SimulateData.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ peptideAbundances <- prolfqua::sim_lfq_data(PEPTIDE = TRUE)
library(prolfqua)
atable <- AnalysisTableAnnotation$new()
atable$sampleName = "sample"
atable$fileName = "sample"
atable$factors["group_"] = "group"
atable$hierarchy[["protein_Id"]] = "proteinID"
atable$hierarchy[["peptide_Id"]] = "peptideID"
Expand Down

0 comments on commit 6ca2903

Please sign in to comment.