Skip to content

Commit

Permalink
Merge pull request #1044 from jiajic/suite_dev
Browse files Browse the repository at this point in the history
updates for jackstraw
  • Loading branch information
jiajic authored Oct 7, 2024
2 parents f74c3c2 + 7d2e60a commit 681a0d8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
10 changes: 8 additions & 2 deletions R/dimension_reduction.R
Original file line number Diff line number Diff line change
Expand Up @@ -1672,7 +1672,8 @@ create_screeplot <- function(eigs, ncp = 20, ylim = c(0, 20)) {
#' @param set_seed logical. whether to set a seed when random_subset is used
#' @param seed_number seed number to use when random_subset is used
#' @param verbose show progress of jackstraw method
#' @returns ggplot object for jackstraw method
#' @returns if `return_plot` = `TRUE`: ggplot object for jackstraw method
#' if `return_plot` = `FALSE`: silently returns number of significant PCs
#' @details
#' The Jackstraw method uses the \code{\link[jackstraw]{permutationPA}}
#' function. By systematically permuting genes it identifies robust, and thus
Expand Down Expand Up @@ -1799,6 +1800,11 @@ jackstrawPlot <- function(gobject,
"\nnumber of estimated significant components: ",
nr_sign_components)

warning(wrap_txt(
"Number of significant components equals `ncp`.
Increasing `ncp` may be needed."
))

final_results <- jtest[c("p", "cum_var_explained")]
vmsg(.v = verbose, .is_debug = TRUE, final_results$p)

Expand All @@ -1819,7 +1825,7 @@ jackstrawPlot <- function(gobject,
show_plot = show_plot,
default_save_name = default_save_name,
save_param = save_param,
else_return = NULL
else_return = nr_sign_components
))
}

Expand Down
9 changes: 5 additions & 4 deletions man/jackstrawPlot.Rd

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

0 comments on commit 681a0d8

Please sign in to comment.