portal_query: Search and download fine-mapping files

View source: R/portal_query.R

portal_queryR Documentation

Search and download fine-mapping files

Description

Search the echolocatoR Fine-mapping Portal for fine-mapping results, LD, and locus plots.

Usage

portal_query(
  dataset_types = NULL,
  datasets = NULL,
  phenotypes = NULL,
  file_types = c("multi_finemap", "LD", "plot"),
  loci = NULL,
  LD_panels = c("UKB", "1KGphase1", "1KGphase3"),
  results_dir = tempdir(),
  overwrite = FALSE,
  as_datatable = FALSE,
  nThread = 1,
  verbose = TRUE
)

Arguments

dataset_types

Dataset types to search for (e.g. "GWAS", "QTL").

datasets

Dataset names to search for (e.g. "Ripke_2014", "Wray_2018").

phenotypes

Phenotypes to search for (e.g. "Schizophrenia", "Major Depressive Disorder").

file_types

File types to search for:

  • "multi_finemap":Fine-mapping results merged with GWAS/QTL summary statistics.

  • "LD":Linkage Disequilibrium with the lead SNP in each locus.

  • "plot" : Locus plots of fine-mapped results.

loci

Locus names to search for (e.g. "BST1", "CHRNB1", "LRRK2").

LD_panels

LD panels to search for, or results generated using different LD panels (e.g. "UKB", "1KGphase1", "1KGphase3").

results_dir

Where to save the matching queries.

overwrite

Whether to overwrite previously saved queries with the same names.

as_datatable

Return results organized in a data.table. Otherwise, will return a list of local file paths.

nThread

Number of threads to parallelise downloads across.

verbose

Print messages.

Value

List of local paths where the requested files were downloaded to.

Examples

local_finemap <- portal_query(
    dataset_types = "GWAS",
    phenotypes = c("schizophrenia", "parkinson"),
    file_types = "multi_finemap",
    loci = c("BST1", "CHRNB1", "LRRK2"),
    LD_panels="1KGphase3") 

RajLabMSSM/echodata documentation built on Nov. 21, 2023, 8 a.m.