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

Description Usage Arguments Details Value

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. The function iteratively selects the SNP/variant with the smallest minimum P-value of association with expression of geneID and having pairwise LD r^2 less than ld_thresh with each SNP already selected. Stops selections when no candidate SNPs have P-value less than pval_thresh in at least nTiss_thresh tissues.

Usage

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

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.

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. the convention pvalue_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.


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