select_IV: Select instrumental variables for the MR-MtRobin analysis.

Description Usage Arguments Details Value Examples

View source: R/setup.R

Description

Selects a set of instrumental variables (IVs) based on specified criteria to be used in two-sample Mendelian Randomization analysis using MR-MtRobin.

Usage

1
2
select_IV(geneID, eqtl_data, nTiss, LD, ld_thresh = 0.5,
  pval_thresh = 0.001, nTiss_thresh = 3, back_select = TRUE)

Arguments

geneID

character string of the gene to be tested.

eqtl_data

data.frame of summary statistics from eQTL study.

nTiss

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

LD

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

ld_thresh

numeric of pairwise LD threshold (r^2) .

pval_thresh

numeric of P-value threshold for SNP-tissue pair to be used as IV.

nTiss_thresh

integer of minimum number of tissues in which a candidate IV must have P-value less than pval_thresh.

back_select

logical of whether to use backward selection (TRUE) or forward selection (FALSE) procedure in selecting set of instrumental variables.

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 pvalue_j and beta_j for j in {1,...,nTiss}, corresponding to the P-value testing the null hypothesis of no association between gene_id and variant_id and the estimated coefficient (beta) of the marginal effect of variant_id on gene_id expression in each respective eQTL analysis, respectively. Note that the names of the p-value and beta columns must match the conventions pvalue_j and beta_j for j in {1,...,nTiss} exactly.

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

Value

A character vector of the SNP/variant identifiers to be used as instrumental variables with geneID.

Examples

1
select_IV(geneID="gene1", eqtl_data=eqtl_stats_example, nTiss=10, LD=LD_example)

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