library(catalogueR)

Introduction

eQTL Catalogue includes a large number of standardized QTL datasets (110 datasets from 20 studies as of 7/4/2020). It actually contains more than just eQTL data. For each dataset, the following kinds of QTLs can be queried:

Metadata

You can view of a metadata table for all current datasets:

data("meta")
messager("There are",formatC(nrow(meta),big.mark = ","),
         "datasets in eQTL Catalogue.")
knitr::kable(meta[1:10,])

You can seach through the metadata for datasets with certain keywords (case-insensitive substrings across multiple columns).

qtl_datasets <- catalogueR::eQTLcatalogue_search_metadata(
  qtl_search=c("Alasoo_2018","monocyte"))

print(qtl_datasets)

[Approach 1] Query with summary stats

Supply one or more paths to [GWAS] summary stats files (one per locus) and automatically download any eQTL data within that range. The files can be any of these formats, either gzip-compressed (.gz) or uncompressed: .csv, .tsv, space-separated


The summary stats files must have the following column names (order doesn't matter): - SNP (rsid for each SNP) - CHR (chromosome; with or without the "chr" prefix is fine) - POS (basepair position) - ... (optional extra columns)

sumstats_paths <- echodata::get_Nalls2019_loci(limit_snps = 5)
gwas.qtl_paths <- catalogueR::eQTLcatalogue_query(
  sumstats_paths =  sumstats_paths["BST1"],
  qtl_search = c("Alasoo_2018.macrophage_naive"),
  split_files  = TRUE)
GWAS.QTL <- catalogueR::merge_files(file_paths = gwas.qtl_paths)
# Interactive datatable of results 
## WARNING: Don't use this function on large datatables, might cause freezing.
echodata::createDT(utils::head(GWAS.QTL))

[Approach 2] Query with coordinates

You can also makes queries to eQTL Catalogue by manually specifying the coordinates of the region you want to extract, as well as the unique_id of the QTL dataset (see data("meta") for IDs).

GWAS.QTL_manual <- catalogueR:: eQTLcatalogue_fetch(
  unique_id="Alasoo_2018.macrophage_IFNg",  
  chrom = 8, 
  bp_lower = 21527069-500,
  bp_upper = 21527069+500)

echodata::createDT(utils::head(GWAS.QTL_manual))

Session info

utils::sessionInfo()



RajLabMSSM/catalogueR documentation built on Jan. 1, 2023, 10:45 a.m.