| Title: | Mendelian randomization accounting for complex correlated horizontal pleiotropy while elucidating shared genetic etiology |
|---|---|
| Description: | Mendelian randomization accounting for complex correlated horizontal pleiotropy while elucidating shared genetic etiology. |
| Authors: | Qing Cheng [aut, cre] (ORCID: <https://orcid.org/0000-0001-5144-4515>) |
| Maintainer: | Qing Cheng <[email protected]> |
| License: | GPL (>= 3) |
| Version: | 1.0 |
| Built: | 2026-05-15 09:33:21 UTC |
| Source: | https://github.com/remlapmot/MR.CUE |
Mendelian randomization accounting for complex correlated horizontal pleiotropy while elucidating shared genetic etiology.
The DESCRIPTION file:
| Type: | Package |
| Package: | MR.CUE |
| Title: | Mendelian randomization accounting for complex correlated horizontal pleiotropy while elucidating shared genetic etiology |
| Version: | 1.0 |
| Authors@R: | person("Qing", "Cheng", , "[email protected]", role = c("aut", "cre"), comment = c(ORCID = "0000-0001-5144-4515")) |
| Description: | Mendelian randomization accounting for complex correlated horizontal pleiotropy while elucidating shared genetic etiology. |
| License: | GPL (>= 3) |
| Imports: | Rcpp (>= 1.0.8.3), ggplot2, mvtnorm, stats, utils |
| LinkingTo: | BH, Rcpp, RcppArmadillo, RcppDist |
| Encoding: | UTF-8 |
| Repository: | https://mrcieu.r-universe.dev |
| Date/Publication: | 2026-03-16 06:57:33 UTC |
| RemoteUrl: | https://github.com/remlapmot/MR.CUE |
| RemoteRef: | suggestions |
| RemoteSha: | eafb841d9ab1437237cbe1ac20519a661a545171 |
| Author: | Qing Cheng [aut, cre] (ORCID: <https://orcid.org/0000-0001-5144-4515>) |
| Maintainer: | Qing Cheng <[email protected]> |
Index of help topics:
EstRho Estimate the Correlation Parameter Rho
EstRhofun Estimate Rho from Summary Statistic Files
genRawGeno Generate Raw Genotype Data
genSumStat Generate Summary Statistics for Simulation
MR.CUE-package Mendelian randomization accounting for complex
correlated horizontal pleiotropy while
elucidating shared genetic etiology
MRCUE Mendelian Randomization with Correlated
pleiotropy Using Empirical priors
MRCUEIndep MR-CUE for Independent Instruments
MRCUESim MR-CUE with Simple LD Block Structure
ReadSummaryStat Read and Match Summary Statistics
RemoveMHCCfun Remove MHC Region SNPs and Apply QC Filters
summaryQC Quality Control for Summary Statistics
traceplot Trace Plot of MCMC Samples
The main user-facing functions are MRCUE, MRCUEIndep,
and MRCUESim for Mendelian randomization analysis, and
ReadSummaryStat and EstRho for data preparation.
Qing Cheng [aut, cre] (ORCID: <https://orcid.org/0000-0001-5144-4515>)
Maintainer: Qing Cheng <[email protected]>
Cheng, Q. et al. (2022) Mendelian randomization accounting for complex correlated horizontal pleiotropy while elucidating shared genetic etiology. Nature Communications 13, 6490.
Estimates the correlation parameter rho between exposure and outcome using matched summary statistics and LD clumping.
EstRho(fileexp, fileout, filepan, snpinfo, ld_r2_thresh, lambad, pth)EstRho(fileexp, fileout, filepan, snpinfo, ld_r2_thresh, lambad, pth)
fileexp |
Path to exposure summary statistics file. |
fileout |
Path to outcome summary statistics file. |
filepan |
Path to reference panel file. |
snpinfo |
Path to SNP info file. |
ld_r2_thresh |
LD r-squared threshold for clumping. |
lambad |
Regularisation parameter for LD matrix estimation. |
pth |
P-value threshold for instrument selection. |
Estimated rho value.
Estimates the correlation parameter rho between exposure and outcome from summary statistic files with LD clumping.
EstRhofun(fileexposure, fileoutcome, stringname3, ld_r2_thresh, lam, pth, block_file)EstRhofun(fileexposure, fileoutcome, stringname3, ld_r2_thresh, lam, pth, block_file)
fileexposure |
Path to exposure summary statistics file. |
fileoutcome |
Path to outcome summary statistics file. |
stringname3 |
Path to reference panel file prefix. |
ld_r2_thresh |
LD r-squared threshold for clumping. |
lam |
Regularisation parameter for LD matrix estimation. |
pth |
P-value threshold for instrument selection. |
block_file |
Path to the LD block definition file. |
Estimated rho value.
Simulates raw genotype data with a specified LD structure for use in simulation studies.
genRawGeno(maf, L, M, rho, n)genRawGeno(maf, L, M, rho, n)
maf |
Numeric vector of minor allele frequencies. |
L |
Number of LD blocks. |
M |
Number of SNPs per block. |
rho |
Correlation parameter controlling LD decay within blocks. |
n |
Sample size. |
A matrix of simulated genotypes (n rows, L*M columns).
Simulates GWAS summary statistics with pleiotropy and genetic effects for use in simulation studies.
genSumStat(x12, n1, n2, M, L, b1, rho_ag, Alrate, h2a, h2t, h2g)genSumStat(x12, n1, n2, M, L, b1, rho_ag, Alrate, h2a, h2t, h2g)
x12 |
Simulated genotype matrix from |
n1 |
Sample size for exposure. |
n2 |
Sample size for outcome. |
M |
Number of SNPs per block. |
L |
Number of LD blocks. |
b1 |
True causal effect. |
rho_ag |
Correlation between pleiotropic effects. |
Alrate |
Proportion of pleiotropic SNPs. |
h2a |
Heritability of pleiotropic effects. |
h2t |
Heritability of total effects. |
h2g |
Heritability explained by genetic instruments. |
A list of simulated summary statistics.
Performs MR-CUE analysis using LD block structure for correlated horizontal pleiotropy modelling.
MRCUE(F4gammah, F4Gammah, F4se1, F4se2, F4Rblock, rho, coreNum, opts = NULL)MRCUE(F4gammah, F4Gammah, F4se1, F4se2, F4Rblock, rho, coreNum, opts = NULL)
F4gammah |
Numeric vector of SNP effects on exposure. |
F4Gammah |
Numeric vector of SNP effects on outcome. |
F4se1 |
Numeric vector of standard errors for exposure effects. |
F4se2 |
Numeric vector of standard errors for outcome effects. |
F4Rblock |
List of LD correlation matrices by block. |
rho |
Estimated correlation parameter. |
coreNum |
Number of CPU cores to use. |
opts |
Optional list of algorithm parameters. |
A list of posterior samples and summary statistics.
Cheng, Q. et al. (2022) Nature Communications 13, 6490.
Performs MR-CUE analysis assuming independent instruments (no LD).
MRCUEIndep(gammah, Gammah, se1, se2, rho, opts = NULL)MRCUEIndep(gammah, Gammah, se1, se2, rho, opts = NULL)
gammah |
Numeric vector of SNP effects on exposure. |
Gammah |
Numeric vector of SNP effects on outcome. |
se1 |
Numeric vector of standard errors for exposure effects. |
se2 |
Numeric vector of standard errors for outcome effects. |
rho |
Estimated correlation parameter. |
opts |
Optional list of algorithm parameters. |
A list of posterior samples and summary statistics.
Cheng, Q. et al. (2022) Nature Communications 13, 6490.
Performs MR-CUE analysis with a simplified LD block representation.
MRCUESim(gammah, Gammah, se1, se2, rho, R, block_inf, coreNum, opts = NULL)MRCUESim(gammah, Gammah, se1, se2, rho, R, block_inf, coreNum, opts = NULL)
gammah |
Numeric vector of SNP effects on exposure. |
Gammah |
Numeric vector of SNP effects on outcome. |
se1 |
Numeric vector of standard errors for exposure effects. |
se2 |
Numeric vector of standard errors for outcome effects. |
rho |
Estimated correlation parameter. |
R |
LD correlation matrix. |
block_inf |
Block information matrix. |
coreNum |
Number of CPU cores to use. |
opts |
Optional list of algorithm parameters. |
A list of posterior samples and summary statistics.
Cheng, Q. et al. (2022) Nature Communications 13, 6490.
Reads exposure and outcome GWAS summary statistics, matches SNPs, and integrates a reference panel for LD calculation.
ReadSummaryStat(fileexp, fileout, filepan, snpinfo, pva_cutoff, lambad)ReadSummaryStat(fileexp, fileout, filepan, snpinfo, pva_cutoff, lambad)
fileexp |
Path to exposure summary statistics file. |
fileout |
Path to outcome summary statistics file. |
filepan |
Path to reference panel file (plink binary format). |
snpinfo |
Path to SNP info file. |
pva_cutoff |
P-value cutoff for instrument selection. |
lambad |
Regularisation parameter for LD matrix estimation. |
A list of matched summary statistics and LD block information.
Removes SNPs in the MHC region (chromosome 6) and applies chi-squared bounds for quality control.
RemoveMHCCfun(mhcstart, mhcend, bh1, bh2, s12, s22, bp, chr, rsname, xbound, ybound)RemoveMHCCfun(mhcstart, mhcend, bh1, bh2, s12, s22, bp, chr, rsname, xbound, ybound)
mhcstart |
Start position of MHC region (bp). |
mhcend |
End position of MHC region (bp). |
bh1 |
Numeric vector of exposure effect estimates. |
bh2 |
Numeric vector of outcome effect estimates. |
s12 |
Numeric vector of exposure standard errors squared. |
s22 |
Numeric vector of outcome standard errors squared. |
bp |
Numeric vector of SNP base pair positions. |
chr |
Numeric vector of chromosome numbers. |
rsname |
Character vector of SNP identifiers. |
xbound |
Chi-squared upper bound for exposure QC. |
ybound |
Chi-squared upper bound for outcome QC. |
A list of filtered summary statistics.
Filters SNPs in the MHC region and applies chi-squared bounds for quality control of GWAS summary statistics.
summaryQC(mhcstart, mhcend, bh1, bh2, s12, s22, bp, chr, rsname, avbIndex, idx4panel, xbound, ybound)summaryQC(mhcstart, mhcend, bh1, bh2, s12, s22, bp, chr, rsname, avbIndex, idx4panel, xbound, ybound)
mhcstart |
Start position of MHC region (bp). |
mhcend |
End position of MHC region (bp). |
bh1 |
Numeric vector of exposure effect estimates. |
bh2 |
Numeric vector of outcome effect estimates. |
s12 |
Numeric vector of exposure standard errors squared. |
s22 |
Numeric vector of outcome standard errors squared. |
bp |
Numeric vector of SNP base pair positions. |
chr |
Numeric vector of chromosome numbers. |
rsname |
Character vector of SNP identifiers. |
avbIndex |
Index of available SNPs. |
idx4panel |
Index of SNPs in the reference panel. |
xbound |
Chi-squared upper bound for exposure QC. |
ybound |
Chi-squared upper bound for outcome QC. |
A list of QC-filtered summary statistics.
Creates a trace plot of the posterior samples for the causal effect estimate from an MR-CUE analysis.
traceplot(bhatpoint)traceplot(bhatpoint)
bhatpoint |
Numeric vector of posterior samples for the causal effect. |
A ggplot2 object.