knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

library(mrpipeline)

Introduction

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.

Cis/trans variants

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:

Annotate ENSG

Although 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))

Druggability

Drug-Genome Interaction DB

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").



jwr-git/mrpipeline documentation built on Oct. 2, 2022, 3:41 p.m.