knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) library(mrpipeline)
The pipeline includes a number of functions which can be used to annotate data and results. This vignette will explain this functions, how they are used, and how they may improve analyses and understanding of results.
It is possible to annotate SNPs as cis or trans using the biomaRt package. Annotating the exposure SNPs in this way allows you to subset SNPs based on this status (e.g. to run a cis-only analysis).
exposure <- read_exposure(c("eqtl-a-ENSG00000130669", "eqtl-a-ENSG00000001167", "eqtl-a-ENSG00000169704")) exposure <- cis_trans(exposure) head(data.frame(exposure))
This function can use either Ensembl Gene IDs (ENSG) or gene names (HGNC symbol) as decided by the filter
argument (default ENSG IDs). Furthermore, it will require either SNP rsIDs or chromosome and positions for SNPs. See ?cis_trans
for more details about these arguments.
New columns will be added to the data:
hgnc_symbol
or ensembl_gene_id
, annotated genes. The present column will be the opposite of the filter
argumentchromosome_name
for the gene, as present in biomaRtstart_position
for the gene, as present in biomaRtend_position
for the gene, as present in biomaRtcistrans
can take three values: "C" for cis, "T" for trans, "U" for unknown if not found in biomaRtAlthough cis_trans
can annotate ENSG IDs, a separate function is also available to only convert ENSG IDs to gene names.
exposure <- read_exposure(c("eqtl-a-ENSG00000130669", "eqtl-a-ENSG00000001167", "eqtl-a-ENSG00000169704")) exposure <- annotate_ensg(exposure) head(data.frame(exposure))
Experimental Factor Ontology terms are used to provide a systematic description for many variables in the EBI database and are commonly used by many resources for systematic API access. This function uses the EpigraphDB resource to annotate terms with EFO IDs.
outcome <- read_outcome("ieu-b-7", rsids = exposure$SNP) outcome <- annotate_efo(outcome) head(data.frame(outcome))
The DGIdb contains information on drug-gene interactions and druggable genome mined from a variety of sources. The pipeline contains a wrapper function for the DGIdb API to annotate for a list of druggability terms.
dt_evidence <- drug_target_evidence(exposure) head(data.frame(dt_evidence))
The function takes a column which contains ENSG IDs (default: "exposure").
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.