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).
if(!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("Qtlizer")
library(Qtlizer)
#> Error in library(Qtlizer): there is no package called 'Qtlizer'
The Qtlizer database can be queried with the function get_qtls
. Accepted query terms are variant and gene identifiers of the form
# Call get_qtls with a variant as a single query term
get_qtls("rs4284742")
#> Error in get_qtls("rs4284742"): could not find function "get_qtls"
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:
# Call get_qtls with multiple query terms in single string
df = get_qtls("rs4284742, rs2070901")
#> Error in get_qtls("rs4284742, rs2070901"): could not find function "get_qtls"
Alternatively, terms can be passed as a vector:
# Call get_qtls with multiple query terms as vector
df = get_qtls(c("rs4284742", "DEFA1"))
#> Error in get_qtls(c("rs4284742", "DEFA1")): could not find function "get_qtls"
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"
# Use parameters corr and ld_method
df = get_qtls(c("rs4284742", "DEFA1"), corr = 0.8, ld_method = "r2")
#> Error in get_qtls(c("rs4284742", "DEFA1"), corr = 0.8, ld_method = "r2"): could not find function "get_qtls"
Also, column descriptions can be viewed:
# View meta info
df = get_qtls("rs4284742")
#> Error in get_qtls("rs4284742"): could not find function "get_qtls"
comment(df)
#> NULL
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).
# Return result as GRange object with ref_version hg38
granges = get_qtls("rs4284742", return_obj = "granges", ref_version = "hg38")
#> Error in get_qtls("rs4284742", return_obj = "granges", ref_version = "hg38"): could not find function "get_qtls"
The output of sessionInfo()
on the system
on which this document was compiled:
sessionInfo()
#> R version 4.1.1 (2021-08-10)
#> Platform: x86_64-pc-linux-gnu (64-bit)
#> Running under: Debian GNU/Linux bookworm/sid
#>
#> Matrix products: default
#> BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.10.0
#> LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.10.0
#>
#> locale:
#> [1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8
#> [4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8
#> [7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C
#> [10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C
#>
#> attached base packages:
#> [1] stats graphics grDevices utils datasets methods base
#>
#> other attached packages:
#> [1] markdown_1.1 knitr_1.33
#>
#> loaded via a namespace (and not attached):
#> [1] compiler_4.1.1 magrittr_2.0.1 tools_4.1.1 stringi_1.7.4 stringr_1.4.0
#> [6] xfun_0.25 evaluate_0.14