AnnoQR (R Package)

GitHub Repo

Introduction

This is an R client for performing queries with AnnoQ API.

Installation

Install from GitHub Repo Make sure you have installed devtools.

install.packages("devtools")

Then

library(devtools)

` install_github(“USCbiostats/AnnoQR”)`

Function list

  • add_query_filter
  • add_source
  • exists_filter
  • init_query_js_body
  • keywordsQuery
  • perform_search
  • query_obj_to_json
  • range_filter
  • read_config
  • regionQuery
  • rsidQuery
  • term_filter

Examples

Query Variants with ANNOVAR_ensembl_Effect Annotation

library(AnnoQR)
q = init_query_js_body()
ex = exists_filter("ANNOVAR_ensembl_Effect")
q = add_query_filter(q, ex)
variants = perform_search(q)
variants

Only retrieve ANNOVAR_ensembl_Effect column

q = add_source(q, c("ANNOVAR_ensembl_Effect"))
variants = perform_search(q)
variants

Query variants field SnpEff_ensembl_Effect marked as intergenic_region

q = init_query_js_body()
term_f = term_filter('SnpEff_ensembl_Effect' , 'intergenic_region')
q = add_query_filter(q, term_f)
variants = perform_search(q)
variants

Query variants field SnpEff_ensembl_Effect marked as `intergenic_region with in chromosome 20

q = init_query_js_body()
term_f1 = term_filter('SnpEff_ensembl_Effect' , 'intergenic_region')
term_f2 = term_filter('chr' , '20')
q = add_query_filter(q, term_f1)
q = add_query_filter(q, term_f2)
#q = add_source(q, c('SnpEff_ensembl_Effect'))
variants = perform_search(q)
variants

Query variants with 1000 genome allel count 1000Gp3_AC larger than 5

q = init_query_js_body()
range_f = range_filter(key='1000Gp3_AC' , gt=5)
q = add_query_filter(q, range_f)
variants = perform_search(q)
variants

Chromosome range query

variants = regionQuery(contig = '20', start=31710367, end=31820367)
variants

rsID query

variant = rsidQuery('rs193031179')
variant

keywordsQuery

keywordsQuery('protein_coding')

Whats Next