From 53c862696590a3fb6b0fe5cf0c15974fb5265da5 Mon Sep 17 00:00:00 2001 From: hsun3163 <54919134+hsun3163@users.noreply.github.com> Date: Fri, 11 Apr 2025 12:02:02 -0400 Subject: [PATCH 1/3] update interface of fsusie wrapper and the susiF function to reflect the newest run --- R/fsusie_wrapper.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/R/fsusie_wrapper.R b/R/fsusie_wrapper.R index 28f2af3d..7e44bd59 100644 --- a/R/fsusie_wrapper.R +++ b/R/fsusie_wrapper.R @@ -118,7 +118,7 @@ fsusie_get_cs <- function(fSuSiE.obj, X, requested_coverage = 0.95) { #' 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 From 83ee5244f6d8a038eb3f3db41295a63787a8c01c Mon Sep 17 00:00:00 2001 From: hsun3163 <54919134+hsun3163@users.noreply.github.com> Date: Fri, 11 Apr 2025 12:03:06 -0400 Subject: [PATCH 2/3] Update fsusie_wrapper --- R/fsusie_wrapper.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/fsusie_wrapper.R b/R/fsusie_wrapper.R index 7e44bd59..9a57fb04 100644 --- a/R/fsusie_wrapper.R +++ b/R/fsusie_wrapper.R @@ -112,7 +112,7 @@ 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. From 57dd913a8414b218e1c3e8e8a7c33626e1d92016 Mon Sep 17 00:00:00 2001 From: hsun3163 <54919134+hsun3163@users.noreply.github.com> Date: Fri, 11 Apr 2025 13:05:56 -0400 Subject: [PATCH 3/3] update the documentation of the new fsusie interface --- man/fsusie_wrapper.Rd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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.}