EWAScaller queries the EWAS Atlas database for epigenome-wide association study results, and runs enrichment analyses on CpG probe sets. Because every example below contacts a remote web service, the code in this vignette is shown but not executed when the package documentation is built; run it interactively to see live results.
res <- query_cpg(c("cg05575921", "cg11903855", "cg00240195"), workers = 2, delay = 1)
res
summary(res)
head(res$associations)
head(res$probes)query_cpg(), query_gene(), and
query_region() all return an ewas_result
object with the same shape: an associations table (one row
per probe-trait association), a probes table (one row per
unique probe), and a failed table listing any input terms
that could not be resolved.
gene_res <- query_gene(c("AHRR", "F2RL3"))
region_res <- query_region(chr = "5", start = 373000, end = 374000)Multiple regions can be supplied at once via a data frame:
ewas_enrichment() submits a probe set (20-5000 probes)
to the EWAS Atlas toolkit and retrieves enrichment results against a
chosen background ("450K", "850K", or a custom
probe list).
Query functions dispatch up to workers requests
concurrently and pause delay seconds between batches.
Increase workers for faster throughput on large probe
lists, or increase delay to be gentler on the remote
service.