Description Usage Arguments Details Value Author(s) References Examples

Glide is a function to perform global and individual tests for assessing direct effects in Mendelian randomization studies.

1 2 |

`formula` |
An object of class "formula": outcome ~ adjusting covariates, specifying the logistic regression of a binary study outcome with respect to covariates being adjusted for in addition to genotype data. |

`exposure_coeff` |
A named numeric vector or a one-column dataframe for the external regression coefficients for genotype-exposure associations. These coefficients are typically derived from previous genome-wide association studies. All the names or rownames must be found in "genotype_columns" (specified below) columns of the input data. |

`genotype_columns` |
An integer vector that contains column indices of data columns in which genotype data are stored. |

`data` |
A data frame composed of formula-related variables and SNP genotype columns. |

`np` |
An integer for the number of observations in the parametric simulation being generated to compute expected p-values and q-values. |

`qcutoff` |
The q-value cutoff to declare significance of the direct effects of individual variants. The default value is set to be 0.2. |

`parallel` |
If TRUE, use parallel foreach to speed up computation. |

`corenumber` |
An integer to set the number of computer cores used in parallel computation. If the requested number of cores is greater than number of cores available, GLIDE will user the latter number. |

`verbose` |
If TRUE, print on screen the computing time spent in each step of GLIDE. |

This function fits a logistic regression for each SNP being evaluated for instrumental variables, regressing outcome on one genotype at a time and adjusting covariates as specified in the formula (outcome ~ adjusting covariates). The p-values for the genotypes derived from these regression models were compared to the distribution of simulation-based null p-values to declare significance of individual variant and global pleiotropy. See Dai et al. (2017) for details of the algorithm.

A data frame containing observed p-value, expected null p-value, family wise error rate (FWER), q-value, genetic association with exposure, and variance of the estimated association of each SNP.

James Y. Dai and X. Wang

J. Y. Dai, U. Peters, X. Wang, J. Kocarnik, J. et al. Diagnostics of pleiotropy in Mendelian randomization studies: Global and individual tests for direct effects. The American Journal of Human Genetics, 2017, submitted.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ```
##load an example data.
data(simdata)
#The example dataset is a list composed of two dataframes.
#simat stores 20,000 observations of 81 variables, including outcome, 5 ajusting covariates,
#and 75 SNPs.
simdat=simdata$simdat
#coeff stores the 75 external regression cofficients.
coeff=simdata$coeff
#We define the regression formula for outcome and adjusting covariates
formula=as.formula("outcome~age+sex+pc1+pc2+pc3")
#We next define the columns in simdat that contain genotype data
genotype_columns=which(grepl("^SNP",colnames(simdat)))
## Not run:
##run glide
out=glide(formula=formula,exposure_coeff=coeff,genotype_columns,data=simdat,np=100000,
qcutoff=0.2,parallel=TRUE,corenumber=1,verbose=TRUE)
##use more cores
out=glide(formula=formula,exposure_coeff=coeff,genotype_columns,data=simdat,np=100000,
qcutoff=0.2,parallel=TRUE,corenumber=4,verbose=TRUE)
## End(Not run)
``` |

GLIDE documentation built on May 29, 2017, 12:31 p.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.