Title: | Query 'HaploReg', 'RegulomeDB' |
---|---|
Description: | A set of utilities for querying 'HaploReg' <https://pubs.broadinstitute.org/mammals/haploreg/haploreg.php>, 'RegulomeDB' <https://www.regulomedb.org/regulome-search/> web-based tools. The package connects to 'HaploReg', 'RegulomeDB' searches and downloads results, without opening web pages, directly from R environment. Results are stored in a data frame that can be directly used in various kinds of downstream analyses. |
Authors: | Ilya Y. Zhbannikov [aut, cre], Konstantin G. Arbeev [aut], Anatoliy I. Yashin [aut] |
Maintainer: | Ilya Y. Zhbannikov <[email protected]> |
License: | GPL-3 |
Version: | 4.0.7 |
Built: | 2024-11-02 06:48:46 UTC |
Source: | CRAN |
Converts vector of strings to numeric vector
as.num(x, na.strings = "NA")
as.num(x, na.strings = "NA")
x |
Input vector of strings. |
na.strings |
A string which represents |
A numeric vector
library(haploR) as.num(c("1", "2", "X"), na.strings="X")
library(haploR) as.num(c("1", "2", "X"), na.strings="X")
This function queries HaploReg web-based tool in order to Extended view for SNP of interest
getExtendedView(snp, url = Haploreg.settings[["extended.view.url"]])
getExtendedView(snp, url = Haploreg.settings[["extended.view.url"]])
snp |
A SNP of interest. |
url |
A url to HaploReg. Default: <https://pubs.broadinstitute.org/mammals/haploreg/detail_v4.1.php?query=&id=> |
A list of tables t1, t2, ..., etc depending on information contained in HaploReg database.
tables <- getExtendedView(snp="rs10048158") tables
tables <- getExtendedView(snp="rs10048158") tables
This function queries HaploReg web-based tool in order to see a list of GWAS.
getStudyList(url = Haploreg.settings[["study.url"]])
getStudyList(url = Haploreg.settings[["study.url"]])
url |
A url to HaploReg. Default: <https://pubs.broadinstitute.org/mammals/haploreg/haploreg.php> |
A list of studies. Each study is itself a list
of two: name
, id
.
studies <- getStudyList() studies
studies <- getStudyList() studies
This function queries HaploReg web-based tool and returns results.
queryHaploreg( query = NULL, file = NULL, study = NULL, ldThresh = 0.8, ldPop = "EUR", epi = "vanilla", cons = "siphy", genetypes = "gencode", url = Haploreg.settings[["base.url"]], timeout = 100, encoding = "UTF-8", querySNP = FALSE, fields = NULL, verbose = FALSE )
queryHaploreg( query = NULL, file = NULL, study = NULL, ldThresh = 0.8, ldPop = "EUR", epi = "vanilla", cons = "siphy", genetypes = "gencode", url = Haploreg.settings[["base.url"]], timeout = 100, encoding = "UTF-8", querySNP = FALSE, fields = NULL, verbose = FALSE )
query |
Query (a vector of rsIDs). |
file |
A text file (one refSNP ID per line). |
study |
A particular study. See function |
ldThresh |
LD threshold, r2 (select NA to only show query variants). Default: 0.8. |
ldPop |
1000G Phase 1 population for LD calculation. Can be: "AFR", "AMR", "ASN". Default: "EUR". |
epi |
Source for epigenomes.
Possible values: |
cons |
Mammalian conservation algorithm.
Possible values: |
genetypes |
Show position relative to.
Possible values: |
url |
HaploReg url address. Default: <https://pubs.broadinstitute.org/mammals/haploreg/haploreg.php> |
timeout |
A |
encoding |
sets the |
querySNP |
A flag indicating to return query SNPs only.
Default: |
fields |
A set of fields to extract. Refer to the package vignette
for available fields. Default: |
verbose |
Verbosing output. Default: FALSE. |
A data frame (table) with results similar to HaploReg uses.
library(haploR) data <- queryHaploreg(c("rs10048158","rs4791078")) head(data)
library(haploR) data <- queryHaploreg(c("rs10048158","rs4791078")) head(data)
This function queries RegulomeDB web-based tool and returns results in a data frame.
queryRegulome( query = NULL, genomeAssembly = "GRCh37", limit = 1000, timeout = 100 )
queryRegulome( query = NULL, genomeAssembly = "GRCh37", limit = 1000, timeout = 100 )
query |
Query (a vector of rsIDs or exact one query region in rsid or like "chr1:39492461-39492462"). |
genomeAssembly |
Genome assembly built: can be GRCh37 (default) or GRCh38. |
limit |
It controls how many variants will be queried and returned for a large region. It can be a number (1000 by default) or "all". Please note that large number or "all" may get yourself hurt because you could get timeout or may even crash the server. |
timeout |
A |
a data frame (table) OR a list with the following items: - guery_coordinates - features - regulome_score - variants - nearby_snps, - assembly
data <- queryRegulome(c("rs4791078","rs10048158")) head(data)
data <- queryRegulome(c("rs4791078","rs10048158")) head(data)
This function queries RegulomeDB web-based tool and returns results in a data frame.
This function queries RegulomeDB web-based tool and returns results in a data frame.
regulomeSearch( query = NULL, genomeAssembly = NULL, limit = 1000, timeout = 100 ) regulomeSummary( query = NULL, limit = 1000, genomeAssembly = NULL, timeout = 100 )
regulomeSearch( query = NULL, genomeAssembly = NULL, limit = 1000, timeout = 100 ) regulomeSummary( query = NULL, limit = 1000, genomeAssembly = NULL, timeout = 100 )
query |
Query (a vector of rsIDs). |
genomeAssembly |
Genome assembly built: can be GRCh37 or GRCh38 |
limit |
It controls how many variants will be queried and returned for a large region. It can be a number (1000 by default) or "all". Please note that large number or "all" may get yourself hurt because you could get timeout or may even crash the server. |
timeout |
A |
a list with the following items: - guery_coordinates - features - regulome_score - variants - nearby_snps, - assembly
a data frame (table)
data <- regulomeSearch("rs4791078") head(data) data <- regulomeSummary(c("rs4791078","rs10048158")) head(data)
data <- regulomeSearch("rs4791078") head(data) data <- regulomeSummary(c("rs4791078","rs10048158")) head(data)