Query Roadmap

Query Roadmap annotations using a set of genomic coordinates.

ROADMAP_query(
  query_dat,
  keyword_query = NULL,
  limit_files = NULL,
  chrom_states = NULL,
  n_top = NULL,
  min_hits = 1,
  save_dir = file.path(tempdir(), paste(paste0("roadmap_query--", paste(keyword_query,
    collapse = "-")), paste0("n_top--", n_top), paste0("limit_files--", limit_files),
    paste(chrom_states, collapse = "-"), sep = ".")),
  force_new = FALSE,
  return_paths = FALSE,
  merge_and_process = FALSE,
  conda_env = "echoR_mini",
  nThread = 1,
  verbose = TRUE
)

Arguments

query_dat

Variant-level summary statistics.

keyword_query

Search all columns in the Roadmap annotations metadata and only query annotations that contain your keywords. Can provide multiple keywords in list form: c("placenta","liver","monocytes").

limit_files

Limit the number of annotation files queried (for faster testing).

chrom_states

Filter results by chromatin states.

n_top

The number of top annotation sources (e.g. tissues) to include, sorted by greatest number of rows (i.e. the number of genomic ranges within the window).

min_hits

Minimum number of hits (regions overlapping with query_dat) required to include a given annotation.

save_dir

Directory to store query results in.

force_new

Overwrite any existing files of the same name.

return_paths

Return list of paths instead of a GRangesList.

merge_and_process

Perform filtering and merging of GRangesList items.

conda_env

Conda environment to search for tabix in.

nThread

Number of threads to parallelise queries over.

verbose

Print messages.

Examples

query_dat <- echodata::BST1
grl <- ROADMAP_query(
    query_dat = query_dat,
    keyword_query = "monocyte")
#> + ROADMAP:: 2 annotation(s) identified that match: monocyte
#> Constructing GRanges query using min/max ranges across one or more chromosomes.
#> + as_blocks=TRUE: Will query a single range per chromosome that covers all regions requested (plus anything in between).
#> Downloading Roadmap Chromatin Marks: E124
#> Converting dat to GRanges object.
#> Saving query ==> /tmp/Rtmp3k34Cf/roadmap_query--monocyte.n_top--.limit_files--./ROADMAP_query.E124.rds
#> Converting 1 GRanges object to separate BED files.
#> Saving BED file ==> /tmp/Rtmp3k34Cf/roadmap_query--monocyte.n_top--.limit_files--./E124.bed.txt.gz
#> BED subset downloaded in 6.568 seconds
#> Constructing GRanges query using min/max ranges across one or more chromosomes.
#> + as_blocks=TRUE: Will query a single range per chromosome that covers all regions requested (plus anything in between).
#> Downloading Roadmap Chromatin Marks: E029
#> Converting dat to GRanges object.
#> Saving query ==> /tmp/Rtmp3k34Cf/roadmap_query--monocyte.n_top--.limit_files--./ROADMAP_query.E029.rds
#> Converting 1 GRanges object to separate BED files.
#> Saving BED file ==> /tmp/Rtmp3k34Cf/roadmap_query--monocyte.n_top--.limit_files--./E029.bed.txt.gz
#> BED subset downloaded in 7.163 seconds
#> ROADMAP:: Annotating GRangesList.
#> Annotating chromatin states.
#> ROADMAP:: Done in 0.26 min.