Description Usage Arguments Details Value Examples
Selects a set of instrumental variables (IVs) based on specified criteria to be used in
two-sample Mendelian Randomization analysis using MR-MtRobin. After restricting the
candidate SNPs to those with P-value less than pval_thresh
in at least
nTiss_thresh
tissues, the function iteratively
removes one SNP/variant from the pair with the largest pairwise LD r^2 until all
pairwise LD r^2 among remaining SNPs is less than ld_thresh
. The variant
selected to be removed is based on the ranked criteria 1) greatest number
of pairwise LD r^2 > ld_thresh
with other remaining SNPs;
2) fewest number of tissues with P-value less than pval_thresh
; and
3) largest minimum P-value of association with expression of geneID
.
1 2 | select_IV_bs(geneID, eqtl_data, nTiss, LD, ld_thresh = 0.5,
pval_thresh = 0.001, nTiss_thresh = 3)
|
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 |
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).
A character vector of the SNP/variant identifiers to be used as instrumental variables with geneID
.
1 | select_IV_bs(geneID="gene1", eqtl_data=eqtl_stats_example, nTiss=10, LD=LD_example)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.