Package: cophescan 1.4.1

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 (2023) <doi:10.1101/2023.06.29.546856>.

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

cophescan_1.4.1.tar.gz
cophescan_1.4.1.tar.gz(r-4.5-noble)cophescan_1.4.1.tar.gz(r-4.4-noble)
cophescan_1.4.1.tgz(r-4.4-emscripten)cophescan_1.4.1.tgz(r-4.3-emscripten)
cophescan.pdf |cophescan.html
cophescan/json (API)
NEWS

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

Peer review:

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

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

3.98 score 1 stars 24 scripts 566 downloads 45 exports 46 dependencies

Last updated 6 months agofrom:27ba87448d. Checks:OK: 1 NOTE: 1. Indexed: no.

TargetResultDate
Doc / VignettesOKNov 09 2024
R-4.5-linux-x86_64NOTENov 09 2024

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:clicoloccolorspacecrayondata.tabledplyrfansifarvergenericsggplot2ggrepelgluegridExtragtableirlbaisobandlabelinglatticelifecyclemagrittrMASSMatrixmatrixStatsmgcvmixsqpmunsellnlmepheatmappillarpkgconfigplyrR6RColorBrewerRcppRcppArmadilloreshaperlangscalessusieRtibbletidyselectutf8vctrsviridisviridisLitewithr

CoPheScan: Example with Fixed Priors

Rendered fromFixedPriors_03.Rmdusingknitr::rmarkdownon Nov 09 2024.

Last update: 2024-03-12
Started: 2023-10-25

CoPheScan: Example with Hierarchical Priors

Rendered fromHierarchicalPriors_04.Rmdusingknitr::rmarkdownon Nov 09 2024.

Last update: 2024-03-12
Started: 2023-10-25

CoPheScan: Input data

Rendered fromInputData_02.Rmdusingknitr::rmarkdownon Nov 09 2024.

Last update: 2023-10-25
Started: 2023-10-25

Introduction to CoPheScan

Rendered fromIntroductionCoPheScan_01.Rmdusingknitr::rmarkdownon Nov 09 2024.

Last update: 2023-10-25
Started: 2023-10-25

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