1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
|
---
title: "Qtlizer: comprehensive QTL annotation of GWAS results"
output: BiocStyle::html_document
author: "Julia Remes & Matthias Munz"
vignette: >
%\VignetteIndexEntry{Qtlizer}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
```
# Introduction
This **R** package provides access to the **Qtlizer** web server. **Qtlizer** annotates lists of common small variants (mainly SNPs) and genes in humans with associated changes in gene expression using the most comprehensive database of published quantitative trait loci (QTLs).
# Installation
```{r setup, eval=FALSE}
if(!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("Qtlizer")
```
# Loading package
```{r}
library(Qtlizer)
```
# Example function calls
The Qtlizer database can be queried with the function `get_qtls`. Accepted query terms are variant and gene identifiers of the form
+ Rsid : rs + number e.g. "rs4284742"
+ reference:chr:pos e.g. "hg19:19:45412079" (Allowed references: hg19/GRCh37, hg38/GRCh38; accepted chromosomes are 1-22)
+ Gene symbol consisting of letters and numbers according to [https://www.genenames.org/about/guidelines/]( https://www.genenames.org/about/guidelines/)
```{r}
# Call get_qtls with a variant as a single query term
get_qtls("rs4284742")
```
Common seperators (space, comma, space + comma, ...) are accepted. Multiple terms can be passed in a single string, each term separated by comma, whitespace or both:
```{r}
# Call get_qtls with multiple query terms in single string
df = get_qtls("rs4284742, rs2070901")
```
Alternatively, terms can be passed as a vector:
```{r}
# Call get_qtls with multiple query terms as vector
df = get_qtls(c("rs4284742", "DEFA1"))
```
Input variants can be enriched by variants in linkage disequilibrium (LD). The correlation method to be used can be set with `ld_method`. Default is "r2", alternatively "dprime" can be used. The correlation threshold, above which other correlated variants should be included, can be set with `corr` and ranges between 0 and 1. Default is "NA"
```{r}
# Use parameters corr and ld_method
df = get_qtls(c("rs4284742", "DEFA1"), corr = 0.8, ld_method = "r2")
```
Also, column descriptions can be viewed:
```{r}
# View meta info
df = get_qtls("rs4284742")
comment(df)
```
The QTL results is returned as data frame by default or as `GenomicRanges::GRanges` object. To return the results as GenomicRanges::GRanges object, `return_obj` is set to "granges". If `return_obj` is set to "granges", parameter `ref_version` sets the reference version in which the GRange object is returned. Allowed values are "hg19" (GRCh37) by default and "hg38" (GRCh38).
```{r}
# Return result as GRange object with ref_version hg38
granges = get_qtls("rs4284742", return_obj = "granges", ref_version = "hg38")
```
# Output of Session Info
The output of ```sessionInfo()``` on the system
on which this document was compiled:
```{r}
sessionInfo()
```
|