Uses coordinates from stored summary stats files (e.g. GWAS) to determine which regions to query from eQTL Catalogue.
eQTL_Catalogue.iterate_fetch( sumstats_paths, output_dir = "./catalogueR_queries", qtl_id, quant_method = "ge", infer_region = T, use_tabix = T, multithread_loci = T, multithread_tabix = F, nThread = 4, split_files = T, merge_with_gwas = F, force_new_subset = F, progress_bar = F, genome_build = "hg19", verbose = T )
sumstats_paths | A list of paths to any number of summary stats files
whose coordinates you want to use to make queries to eQTL Catalogue.
If you wish to add custom names to the loci, simply add these as the names of the path list
(e.g. The minimum columns in these files required to make queries include:
|
---|---|
output_dir | The folder you want the merged gwas/qtl results to be saved to
(set |
quant_method | eQTL Catalogue actually contains more than just eQTL data. For each dataset, the following kinds of QTLs can be queried:
|
use_tabix | Tabix is about ~17x faster (default: =T) than the REST API (=F). |
nThread | The number of CPU cores you want to use to speed up your queries through parallelization. |
split_files | Save the results as one file per QTL dataset (with all loci within each file).
If this is set to |
merge_with_gwas | Whether you want to merge your QTL query results with your GWAS data (convenient, but takes up more storage). |
force_new_subset | By default, catalogueR will use any pre-existing files that match your query.
Set |
progress_bar | Show progress bar during parallelization across loci.
WARNING!: Progress bar (via |
genome_build | The genome build of your query coordinates (e.g. |
verbose | Show more ( |
Other eQTL Catalogue:
BST1__Alasoo_2018.macrophage_IFNg
,
LRRK2__Alasoo_2018.macrophage_IFNg
,
MEX3C__Alasoo_2018.macrophage_IFNg
,
eQTL_Catalogue.fetch()
,
eQTL_Catalogue.header
,
eQTL_Catalogue.query()
,
eQTL_Catalogue.search_metadata()
,
fetch_restAPI()
,
fetch_tabix()
,
merge_gwas_qtl()
,
meta
sumstats_paths <- example_sumstats_paths() qtl_id <- eQTL_Catalogue.list_datasets()$unique_id[1] GWAS.QTL <- eQTL_Catalogue.iterate_fetch(sumstats_paths=sumstats_paths, qtl_id=qtl_id, force_new_subset=T, multithread_loci=T, nThread=1, split_files=F, progress_bar=F)#> [1] "++ Extracting locus name from `sumstats_paths` names."#>#>#>#> #>#>#> [1] "++ Inferring coordinates from gwas_data"#> Warning: error in running command#> Warning: File '/var/folders/zq/h7mtybc533b1qzkys_ttgpth0000gn/T//RtmpIjYyRa/file1802243838924' has size 0. Returning a NULL data.table.#> [1] "Data dimensions: 0 x 0" #> [1] "Data dimensions: 0 x 0" #> [1] "++ Adding `Locus.GWAS` column." #> [1] "Data dimensions: 1 x 1" #> [1] "++ Extracting locus name from `sumstats_paths` names."#>#>#>#> #>#>#> [1] "++ Inferring coordinates from gwas_data"#> Warning: error in running command#> Warning: File '/var/folders/zq/h7mtybc533b1qzkys_ttgpth0000gn/T//RtmpIjYyRa/file18022772c2faf' has size 0. Returning a NULL data.table.#> [1] "Data dimensions: 0 x 0" #> [1] "Data dimensions: 0 x 0" #> [1] "++ Adding `Locus.GWAS` column." #> [1] "Data dimensions: 1 x 1" #> [1] "++ Extracting locus name from `sumstats_paths` names."#>#>#>#> #>#>#> [1] "++ Inferring coordinates from gwas_data"#> Warning: error in running command#> Warning: File '/var/folders/zq/h7mtybc533b1qzkys_ttgpth0000gn/T//RtmpIjYyRa/file18022175252ea' has size 0. Returning a NULL data.table.#> [1] "Data dimensions: 0 x 0" #> [1] "Data dimensions: 0 x 0" #> [1] "++ Adding `Locus.GWAS` column." #> [1] "Data dimensions: 1 x 1" #> [1] "Data dimensions: x " #> [1] "+ Returning merged data.table of query results." #> [1] " x "