pqtl: Return information related to the pQTL analysis

Description Usage Arguments Value Examples

View source: R/pqtl.R

Description

GET /pqtl/

Usage

1
2
3
4
5
6
7
pqtl(
  query,
  rtype = c("mrres", "simple", "sglmr", "inst", "sense"),
  pvalue = 0.05,
  searchflag = c("traits", "proteins"),
  mode = c("table", "raw")
)

Arguments

query

(Required) A protein coding gene name or a trait name, e.g. "ADAM19" or "Inflammatory bowel disease" which cannot be NULL.

rtype

(Optional) A type of data to be extracted, which can be one of these options:

  1. simple: Basic summary

  2. mrres: MR results (DEFAULT)

  3. sglmr: Single SNP MR results

  4. inst: SNP information

  5. sense: Sensitivity analysis NOTE: mrres is a DEFAULT option.

pvalue

(Optional) A pvalue threshold for MR results with the DEFAULT set to 0.05. NOTE: this threshold applies to any rtype chosen.

searchflag

(Required) A flag to indicate whether you are searching for proteins or traits which cannot be NULL. If query is a protein name, then this flag should be "proteins"; if query is a trait, this flag should be "traits". NOTE: if the wrong flag is chosen for query, there will be no result returned.

mode

If mode = "table", returns a data frame (a tibble as per tidyverse convention). If mode = "raw", returns a raw response from EpiGraphDB API with minimal parsing done by httr.

Value

Data from GET /pqtl/

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Returns a data frame of MR results, while searching for proteins
pqtl(query = "ADAM19", searchflag = "proteins")

# Returns a data frame with SNP information, while searching for traits
pqtl(
  query = "Inflammatory bowel disease",
  rtype = "inst",
  searchflag = "traits"
)

# Change a pvalue threshold (the default is 0.05)
pqtl(
  query = "Inflammatory bowel disease",
  rtype = "inst",
  pvalue = 1.0,
  searchflag = "traits"
)

# Returns raw response if mode="raw"
pqtl(
  query = "ADAM19", searchflag = "proteins",
  mode = "raw"
) %>% str()

epigraphdb documentation built on March 29, 2021, 5:11 p.m.