MR_MtRobin_setup: Set up data for MR-MtRobin algorithm.

Description Usage Arguments Details Value Examples

View source: R/setup.R

Description

Sets up data to run the main MR-MtRobin algorithm: a Multi-Tissue transcriptome-wide Mendelian Randomization method ROBust to INvalid instrumental variables.

Usage

1
MR_MtRobin_setup(geneID, snpID, eqtl_data, gwas_data, LD, nTiss)

Arguments

geneID

character string of the gene to be tested.

snpID

vector of variant identifiers be used as instruments for geneID.

eqtl_data

data.frame of summary statistics from eQTL study.

gwas_data

data.frame of summary statistics from GWAS study.

LD

matrix of LD correlation coefficients (r, not r^2).

nTiss

integer of the number of tissues analyzed by the eQTL study.

Details

The following are additional details describing the input arguments.

The data.frame eqtl_data should have the character variables gene_id and variant_id (as identifiers), as well as the variables beta_j, SE_j and pvalue_j for j in {1,...,nTiss}, corresponding to the coefficient, standard error, and p-value estimates from each respective eQTL analysis.

The data.frame gwas_data should have the character variable variant_id, as well as the variables beta and SE corresponding to the coefficient and standard error estimates from the GWAS analysis.

Note that the matrix LD should hold correlation coefficients (i.e. r), not their squared values (r^2).

Value

A list with the following elements:

snpID vector of variant identifiers to be used as instrumental variables.
gwas_betas vector of coefficient estimates (betas) from GWAS study.
gwas_se vector of standard errors for coefficient estimates from GWAS study.
eqtl_betas matrix of coefficient estimates (betas) from eQTL study.
eqtl_se matrix of standard errors for coefficient estimates from eQTL study.
eqtl_pvals matrix of p-values from eQTL study.
LD matrix of LD correlation coefficients (r, not r^2).

The returned list elements can be passed to the main MR_MtRobin function.

Examples

1
2
3
MR_MtRobin_input <-
MR_MtRobin_setup(geneID="gene1",snpID=IV_gene1,eqtl_data=eqtl_stats_example,
gwas_data=gwas_stats_example,LD=LD_example,nTiss=10)

kjgleason/Mr.MtRobin documentation built on Sept. 6, 2021, 5:13 p.m.