extract.pheno.csv: Extract summarized data from a PhenoScanner .csv file...

View source: R/extract.pheno.csv-function.R

extract.pheno.csvR Documentation

Extract summarized data from a PhenoScanner .csv file (legacy)

Description

The function extract.pheno.csv extracts summarized data on associations with named exposure and outcome variables from a .csv file provided by PhenoScanner.

Usage

extract.pheno.csv(
  exposure,
  pmidE,
  ancestryE,
  outcome,
  pmidO,
  ancestryO,
  file,
  rsq.proxy = 1,
  snps = "all"
)

Arguments

exposure

The name of the exposure variable.

pmidE

The PubMed ID (PMID) of the publication in which the genetic association estimates with the exposure were originally reported. Some variables are reported in multiple consortia (for example, associations with coronary artery disease by CARDIoGRAM in 2011 [PMID:21378990], by CARDIoGRAMplusC4D in 2013, and again by CARDIoGRAMplusC4D in 2015 [PMID:26343387]). Equally, some publications reported associations on multiple variables (for example, CARDIoGRAMplusC4D in 2015 [PMID:26343387] reported associations with coronary artery disease and with myocardial infarction). By providing the variable name and the PubMed ID, the set of associations is (almost) uniquely identified.

ancestryE

The ancestry of individuals in which estimates were obtained. A small number of studies reported genetic association estimates for a single variable in a single publication for multiple ethnicities (for example, associations with log(eGFR creatinine) from CKD-Gen in 2016 [PMID:26831199] were reported for both Europeans and Africans). The combination of exposure name, PubMed ID, and ancestry uniquely defines the set of associations. Providing the ancestry also reminds analysts of the additional complication of conducting Mendelian randomization when associations with the exposure and with the outcome are in individuals of different ancestry. Most association estimates are obtained in "European" or "Mixed" populations, although some are obtained in "African", "Asian", or "Hispanic" populations.

outcome

The name of the outcome variable.

pmidO

The PubMed ID of the publication in which the genetic association estimates with the outcome were originally reported.

ancestryO

The ancestry of individuals in which genetic association estimates with the outcome were obtained.

file

The file path where the PhenoScanner .csv file can be found.

rsq.proxy

A proxy variant is a genetic variant in close correlation (high linkage disequilibrium) with the named variant. If PhenoScanner is run with proxies included, then proxies can be included in the analysis. In the second example below, with log(eGFR creatinine) as the exposure and Tanner stage as the outcome, the association of variant rs12785878 with the outcome is not reported. Instead, rs4944958 is used as a proxy for rs12785878. The association of rs4944958 with the outcome is used in the resulting MRInput object. The correlation between the two variants is reported as R^2 = 1.000. A message will always appear when a proxy variant is included in an analysis in place of the primary variant. The value of rsq.proxy is used as a threshold in the analysis; a variant is only included in the analysis if the value of R^2 equals or excedes this threshold. The default option is rsq.proxy = 1, meaning that only perfect proxies are used in the analysis.

snps

The names (rsIDs) of the genetic variants to be included in the analysis. The default option is "all", indicating that all the genetic variants in the .csv file with beta-coefficients and standard errors for their associations with the risk factor and with the outcome should be used in the analysis. Otherwise, only variants whose names are included in the vector of character strings provided as snps will be included in the analysis.

Details

Note that this function was written for a previous version of PhenoScanner. It has not been updated, as it has been overtaken by the pheno_input function that queries PhenoScanner directly from R.

The PhenoScanner bioinformatic tool (http://phenoscanner.medschl.cam.ac.uk/) is a curated database of publicly available results from large-scale genetic association studies. Queries can be made for individual genetic variants (SNPs and small indels), or for multiple variants in a single batch query. One of the output files is a .csv file containing all associations of variables with each of the SNPs. For commonly genotyped variants, associations with up to 200 variables may be reported. These association estimates and their standard errors can be used in Mendelian randomization analyses.

The plan is to enable PhenoScanner to be queried directly from the MendelianRandomization package. However, this functionality is currently unavailable.

The extract.pheno.csv function takes the output from the web version of PhenoScanner, and converts this into an MRInput object. PhenoScanner is still under development. This function is designed for output from PhenoScanner version 1.1 (Little Miss Sunshine).

Value

The output of the extract.pheno.csv function is an MRInput object that can be used directly in any of the estimation functions (such as mr_ivw) or in the plotting function mr_plot. The output contains:

bx

The genetic associations with the exposure.

bxse

The corresponding standard errors.

by

The genetic associations with the outcome.

byse

The corresponding standard errors.

correlation

The matrix of genetic correlations. Currently, this is set to the empty matrix (matrix()), meaning that only uncorrelated variants can be used in the extract.pheno.csv function.

exposure

A character string giving the name of the exposure as provided in the PhenoScanner database.

outcome

A character string giving the name of the outcome as provided in the PhenoScanner database.

snps

A vector of character strings with the names of the genetic variants.

References

James R Staley, James Blackshow, Mihir A Kamat, Steve Ellis, Prvaeen Surendran, Benjamin B Sun, Dirk S Paul, Daniel Freitag, Stephen Burgess, John Danesh, Robin Young, and Adam S Butterworth. PhenoScanner: a database of human genotype–phenotype associations. Bioinformatics 2016. doi: 10.1093/bioinformatics/btw373.

Examples

path.noproxy <- system.file("extdata", "vitD_snps_PhenoScanner.csv",
package = "MendelianRandomization")
path.proxies <- system.file("extdata", "vitD_snps_PhenoScanner_proxies.csv",
 package = "MendelianRandomization")
 # these two files from PhenoScanner are provided
 # as part of the MendelianRandomization package

extract.pheno.csv(
 exposure = "log(eGFR creatinine)", pmidE = 26831199, ancestryE = "European",
 outcome = "Tanner stage", pmidO = 24770850, ancestryO = "European", 
 file = path.noproxy)

extract.pheno.csv(
 exposure = "log(eGFR creatinine)", pmidE = 26831199, ancestryE = "European",
 outcome = "Tanner stage", pmidO = 24770850, ancestryO = "European",
 rsq.proxy = 0.6, file = path.proxies)

extract.pheno.csv(
 exposure = "log(eGFR creatinine)", pmidE = 26831199, ancestryE = "European",
 outcome = "Asthma", pmidO = 20860503, ancestryO = "European",
 rsq.proxy = 0.6, file = path.proxies)


MendelianRandomization documentation built on Aug. 9, 2023, 1:05 a.m.