Package: cophescan 1.4.3

Ichcha Manipur

cophescan: Adaptation of the Coloc Method for PheWAS

A Bayesian method for Phenome-wide association studies (PheWAS) that identifies causal associations between genetic variants and traits, while simultaneously addressing confounding due to linkage disequilibrium. For details see Manipur et al (2024, Nature Communications) <doi:10.1038/s41467-024-49990-8>.

Authors:Ichcha Manipur [aut, cre], Chris Wallace [aut]

cophescan_1.4.3.tar.gz
cophescan_1.4.3.zip(r-4.7-x86_64)cophescan_1.4.3.zip(r-4.7-arm64)cophescan_1.4.3.zip(r-4.6-x86_64)cophescan_1.4.3.zip(r-4.6-arm64)cophescan_1.4.3.zip(r-4.5-x86_64)
cophescan_1.4.3.tgz(r-4.6-x86_64)cophescan_1.4.3.tgz(r-4.6-arm64)cophescan_1.4.3.tgz(r-4.5-x86_64)cophescan_1.4.3.tgz(r-4.5-arm64)
cophescan_1.4.3.tar.gz(r-4.7-arm64)cophescan_1.4.3.tar.gz(r-4.7-x86_64)cophescan_1.4.3.tar.gz(r-4.6-arm64)cophescan_1.4.3.tar.gz(r-4.6-x86_64)
cophescan_1.4.3.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
cophescan/json (API)

# Install 'cophescan' in R:
install.packages('cophescan', repos = c('https://ichcha-m.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/ichcha-m/cophescan/issues

Pkgdown/docs site:https://ichcha-m.github.io

Uses libs:
  • c++– GNU Standard C++ Library v3
  • openmp– GCC OpenMP (GOMP) support library
Datasets:

On CRAN:

Conda:

cppopenmp

6.17 score 9 stars 41 scripts 503 downloads 45 exports 42 dependencies

Last updated from:c079a9f1ca. Checks:13 NOTE, 2 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64NOTE141
linux-devel-x86_64NOTE193
source / vignettesOK462
linux-release-arm64NOTE134
linux-release-x86_64NOTE177
macos-release-arm64NOTE239
macos-release-x86_64NOTE389
macos-oldrel-arm64NOTE236
macos-oldrel-x86_64NOTE449
windows-devel-arm64NOTE374
windows-devel-x86_64NOTE218
windows-release-arm64NOTE381
windows-release-x86_64NOTE165
windows-oldrel-x86_64NOTE125
wasm-releaseOK120

Exports:adjust_priorsaverage_piksaverage_piks_listaverage_posterior_probaverage_posterior_prob_listcombine.bfcophe_heatmapcophe_plotcophe.bf_bfcophe.hyp.predictcophe.multitraitcophe.prepare.dat.singlecophe.prepare.dat.susiecophe.singlecophe.single.lbfcophe.susiecophe.susie.lbfget_betaget_posterior_probHc.cutoff.fdrhypothesis.priorslogd_alphalogd_betalogd_gammalogliklogpostlogpriorslogsumlogsumexpmetrop_runmultitrait.simplifypars_initpars2pikper.snp.priorspiksplot_trait_manhatposterior_probprepare_plot_dataproposerun_metrop_priorssample_alphasample_betasample_gammasummary.cophetarget

Dependencies:clicoloccpp11crayondata.tabledplyrfarvergenericsggplot2ggrepelgluegridExtragtableirlbaisobandlabelinglatticelifecyclemagrittrMatrixmatrixStatsmixsqppheatmappillarpkgconfigplyrR6RColorBrewerRcppRcppArmadilloreshaperlangS7scalessusieRtibbletidyselectutf8vctrsviridisviridisLitewithr

CoPheScan: Example with Fixed Priors
Load test data

Last update: 2026-03-23
Started: 2023-07-06

CoPheScan: Example with Hierarchical Priors
Multi-trait analysis | Run hierarchical model for priors | Diagnostics of the hierarchical model | Prediction | Visualisation

Last update: 2026-03-23
Started: 2023-07-06

CoPheScan: Input data

Last update: 2026-03-18
Started: 2023-07-06

Introduction to CoPheScan
CoPheScan | CoPheScan approaches | Further reading

Last update: 2026-03-18
Started: 2023-07-06

Readme and manuals

Help Manual

Help pageTopics
The 'cophescan' package.cophescan-package cophescan
adjust_priorsadjust_priors
Average of priors: pnk, pak and pckaverage_piks
Average of priors: pnk, pak and pck from list (memory intensive)average_piks_list
Average of posterior probabilities: Hn, Ha and Hcaverage_posterior_prob
Average of posterior probabilities: Hn, Ha and Hc from list (memory intensive)average_posterior_prob_list
combine.bfcombine.bf
Heatmap of multi-trait cophescan resultscophe_heatmap
Simulated multi-trait datacophe_multi_trait_data
cophe_plots showing the Ha and Hc of all traits and labelled above the specified thresholdcophe_plot
Predict cophescan hypothesis for tested associationscophe.hyp.predict
Run cophescan on multiple traits at oncecophe.multitrait
Bayesian cophescan analysis using Approximate Bayes Factorscophe.single
cophe.single.lbfcophe.single.lbf
run 'cophe.susie' using susie to detect separate signalscophe.susie
cophe.susie.lbfcophe.susie.lbf
Extract beta and p-values of queried variantget_beta
Calculation of the posterior prob of Hn, Ha and Hcget_posterior_prob
Estimate the Hc.cutoff for the required FDRHc.cutoff.fdr
hypothesis.priorshypothesis.priors
dnorm for alphalogd_alpha
dgamma for betalogd_beta
dgamma for gammalogd_gamma
Log likelihood calculationloglik
Log posterior calculationlogpost
Calculate log priorslogpriors
logsumlogsum
Log sumlogsumexp
Run the hierarchical mcmc model to infer priorsmetrop_run
Simplifying the output obtained from 'cophe.multitrait', 'cophe.single' or 'cophe.susie'multitrait.simplify
Initiate parameters alpha, beta and gammapars_init
Conversion of parameters alpha, beta and gamma to pnk, pak and pckpars2pik
per.snp.priorsper.snp.priors
List of priors: pn, pa and pc over all iterationspiks
Plot region Manhattan for a trait highlighting the queried variantplot_trait_manhat
List of posterior probabilities: Hn, Ha and Hc over all iterationsposterior_prob
Prepare data for plottingprepare_plot_data
Proposal distributionpropose
Run the hierarchical Metropolis Hastings model to infer priorsrun_metrop_priors
sample alphasample_alpha
sample betasample_beta
sample gammasample_gamma
print the summary of results from cophescan single or susiesummary.cophe
Target distributiontarget