View source: R/colocboost_output.R
get_cos_summary | R Documentation |
get_cos_summary
get the colocalization summary table with or without the outcomes of interest.
get_cos_summary(
cb_output,
outcome_names = NULL,
interest_outcome = NULL,
region_name = NULL
)
cb_output |
Output object from |
outcome_names |
Optional vector of names of outcomes, which has the same order as Y in the original analysis. |
interest_outcome |
Optional vector specifying a subset of outcomes from |
region_name |
Optional character string. When provided, adds a column with this gene name to the output table for easier filtering in downstream analyses. |
A summary table for colocalization events with the following columns:
focal_outcome |
The focal outcome being analyzed if exists. Otherwise, it is |
colocalized_outcomes |
Colocalized outcomes for colocalization confidence set (CoS) |
cos_id |
Unique identifier for colocalization confidence set (CoS) |
purity |
Minimum absolute correlation of variables with in colocalization confidence set (CoS) |
top_variable |
The variable with highest variant colocalization probability (VCP) |
top_variable_vcp |
Variant colocalization probability for the top variable |
cos_npc |
Normalized probability of colocalization |
min_npc_outcome |
Minimum normalized probability of colocalized traits |
n_variables |
Number of variables in colocalization confidence set (CoS) |
colocalized_index |
Indices of colocalized variables |
colocalized_variables |
List of colocalized variables |
colocalized_variables_vcp |
Variant colocalization probabilities for all colocalized variables |
See detailed instructions in our tutorial portal: https://statfungen.github.io/colocboost/articles/Interpret_ColocBoost_Output.html
Other colocboost_utilities:
get_cormat()
,
get_cos()
,
get_cos_purity()
,
get_hierarchical_clusters()
,
get_ucos_summary()
# colocboost example
set.seed(1)
N <- 1000
P <- 100
# Generate X with LD structure
sigma <- 0.9^abs(outer(1:P, 1:P, "-"))
X <- MASS::mvrnorm(N, rep(0, P), sigma)
colnames(X) <- paste0("SNP", 1:P)
L <- 3
true_beta <- matrix(0, P, L)
true_beta[10, 1] <- 0.5 # SNP10 affects trait 1
true_beta[10, 2] <- 0.4 # SNP10 also affects trait 2 (colocalized)
true_beta[50, 2] <- 0.3 # SNP50 only affects trait 2
true_beta[80, 3] <- 0.6 # SNP80 only affects trait 3
Y <- matrix(0, N, L)
for (l in 1:L) {
Y[, l] <- X %*% true_beta[, l] + rnorm(N, 0, 1)
}
res <- colocboost(X = X, Y = Y)
get_cos_summary(res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.