diff --git a/R/fsusie_wrapper.R b/R/fsusie_wrapper.R index 28f2af3d..9a57fb04 100644 --- a/R/fsusie_wrapper.R +++ b/R/fsusie_wrapper.R @@ -112,13 +112,13 @@ fsusie_get_cs <- function(fSuSiE.obj, X, requested_coverage = 0.95) { #' @param cov_lev Coverage level for the credible sets. #' @param max_scale numeric, define the maximum of wavelet coefficients used in the analysis (2^max_scale). #' Set 10 true by default. -#' @param min.purity Minimum purity threshold for credible sets to be retained. +#' @param min_purity Minimum purity threshold for credible sets to be retained. #' @param ... Additional arguments passed to the fsusie function. #' @return A modified fsusie object with the susie sets list, correlations for cs, alpha as df like susie, #' and without the dummy cs that do not meet the minimum purity requirement. #' @export -fsusie_wrapper <- function(X, Y, pos, L, prior, max_SNP_EM, cov_lev, min.purity, max_scale, ...) { +fsusie_wrapper <- function(X, Y, pos, L, prior, max_SNP_EM, cov_lev, min_purity, max_scale, ...) { # Make sure fsusieR installed if (!requireNamespace("fsusieR", quietly = TRUE)) { stop("To use this function, please install fsusieR: https://github.com/stephenslab/fsusieR") @@ -127,11 +127,11 @@ fsusie_wrapper <- function(X, Y, pos, L, prior, max_SNP_EM, cov_lev, min.purity, fSuSiE.obj <- fsusieR::susiF( X = X, Y = Y, pos = pos, L = L, prior = prior, max_SNP_EM = max_SNP_EM, cov_lev = cov_lev, - min.purity = min.purity, max_scale = max_scale, ... + min_purity = min_purity, max_scale = max_scale, ... ) # Remove dummy cs based on purity threshold - if (all(abs(as.numeric(fSuSiE.obj$purity)) < min.purity)) { + if (all(abs(as.numeric(fSuSiE.obj$purity)) < min_purity)) { fSuSiE.obj$cs <- list(NULL) fSuSiE.obj$sets <- list(cs = list(NULL), requested_coverage = cov_lev) fSuSiE.obj$cs_corr <- NULL # Set cs correlations to NULL if no credible sets meet purity criteria diff --git a/man/fsusie_wrapper.Rd b/man/fsusie_wrapper.Rd index ab7ae724..09e9d71f 100644 --- a/man/fsusie_wrapper.Rd +++ b/man/fsusie_wrapper.Rd @@ -12,7 +12,7 @@ fsusie_wrapper( prior, max_SNP_EM, cov_lev, - min.purity, + min_purity, max_scale, ... ) @@ -32,7 +32,7 @@ fsusie_wrapper( \item{cov_lev}{Coverage level for the credible sets.} -\item{min.purity}{Minimum purity threshold for credible sets to be retained.} +\item{min_purity}{Minimum purity threshold for credible sets to be retained.} \item{max_scale}{numeric, define the maximum of wavelet coefficients used in the analysis (2^max_scale). Set 10 true by default.}