View source: R/extract.pheno.csv-function.R
extract.pheno.csv | R Documentation |
The function extract.pheno.csv
extracts summarized data on associations with named exposure and outcome variables from a .csv file provided by PhenoScanner.
extract.pheno.csv(
exposure,
pmidE,
ancestryE,
outcome,
pmidO,
ancestryO,
file,
rsq.proxy = 1,
snps = "all"
)
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 |
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 |
snps |
The names (rsIDs) of the genetic variants to be included in the analysis. The default option is |
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).
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 ( |
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. |
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.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.