Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions R/colocboost.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
#' @param jk_equiv_corr The LD cutoff between overall best update jk-star and marginal best update jk-l for lth outcome
#' @param jk_equiv_loglik The change of loglikelihood cutoff between overall best update jk-star and marginal best update jk-l for lth outcome
#' @param coloc_thresh The cutoff of checking if the best update jk-star is the potential causal variable for outcome l if jk-l is not similar to jk-star (used in Delayed SEC).
#' @param lambda The ratio [0,1] for z^2 and z in fun_prior simplex, defult is 0.5
#' @param lambda The ratio \[0,1\] for z^2 and z in fun_prior simplex, defult is 0.5
#' @param lambda_target_outcome The ratio for z^2 and z in fun_prior simplex for the target outcome, default is 1
#' @param func_simplex The data-driven local association simplex \eqn{\delta} for smoothing the weights. Default is "LD_z2z" is the elastic net for z-score and also weighted by LD.
#' @param func_multi_test The alternative method to check the stop criteria. When \code{func_multi_test = "lfdr"}, boosting iterations will be stopped
Expand Down Expand Up @@ -98,10 +98,7 @@
#'
#' @importFrom stats na.omit
#' @export
#'
#' @examples
#' colocboost(X=X, Y=Y)
#'

colocboost <- function(X = NULL, Y = NULL, # individual data
sumstat = NULL, LD = NULL, # summary statistics: either Z, bhat, sebhat, N, var_Y,
###### - index dict for X match multiple Y / LD match multiple sumstat
Expand Down
10 changes: 0 additions & 10 deletions R/colocboost_output.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@
#' \item{colocalized_variables}{List of colocalized variables}
#' \item{colocalized_variables_vcp}{Variant colocalization probabilities for all colocalized variables}
#'
#' @examples
#' get_cos_summary(cb_output)
#' get_cos_summary(cb_output, interest_outcome = c("Y1", "Y2"))
#'
#' @keywords cb_get_functions
#' @export
get_cos_summary <- function(cb_output,
Expand Down Expand Up @@ -124,9 +120,6 @@ get_cos_summary <- function(cb_output,
#' \item{data_info}{A object with detailed information from input data}
#' \item{model_info}{A object with detailed information for colocboost model}
#'
#' @examples
#' get_strong_colocalization(cb_output, cos_npc_cutoff = 0.5, npc_outcome_cutoff = 0.25)
#'
#' @keywords cb_get_functions
#' @export
get_strong_colocalization <- function(cb_output,
Expand Down Expand Up @@ -359,9 +352,6 @@ get_strong_colocalization <- function(cb_output,
#' \item{ucos_variables}{List of fine-mapped variables}
#' \item{ucos_variables_pip}{Posterior inclusion probability (PIP) for all fine-mapped variables}
#'
#' @examples
#' get_ucos_summary(cb_output)
#'
#' @keywords cb_get_functions
#' @noRd
get_ucos_summary <- function(cb_output, outcome_names = NULL, gene_name = NULL){
Expand Down
3 changes: 0 additions & 3 deletions R/colocboost_plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@
#' @importFrom graphics abline axis legend mtext par points text
#' @importFrom grDevices adjustcolor
#'
#' @examples
#' colocboost_plot(cb_output)
#'
#' @keywords cb_plot
#' @export
colocboost_plot <- function(cb_output, y = "log10p",
Expand Down
2 changes: 0 additions & 2 deletions R/colocboost_utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -472,5 +472,3 @@ get_merge_ordered_with_indices <- function(vector_list) {

result
}


27 changes: 27 additions & 0 deletions R/data.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#' Individual level data for 5 traits
#'
#' An example dataset with simulated genotypes and outcomes for 5 traits
#'
#' @format ## `Ind_5traits`
#' A list with 3 elements
#' \describe{
#' \item{X}{List of genotype matrices}
#' \item{Y}{List of outcomes}
#' \item{TrueCausalVariants}{List of causal variants}
#' }
#' @source FINISH
"Ind_5traits"

#' Summary level data for 5 traits
#'
#' An example dataset with simulated statistics and LD for 5 traits
#'
#' @format ## `Sumstat_5traits`
#' A list with 3 elements
#' \describe{
#' \item{sumstat}{Summary statistics for 5 traits}
#' \item{LD}{Matrix of LD between variants}
#' \item{TrueCausalVariants}{List of causal variants}
#' }
#' @source FINISH
"Sumstat_5traits"
27 changes: 27 additions & 0 deletions man/Ind_5traits.Rd

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

27 changes: 27 additions & 0 deletions man/Sumstat_5traits.Rd

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

6 changes: 1 addition & 5 deletions man/colocboost.Rd

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

4 changes: 0 additions & 4 deletions man/colocboost_plot.Rd

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

5 changes: 0 additions & 5 deletions man/get_cos_summary.Rd

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

4 changes: 0 additions & 4 deletions man/get_strong_colocalization.Rd

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

2 changes: 1 addition & 1 deletion tests/testthat.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
library(testthat)
library(colocboost)

test_check("colocboost")
test_check("colocboost")
176 changes: 0 additions & 176 deletions tests/testthat/test_package.R

This file was deleted.

2 changes: 1 addition & 1 deletion tests/testthat/test_utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -181,4 +181,4 @@ test_that("get_merge_ordered_with_indices merges vectors", {
vector_list2 <- list(vec1, vec1, vec2, vec3)
result2 <- get_merge_ordered_with_indices(vector_list2)
expect_equal(result2, c("a", "b", "c", "d", "e"))
})
})