The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.
The cophescan package implements Coloc adapted Phenome-wide Scan (CoPheScan), a Bayesian method to perform Phenome-wide association studies (PheWAS) that identifies causal associations between genetic variants and phenotypes while simultaneously accounting for confounding due to linkage disequilibrium.
See the description vignette for background and references: Introduction to CoPheScan
Install cophescan from CRAN
install.packages("cophescan")
Install the developmental version from GitHub
if(!require("remotes"))
install.packages("remotes") # if necessary
::install_github("ichcha-m/cophescan") remotes
For a detailed walkthrough of cophescan browse through the vignettes in https://ichcha-m.github.io/cophescan/.
Vignette articles:
3. An example for running CoPheScan with fixed priors
4. An example for running CoPheScan with hierarchical priors
library(cophescan)
## Load the simulated summary stats data of 24 traits
data("cophe_multi_trait_data")
names(cophe_multi_trait_data)
<- cophe_multi_trait_data$summ_stat[['Trait_1']]
query_trait_1 <- cophe_multi_trait_data$querysnpid
querysnpid print(querysnpid)
$position <- sapply(query_trait_1$snp, function(x) as.numeric(unlist(strsplit(x, "-"))[2]))
query_trait_1plot_trait_manhat(query_trait_1, querysnpid)
# Run cophescan under a single causal variant assumption by providing the snpid of the query variant (querysnpid) for the query trait.
<- cophe.single(query_trait_1, querysnpid = querysnpid, querytrait='Trait_1')
res.single summary(res.single)
# Run cophescan with susie (multiple variants) by providing the snpid of the query variant (querysnpid) for the query trait
$LD <- cophe_multi_trait_data$LD
query_trait_1<- cophe.susie(query_trait_1, querysnpid = querysnpid, querytrait='Trait_1')
res.susie summary(res.susie)
<- cophe.multitrait(cophe_multi_trait_data$summ_stat, querysnpid = querysnpid, querytrait.names = names(cophe_multi_trait_data$summ_stat), method = 'single') res.multi
<- cophe_plot(res.multi, traits.dat = cophe_multi_trait_data$summ_stat, querysnpid = querysnpid)
cophe.plots.res
::ggarrange(cophe.plots.res$pval, cophe.plots.res$ppHa, cophe.plots.res$ppHc, nrow=1)
ggpubr
# cophe.plots.hmp <- cophe_heatmap(res.multi, traits.dat = cophe_multi_trait_data$summ_stat, querysnpid = querysnpid, color=colorRampPalette(rev(RColorBrewer::brewer.pal(n = 9, name ="Greens")))(100))
<- run_metrop_priors(res.multi, posterior=TRUE, avg_posterior=TRUE, pik=TRUE)
cophe.hier.res <- cophe.hier.res$ll
ll <- cophe.hier.res$parameters
params
### store user parameters
= par(no.readonly = TRUE)
old_par
## Plot mcmc diagnostics
par(mfrow=c(2,2))
plot(1:length(ll), ll, main="loglik",type="l", col="orange")
plot(1:ncol(params), params[1,], main="alpha",type="l", col="orange")
plot(1:ncol(params), params[2,], main="beta",type="l", col="orange")
### reset user parameters
par(old_par)
= cbind(cophe.hier.res$avg.posterior, cophe.hier.res$data)
res.post.prob <- cophe.hyp.predict(as.data.frame(res.post.prob ))
res.hier.predict tail(res.hier.predict, row.names = F)
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.