From 7cdaa0a6def9e8d92d18c82609015b9e10791c2d Mon Sep 17 00:00:00 2001 From: leaffur Date: Thu, 26 Jun 2025 00:54:29 -0400 Subject: [PATCH 1/2] Increment version number to 0.3.0 --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 3bce74c..a479035 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: CASE Title: Cell-type-specific And Shared EQTL fine-mapping -Version: 0.2.3 +Version: 0.3.0 Authors@R: c( person("Chen", "Lin", , "c.lin@yale.edu", role = c("aut", "cre"), comment = c(ORCID = "0000-0001-9821-2578")), From 9780f5344903dead43d0f68755405acb63458248 Mon Sep 17 00:00:00 2001 From: leaffur Date: Thu, 26 Jun 2025 00:55:05 -0400 Subject: [PATCH 2/2] update verbose --- R/CASE.R | 2 +- man/CASE.Rd | 16 ++++++++++++++-- man/CASE_test.Rd | 13 ++++++++++++- man/CASE_train.Rd | 13 ++++++++++++- man/get_credible_sets.Rd | 3 +++ vignettes/Introduction_to_CASE.Rmd | 2 ++ 6 files changed, 44 insertions(+), 5 deletions(-) diff --git a/R/CASE.R b/R/CASE.R index af25781..6cb96e2 100644 --- a/R/CASE.R +++ b/R/CASE.R @@ -88,7 +88,7 @@ CASE <- function(Z = NULL, R, hatB = NULL, hatS = NULL, N, V = NULL, cs = TRUE, t2 = Sys.time() res$time = difftime(t2, t1, units = "secs") if (cs){ - res$sets <- get_credible_sets(res$pip, R = R, verbose = verbose) + res$sets <- get_credible_sets(res$pip, R = R, verbose = verbose) } return(res) diff --git a/man/CASE.Rd b/man/CASE.Rd index f84fa0c..d795f38 100644 --- a/man/CASE.Rd +++ b/man/CASE.Rd @@ -4,7 +4,17 @@ \alias{CASE} \title{CASE} \usage{ -CASE(Z = NULL, R, hatB = NULL, hatS = NULL, N, V = NULL, cs = TRUE, ...) +CASE( + Z = NULL, + R, + hatB = NULL, + hatS = NULL, + N, + V = NULL, + cs = TRUE, + verbose = TRUE, + ... +) } \arguments{ \item{Z}{M * C matrix of z scores.} @@ -19,7 +29,9 @@ CASE(Z = NULL, R, hatB = NULL, hatS = NULL, N, V = NULL, cs = TRUE, ...) \item{V}{(optional) C * C covariance (correlation) matrix for the noise between traits. If not provided, the default is an identity matrix representing no correlations of the error.} -\item{cs}{logical, whether to get credible sets.} +\item{cs}{(optional) logical, whether to get credible sets. Default = TRUE.} + +\item{verbose}{(optional) logical, whether to print logging information. Default = TRUE.} \item{...}{additional arguments.} } diff --git a/man/CASE_test.Rd b/man/CASE_test.Rd index ef9b816..9107e73 100644 --- a/man/CASE_test.Rd +++ b/man/CASE_test.Rd @@ -4,7 +4,16 @@ \alias{CASE_test} \title{CASE Model Testing} \usage{ -CASE_test(Z = NULL, R, hatB = NULL, hatS = NULL, N, CASE_training, ...) +CASE_test( + Z = NULL, + R, + hatB = NULL, + hatS = NULL, + N, + CASE_training, + verbose = TRUE, + ... +) } \arguments{ \item{Z}{M * C matrix of z scores.} @@ -19,6 +28,8 @@ CASE_test(Z = NULL, R, hatB = NULL, hatS = NULL, N, CASE_training, ...) \item{CASE_training}{A \code{"CASE_training"} object.} +\item{verbose}{(optional) logical, whether to print logging information. Default = TRUE.} + \item{...}{additional arguments.} } \value{ diff --git a/man/CASE_train.Rd b/man/CASE_train.Rd index 318726d..9814ad3 100644 --- a/man/CASE_train.Rd +++ b/man/CASE_train.Rd @@ -4,7 +4,16 @@ \alias{CASE_train} \title{CASE Model Training} \usage{ -CASE_train(Z = NULL, R, hatB = NULL, hatS = NULL, N, V = NULL, ...) +CASE_train( + Z = NULL, + R, + hatB = NULL, + hatS = NULL, + N, + V = NULL, + verbose = TRUE, + ... +) } \arguments{ \item{Z}{M * C matrix of z scores.} @@ -19,6 +28,8 @@ CASE_train(Z = NULL, R, hatB = NULL, hatS = NULL, N, V = NULL, ...) \item{V}{(optional) C * C covariance (correlation) matrix for the noise between traits. If not provided, the default is an identity matrix.} +\item{verbose}{(optional) logical, whether to print logging information. Default = TRUE.} + \item{...}{additional arguments.} } \value{ diff --git a/man/get_credible_sets.Rd b/man/get_credible_sets.Rd index 985b433..611c54c 100644 --- a/man/get_credible_sets.Rd +++ b/man/get_credible_sets.Rd @@ -7,6 +7,7 @@ get_credible_sets( pips, R, + verbose = TRUE, cor.min = 0.5, coverage_thres = 0.95, ruled_out = 1e-04 @@ -17,6 +18,8 @@ get_credible_sets( \item{R}{M * M matrix of LD.} +\item{verbose}{(optional) logical, whether to print logging information. Default = TRUE.} + \item{cor.min}{minimum correlation in the credible sets} \item{coverage_thres}{threshold for the sum of PIPs.} diff --git a/vignettes/Introduction_to_CASE.Rmd b/vignettes/Introduction_to_CASE.Rmd index d33cff8..a7ea260 100644 --- a/vignettes/Introduction_to_CASE.Rmd +++ b/vignettes/Introduction_to_CASE.Rmd @@ -27,6 +27,8 @@ set.seed(1000) ## The example data +The example genotype was generated by R package `CorBin`. + ```{r} data("example_data") attach(example_data)