MRlap | R Documentation |
Performs cross-trait LD score regression, IVW-MR analysis and provide a correction that simultaneously accounts for biases due to the overlap between the exposure and outcome samples, the use of weak instruments and Winner’s curse.
MRlap(
exposure,
exposure_name = NULL,
outcome,
outcome_name = NULL,
ld,
hm3,
do_pruning = TRUE,
user_SNPsToKeep = "",
MR_threshold = 5e-08,
MR_pruning_dist = 500,
MR_pruning_LD = 0,
MR_reverse = 0.001,
MR_plink = NULL,
MR_bfile = NULL,
save_logfiles = FALSE,
verbose = TRUE
)
exposure |
The path to the file containing the GWAS summary statistics for the exposure,
or a |
exposure_name |
The name of the exposure trait, |
outcome |
The path to the file containing the GWAS summary statistics for the exposure,
or a |
outcome_name |
The name of the outcome trait, |
ld |
The path to the folder in which the LD scores used in the analysis are located. Expects LD scores formated as required by the original LD score regression software. (character) |
hm3 |
The path to a file of SNPs with alt, ref alleles and rsid used to allign alleles across traits (character) |
do_pruning |
A logical indicating MRlap should identify lead SNPs via pruning (if FALSE, the user should
provide with user_SNPsToKeep, and all the MR_[...] parameters will be ignored),
|
user_SNPsToKeep |
A vector of SNP RSIDs to use as the instrumental variables (only used if do_pruning==FALSE),
|
MR_threshold |
The threshold used to select strong instruments for MR, should be lower
than 1e-5, |
MR_pruning_dist |
The distance used for pruning MR instruments (in Kb), should be between 10 and 50000,
|
MR_pruning_LD |
The LD threshold (r2) used for pruning MR instruments, should be between 0 and 1
(if 0, distance-based pruning is used), |
MR_reverse |
The p-value used to exclude MR instruments that are more strongly associated with the outcome
than with the exposure, |
MR_plink |
The path to to Plink v1.90 binary (if left as NULL will not use local installation if LD pruning),
|
MR_bfile |
The path to appropriate BIM/BED reference panel files on your server,
|
save_logfiles |
A logical indicating if log files from LDSC should be saved,
|
verbose |
A logical indicating if information on progress should be reported,
|
exposure
and outcome
are required arguments.
The input file / data.frame should contain the following
columns (lower or upper case) :
SNPID (rs numbers) should be : rs
, rsid
, snp
, snpid
, rnpid
CHR (chromosome) should be : chr
POS (position) should be : pos
ALT (effect allele) should be : a1
, alt
, alts
REF (reference allele) should be : a2
, a0
, ref
Z (z-score) should be : Z
, zscore
N (sample size) should be : N
If Z is not present, it can be calculated from BETA and SE.
BETA should be : b
, beta
, beta1
, or
SE should be : se
, std
If (at least) one of the datasets is coming from a case-control GWAS:*
The Sample size column should correspond to the total sample size.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.